xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ lcd_draw_pixel(int, int, int);
void lcd_clear_screen(int color) {
  int i, j;
  for (i = 0; i < (272); i++)
    for (j = 0; j < (480); j++)
      lcd_draw_pixel(i, j, color);
}


x86 assembly (clang, -O0):
<lcd_clear_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x110,-0x8(%rbp)
jge    1172 <lcd_clear_screen+0x62>
movl   $0x0,-0xc(%rbp)
cmpl   $0x1e0,-0xc(%rbp)
jge    115f <lcd_clear_screen+0x4f>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x4(%rbp),%edx
call   1030 <lcd_draw_pixel@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <lcd_clear_screen+0x26>
jmp    1164 <lcd_clear_screen+0x54>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <lcd_clear_screen+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_clear_screen>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
xor    %ebp,%ebp
nopl   0x0(%rax)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebp,%edi
mov    %ebx,%esi
mov    %r14d,%edx
call   1030 <lcd_draw_pixel@plt>
add    $0x1,%ebx
cmp    $0x1e0,%ebx
jne    1130 <lcd_clear_screen+0x20>
add    $0x1,%ebp
cmp    $0x110,%ebp
jne    1120 <lcd_clear_screen+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @lcd_clear_screen(i32 %0) {
br label %2
2: ; preds = %1, %9
%3 = phi i32 [ 0, %1 ], [ %10, %9 ]
br label %4
4: ; preds = %2, %4
%5 = phi i32 [ 0, %2 ], [ %7, %4 ]
%6 = tail call i32 @lcd_draw_pixel(i32 %3, i32 %5, i32 %0)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, 480
br i1 %8, label %9, label %4
9: ; preds = %4
%10 = add nuw nsw i32 %3, 1
%11 = icmp eq i32 %10, 272
br i1 %11, label %12, label %2
12: ; preds = %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int /*<<< orphan*/ STDOUT_FILENO;
int fcntl(int /*<<< orphan*/, int /*<<< orphan*/, ...);
int async_setup_stdout(void) {
  return fcntl(STDOUT_FILENO, F_SETFL,
               fcntl(STDOUT_FILENO, F_GETFL) | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<async_setup_stdout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    0x2e88(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    %eax,%edx
mov    0x2e88(%rip),%rax
or     (%rax),%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<async_setup_stdout>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ed6(%rip),%rax
mov    (%rax),%ebx
mov    0x2ead(%rip),%rax
mov    (%rax),%ebp
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <fcntl@plt>
mov    0x2ea2(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@F_SETFL = global i32 0
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @async_setup_stdout() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @STDOUT_FILENO
%4 = load i32, i32* @F_GETFL
%5 = call i32 (i32, i32, ...) @fcntl(i32 %3, i32 %4)
%6 = load i32, i32* @O_NONBLOCK
%7 = or i32 %5, %6
%8 = call i32 (i32, i32, ...) @fcntl(i32 %1, i32 %2, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@F_SETFL = global i32 0
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @async_setup_stdout() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @F_GETFL
%4 = tail call i32 (i32, i32, ...) @fcntl(i32 %1, i32 %3)
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %5, %4
%7 = tail call i32 (i32, i32, ...) @fcntl(i32 %1, i32 %2, i32 %6)
ret i32 %7
}
unsigned hash_addr(void *addr) {
  unsigned long key = (unsigned long)addr;
  return (unsigned)(((key >> 3) * 2654435761) % 0x80000000);
}


x86 assembly (clang, -O0):
<hash_addr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x3,%rax
movabs $0x9e3779b1,%rcx
imul   %rcx,%rax
and    $0x7fffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_addr>:
shr    $0x3,%rdi
imul   $0x9e3779b1,%edi,%eax
and    $0x7fffffff,%eax
ret

LLVM IR (-O0):
define i32 @hash_addr(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = lshr i64 %6, 3
%8 = mul i64 %7, 2654435761
%9 = urem i64 %8, 2147483648
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @hash_addr(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = lshr i64 %2, 3
%4 = trunc i64 %3 to i32
%5 = mul i32 %4, -1640531535
%6 = and i32 %5, 2147483647
ret i32 %6
}
int pathconN_nm7_n_in(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @pathconN_nm7_n_in() {
ret i32 1
}

LLVM IR (-O2):
define i32 @pathconN_nm7_n_in() {
ret i32 1
}
int mod(int a) {
  if (a < 0) {
    int b = -a;
    return b;
  } else {
    return a;
  }
}


x86 assembly (clang, -O0):
<mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1124 <mod+0x24>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112a <mod+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mod(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
scalar_t__ S_ISCHR(long);
scalar_t__ S_ISDIR(long);
scalar_t__ S_ISREG(long);
char ftypelet(long bits) {
  if (S_ISCHR(bits))
    return 'c';
  if (S_ISDIR(bits))
    return 'd';
  if (S_ISREG(bits))
    return '-';
  return '?';
}


x86 assembly (clang, -O0):
<ftypelet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <S_ISCHR@plt>
cmp    $0x0,%rax
je     1158 <ftypelet+0x28>
movb   $0x63,-0x1(%rbp)
jmp    1194 <ftypelet+0x64>
mov    -0x10(%rbp),%rdi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
je     1174 <ftypelet+0x44>
movb   $0x64,-0x1(%rbp)
jmp    1194 <ftypelet+0x64>
mov    -0x10(%rbp),%rdi
call   1040 <S_ISREG@plt>
cmp    $0x0,%rax
je     1190 <ftypelet+0x60>
movb   $0x2d,-0x1(%rbp)
jmp    1194 <ftypelet+0x64>
movb   $0x3f,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftypelet>:
push   %rbx
mov    %rdi,%rbx
call   1050 <S_ISCHR@plt>
mov    %rax,%rcx
mov    $0x63,%al
test   %rcx,%rcx
je     1145 <ftypelet+0x15>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
mov    $0x64,%al
test   %rcx,%rcx
jne    1143 <ftypelet+0x13>
mov    %rbx,%rdi
call   1040 <S_ISREG@plt>
test   %rax,%rax
mov    $0x3f,%ecx
mov    $0x2d,%eax
cmove  %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @ftypelet(i64 %0) {
%2 = alloca i8
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = call i64 @S_ISCHR(i64 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 99, i8* %2
br label %19
8: ; preds = %1
%9 = load i64, i64* %3
%10 = call i64 @S_ISDIR(i64 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 100, i8* %2
br label %19
13: ; preds = %8
%14 = load i64, i64* %3
%15 = call i64 @S_ISREG(i64 %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i8 45, i8* %2
br label %19
18: ; preds = %13
store i8 63, i8* %2
br label %19
19: ; preds = %18, %17, %12, %7
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @ftypelet(i64 %0) {
%2 = tail call i64 @S_ISCHR(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = tail call i64 @S_ISDIR(i64 %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i64 @S_ISREG(i64 %0)
%9 = icmp eq i64 %8, 0
%10 = select i1 %9, i8 63, i8 45
br label %11
11: ; preds = %7, %4, %1
%12 = phi i8 [ 99, %1 ], [ 100, %4 ], [ %10, %7 ]
ret i8 %12
}
/* Variables and functions */
int /*<<< orphan*/ read_tok(char *);
int main() {
  read_tok("temp.txt");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"temp.txt\00"
define i32 @main() {
%1 = tail call i32 @read_tok(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int fossil_utf8_to_console(const char *zUtf8, int nByte, int toStdErr) {
  return -1;
}


x86 assembly (clang, -O0):
<fossil_utf8_to_console>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @fossil_utf8_to_console(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 -1
}
/* Variables and functions */
char **FontEncIdentify(char const *);
char **identifyEncodingFile(const char *filename) {
  return FontEncIdentify(filename);
}


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

x86 assembly (clang, -O2):
<identifyEncodingFile>:
jmp    1030 <FontEncIdentify@plt>

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

LLVM IR (-O2):
define i8** @identifyEncodingFile(i8* %0) {
%2 = tail call i8** @FontEncIdentify(i8* %0)
ret i8** %2
}
/* Variables and functions */
float Bounce__easeOut(float, int /*<<< orphan*/, float, float, float, float);
float Bounce__easeIn(float t, float b, float c, float d, float p0, float p1) {
  return c - Bounce__easeOut(d - t, 0, c, d, p0, p1) + b;
}


x86 assembly (clang, -O0):
<Bounce__easeIn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x10(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movss  -0x14(%rbp),%xmm3
movss  -0x18(%rbp),%xmm4
xor    %edi,%edi
call   1030 <Bounce__easeOut@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
subss  %xmm1,%xmm0
addss  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bounce__easeIn>:
push   %rax
movss  %xmm2,(%rsp)
movss  %xmm1,0x4(%rsp)
movaps %xmm3,%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
xor    %edi,%edi
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
movaps %xmm4,%xmm3
movaps %xmm5,%xmm4
call   1030 <Bounce__easeOut@plt>
movss  (%rsp),%xmm1
subss  %xmm0,%xmm1
addss  0x4(%rsp),%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @Bounce__easeIn(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %9
%14 = load float, float* %10
%15 = load float, float* %7
%16 = fsub float %14, %15
%17 = load float, float* %9
%18 = load float, float* %10
%19 = load float, float* %11
%20 = load float, float* %12
%21 = call float @Bounce__easeOut(float %16, i32 0, float %17, float %18, float %19, float %20)
%22 = fsub float %13, %21
%23 = load float, float* %8
%24 = fadd float %22, %23
ret float %24
}

LLVM IR (-O2):
define float @Bounce__easeIn(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = fsub float %3, %0
%8 = tail call float @Bounce__easeOut(float %7, i32 0, float %2, float %3, float %4, float %5)
%9 = fsub float %2, %8
%10 = fadd float %9, %1
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void test_qsort() { fputs("You can't test qsort on a non-68000.\n", stderr); }


x86 assembly (clang, -O0):
<test_qsort>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_qsort>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"You can't test qsort on a non-68000.\0A\00"
@stderr = global i32 0
define void @test_qsort() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"You can't test qsort on a non-68000.\0A\00"
@stderr = global i32 0
define void @test_qsort() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
unsigned Qfrac(unsigned qV) { return (qV & 0x0000FFFF); }


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

x86 assembly (clang, -O2):
<Qfrac>:
movzwl %di,%eax
ret

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

LLVM IR (-O2):
define i32 @Qfrac(i32 %0) {
%2 = and i32 %0, 65535
ret i32 %2
}
double julian_increment_seconds(double julian, int seconds) {
  double julian_increment;
  julian_increment = (double)seconds / (1440.0 * 60.0);
  return julian + julian_increment;
}


x86 assembly (clang, -O0):
<julian_increment_seconds>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  0xee7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<julian_increment_seconds>:
cvtsi2sd %edi,%xmm1
divsd  0xef4(%rip),%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @julian_increment_seconds(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sitofp i32 %6 to double
%8 = fdiv double %7, 8.640000e+04
store double %8, double* %5
%9 = load double, double* %3
%10 = load double, double* %5
%11 = fadd double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @julian_increment_seconds(double %0, i32 %1) {
%3 = sitofp i32 %1 to double
%4 = fdiv double %3, 8.640000e+04
%5 = fadd double %4, %0
ret double %5
}
/* Type definitions */
struct sfmt_state_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gen_rand32(struct sfmt_state_t *);
double to_real3(int /*<<< orphan*/);
double genrand_real3(struct sfmt_state_t *s) { return to_real3(gen_rand32(s)); }


x86 assembly (clang, -O0):
<genrand_real3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <gen_rand32@plt>
mov    %eax,%edi
call   1030 <to_real3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand_real3>:
push   %rax
call   1040 <gen_rand32@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <to_real3@plt>

LLVM IR (-O0):
%struct.sfmt_state_t = type { i32 }
define double @genrand_real3(%struct.sfmt_state_t* %0) {
%2 = alloca %struct.sfmt_state_t*
store %struct.sfmt_state_t* %0, %struct.sfmt_state_t** %2
%3 = load %struct.sfmt_state_t*, %struct.sfmt_state_t** %2
%4 = call i32 @gen_rand32(%struct.sfmt_state_t* %3)
%5 = call double @to_real3(i32 %4)
ret double %5
}

LLVM IR (-O2):
%struct.sfmt_state_t = type { i32 }
define double @genrand_real3(%struct.sfmt_state_t* %0) {
%2 = tail call i32 @gen_rand32(%struct.sfmt_state_t* %0)
%3 = tail call double @to_real3(i32 %2)
ret double %3
}
void caller_1_2_2_2_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_1_2_2_2_1_2_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ USB_free(void *);
int /*<<< orphan*/ memory_counter(scalar_t__);
void usbh_free_mem(void *p, int size) {
  USB_free(p);
  memory_counter(0 - size);
}


x86 assembly (clang, -O0):
<usbh_free_mem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <USB_free@plt>
xor    %eax,%eax
sub    -0xc(%rbp),%eax
movslq %eax,%rdi
call   1030 <memory_counter@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usbh_free_mem>:
push   %rbx
mov    %esi,%ebx
call   1040 <USB_free@plt>
neg    %ebx
movslq %ebx,%rdi
pop    %rbx
jmp    1030 <memory_counter@plt>

LLVM IR (-O0):
define void @usbh_free_mem(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @USB_free(i8* %5)
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = sext i32 %8 to i64
%10 = call i32 @memory_counter(i64 %9)
ret void
}

LLVM IR (-O2):
define void @usbh_free_mem(i8* %0, i32 %1) {
%3 = tail call i32 @USB_free(i8* %0)
%4 = sub nsw i32 0, %1
%5 = sext i32 %4 to i64
%6 = tail call i32 @memory_counter(i64 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_warnIfReached();
void invariably_infinite_break_loop() {
  int i = 0;
  while (1) {
    ++i;
    int x = 1;
    if (!x)
      break;
  }
  clang_analyzer_warnIfReached();
}


x86 assembly (clang, -O0):
<invariably_infinite_break_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    113e <invariably_infinite_break_loop+0x2e>
jmp    1143 <invariably_infinite_break_loop+0x33>
jmp    111f <invariably_infinite_break_loop+0xf>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @invariably_infinite_break_loop() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0, %9
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
store i32 1, i32* %2
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %3
br label %10
9: ; preds = %3
br label %3
10: ; preds = %8
%11 = call i32 (...) @clang_analyzer_warnIfReached()
ret void
}

LLVM IR (-O2):
define void @invariably_infinite_break_loop() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int foo(int a, int b) {
  assert(a == 3);
  assert(b == 5);
  return 9;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x3,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x5,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x9,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
mov    %esi,%ebx
xor    %eax,%eax
cmp    $0x3,%edi
sete   %al
mov    %eax,%edi
call   1030 <assert@plt>
xor    %edi,%edi
cmp    $0x5,%ebx
sete   %dil
call   1030 <assert@plt>
mov    $0x9,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @foo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 3
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 5
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret i32 9
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 3
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp eq i32 %1, 5
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret i32 9
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ _vdo(int /*<<< orphan*/, int, char const *,
                        int /*<<< orphan*/);
int /*<<< orphan*/ errno;
void vwarn(const char *fmt, va_list args) { _vdo(errno, 1, fmt, args); }


x86 assembly (clang, -O0):
<vwarn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    $0x1,%esi
call   1030 <_vdo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vwarn>:
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
jmp    1030 <_vdo@plt>

LLVM IR (-O0):
@errno = global i32 0
define void @vwarn(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @errno
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @_vdo(i32 %5, i32 1, i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@errno = global i32 0
define void @vwarn(i8* %0, i32 %1) {
%3 = load i32, i32* @errno
%4 = tail call i32 @_vdo(i32 %3, i32 1, i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int w5100_readSnSR(unsigned int);
int /*<<< orphan*/ w5100_socket_cmd(unsigned int, int);
unsigned socket_listen(unsigned sock) {
  if (w5100_readSnSR(sock) != 0x13)
    return 0;
  w5100_socket_cmd(sock, 0x02);
  return 1;
}


x86 assembly (clang, -O0):
<socket_listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <w5100_readSnSR@plt>
cmp    $0x13,%eax
je     1148 <socket_listen+0x28>
movl   $0x0,-0x4(%rbp)
jmp    115c <socket_listen+0x3c>
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   1030 <w5100_socket_cmd@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_listen>:
push   %rbx
mov    %edi,%ebx
call   1040 <w5100_readSnSR@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x13,%ecx
jne    1142 <socket_listen+0x22>
mov    %ebx,%edi
mov    $0x2,%esi
call   1030 <w5100_socket_cmd@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @socket_listen(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @w5100_readSnSR(i32 %4)
%6 = icmp ne i32 %5, 19
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i32 @w5100_socket_cmd(i32 %9, i32 2)
store i32 1, i32* %2
br label %11
11: ; preds = %8, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @socket_listen(i32 %0) {
%2 = tail call i32 @w5100_readSnSR(i32 %0)
%3 = icmp eq i32 %2, 19
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @w5100_socket_cmd(i32 %0, i32 2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xff() {
  Assert_real((isxdigit(255) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              1280, ("isxdigit should be 0 for 0xff"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xff\00"
define void @t_isxdigit_0xff() {
%1 = call i64 @isxdigit(i32 255)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1280, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xff\00"
define void @t_isxdigit_0xff() {
%1 = tail call i64 @isxdigit(i32 255)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1280, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
extern void array_twiddle(long **arr) {
  arr[0] = (long *)malloc(sizeof(long));
  arr[1] = (long *)malloc(sizeof(long));
  arr[2] = (long *)malloc(sizeof(long));
  *arr[0] = 1;
  *arr[1] = 2;
  *arr[2] = 3;
}


x86 assembly (clang, -O0):
<array_twiddle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movq   $0x1,(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movq   $0x2,(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
movq   $0x3,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_twiddle>:
push   %rbx
mov    %rdi,%rbx
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,(%rbx)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,0x8(%rbx)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,0x10(%rbx)
mov    (%rbx),%rcx
movq   $0x1,(%rcx)
mov    0x8(%rbx),%rcx
movq   $0x2,(%rcx)
movq   $0x3,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @array_twiddle(i64** nocapture %0) {
%2 = tail call i64 @malloc(i32 8)
%3 = inttoptr i64 %2 to i64*
store i64* %3, i64** %0
%4 = tail call i64 @malloc(i32 8)
%5 = inttoptr i64 %4 to i64*
%6 = getelementptr inbounds i64*, i64** %0, i64 1
store i64* %5, i64** %6
%7 = tail call i64 @malloc(i32 8)
%8 = inttoptr i64 %7 to i64*
%9 = getelementptr inbounds i64*, i64** %0, i64 2
store i64* %8, i64** %9
%10 = load i64*, i64** %0
store i64 1, i64* %10
%11 = load i64*, i64** %6
store i64 2, i64* %11
store i64 3, i64* %8
ret void
}
/* Variables and functions */
bool nrf52_errata_78(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_78() {
ret i32 0
}
/* Variables and functions */
float cos_f(float);
float sin_f(float);
float tan_f(float x) { return (sin_f(x) / cos_f(x)); }


x86 assembly (clang, -O0):
<tan_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sin_f@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <cos_f@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tan_f>:
push   %rax
movss  %xmm0,(%rsp)
call   1030 <sin_f@plt>
movss  %xmm0,0x4(%rsp)
movss  (%rsp),%xmm0
call   1040 <cos_f@plt>
movss  0x4(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @tan_f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @sin_f(float %3)
%5 = load float, float* %2
%6 = call float @cos_f(float %5)
%7 = fdiv float %4, %6
ret float %7
}

LLVM IR (-O2):
define float @tan_f(float %0) {
%2 = tail call float @sin_f(float %0)
%3 = tail call float @cos_f(float %0)
%4 = fdiv float %2, %3
ret float %4
}
/* Variables and functions */
scalar_t__ eval_boolean(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void cmd_quit_if(const char *assign_to, char *arg) {
  if (eval_boolean(arg))
    exit(0);
}


x86 assembly (clang, -O0):
<cmd_quit_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <eval_boolean@plt>
cmp    $0x0,%rax
je     114a <cmd_quit_if+0x2a>
xor    %edi,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_quit_if>:
push   %rax
mov    %rsi,%rdi
call   1040 <eval_boolean@plt>
test   %rax,%rax
jne    1130 <cmd_quit_if+0x10>
pop    %rax
ret
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @cmd_quit_if(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i64 @eval_boolean(i8* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @exit(i32 0)
unreachable
10: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @cmd_quit_if(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i64 @eval_boolean(i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %2
ret void
}
int test_imm_E9uint16_reg(unsigned short val) {
  return ((val) & (-0xE9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E9uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff17,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E9uint16_reg>:
test   $0xff17,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E9uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -233
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  printf("Fuck this, I'll do it later!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"Fuck this, I'll do it later!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [29 x i8] c"Fuck this, I'll do it later!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
void HandleButton(int x, int y, int button, int bDown) {
  printf("Button: %d,%d (%d) -> %d\n", x, y, button, bDown);
}


x86 assembly (clang, -O0):
<HandleButton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HandleButton>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee0(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Button: %d,%d (%d) -> %d\0A\00"
define void @HandleButton(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Button: %d,%d (%d) -> %d\0A\00"
define void @HandleButton(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int toupper(int);
__attribute__((visibility("hidden"))) int internal_to_upper(int source) {
  return toupper(source);
}


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

x86 assembly (clang, -O2):
<internal_to_upper>:
jmp    1030 <toupper@plt>

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

LLVM IR (-O2):
define hidden i32 @internal_to_upper(i32 %0) {
%2 = tail call i32 @toupper(i32 %0)
ret i32 %2
}
int fun287() { return 287; }


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

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

LLVM IR (-O0):
define i32 @fun287() {
ret i32 287
}

LLVM IR (-O2):
define i32 @fun287() {
ret i32 287
}
/* Variables and functions */
int /*<<< orphan*/ timo_done();
void filelist_done(void) { timo_done(); }


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

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

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

LLVM IR (-O2):
define void @filelist_done() {
%1 = tail call i32 (...) @timo_done()
ret void
}
void g_slist_append() {}


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

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

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

LLVM IR (-O2):
define void @g_slist_append() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void keyPressed(unsigned char key, int x, int y) {
  switch (key) {
  case 'd':
    break;
  case 'o':
    break;
  case 'q':
    break;
  case 'x':
    break;
  case 'n':
    break;
  case 's':
    break;
  case 'a':
    exit(0);
  default:;
  }
}


x86 assembly (clang, -O0):
<keyPressed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x17,%eax
ja     1173 <keyPressed+0x63>
mov    -0x18(%rbp),%rax
lea    0xebb(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    1178 <keyPressed+0x68>
jmp    1178 <keyPressed+0x68>
jmp    1178 <keyPressed+0x68>
jmp    1178 <keyPressed+0x68>
jmp    1178 <keyPressed+0x68>
jmp    1178 <keyPressed+0x68>
xor    %edi,%edi
call   1030 <exit@plt>
jmp    1178 <keyPressed+0x68>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyPressed>:
cmp    $0x61,%dil
je     1117 <keyPressed+0x7>
ret
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @keyPressed(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
switch i32 %8, label %17 [
i32 100, label %9
i32 111, label %10
i32 113, label %11
i32 120, label %12
i32 110, label %13
i32 115, label %14
i32 97, label %15
]
9: ; preds = %3
br label %18
10: ; preds = %3
br label %18
11: ; preds = %3
br label %18
12: ; preds = %3
br label %18
13: ; preds = %3
br label %18
14: ; preds = %3
br label %18
15: ; preds = %3
%16 = call i32 @exit(i32 0)
unreachable
17: ; preds = %3
br label %18
18: ; preds = %17, %14, %13, %12, %11, %10, %9
ret void
}

LLVM IR (-O2):
define void @keyPressed(i8 zeroext %0, i32 %1, i32 %2) {
%4 = icmp eq i8 %0, 97
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @exit(i32 0)
unreachable
7: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("Usage: LZHL {+|-} <input_file> <output_file>\n"); }


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"Usage: LZHL {+|-} <input_file> <output_file>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [45 x i8] c"Usage: LZHL {+|-} <input_file> <output_file>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fprintf(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void print_upperhex64(uint64_t value) {
  if (fprintf(stdout, "%016llX\n", value) < 0) {
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<print_upperhex64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
cmp    $0x0,%rax
jge    115b <print_upperhex64+0x3b>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_upperhex64>:
push   %rax
mov    %edi,%edx
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
test   %rax,%rax
js     113f <print_upperhex64+0x1f>
pop    %rax
ret
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [9 x i8] c"%016llX\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_upperhex64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stdout
%4 = load i32, i32* %2
%5 = call i64 @fprintf(i32 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [9 x i8] c"%016llX\0A\00"
@EXIT_FAILURE = global i32 0
define void @print_upperhex64(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i64 @fprintf(i32 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fuse_enable(int /*<<< orphan*/);
int /*<<< orphan*/ hg_enable(int /*<<< orphan*/);
int /*<<< orphan*/ mpu_enable(int /*<<< orphan*/);
int /*<<< orphan*/ remote_fuse_enable(int /*<<< orphan*/);
int /*<<< orphan*/ thermo_hi_enable(int /*<<< orphan*/);
int /*<<< orphan*/ thermo_lo_enable(int /*<<< orphan*/);
void reset_all(void) {
  ;
  thermo_hi_enable(0);
  thermo_lo_enable(0);
  mpu_enable(0);
  hg_enable(0);
  fuse_enable(0);
  remote_fuse_enable(0);
}


x86 assembly (clang, -O0):
<reset_all>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1050 <thermo_hi_enable@plt>
xor    %edi,%edi
call   1030 <thermo_lo_enable@plt>
xor    %edi,%edi
call   1080 <mpu_enable@plt>
xor    %edi,%edi
call   1040 <hg_enable@plt>
xor    %edi,%edi
call   1070 <fuse_enable@plt>
xor    %edi,%edi
call   1060 <remote_fuse_enable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_all>:
push   %rax
xor    %edi,%edi
call   1050 <thermo_hi_enable@plt>
xor    %edi,%edi
call   1030 <thermo_lo_enable@plt>
xor    %edi,%edi
call   1080 <mpu_enable@plt>
xor    %edi,%edi
call   1040 <hg_enable@plt>
xor    %edi,%edi
call   1070 <fuse_enable@plt>
xor    %edi,%edi
pop    %rax
jmp    1060 <remote_fuse_enable@plt>

LLVM IR (-O0):
define void @reset_all() {
%1 = call i32 @thermo_hi_enable(i32 0)
%2 = call i32 @thermo_lo_enable(i32 0)
%3 = call i32 @mpu_enable(i32 0)
%4 = call i32 @hg_enable(i32 0)
%5 = call i32 @fuse_enable(i32 0)
%6 = call i32 @remote_fuse_enable(i32 0)
ret void
}

LLVM IR (-O2):
define void @reset_all() {
%1 = tail call i32 @thermo_hi_enable(i32 0)
%2 = tail call i32 @thermo_lo_enable(i32 0)
%3 = tail call i32 @mpu_enable(i32 0)
%4 = tail call i32 @hg_enable(i32 0)
%5 = tail call i32 @fuse_enable(i32 0)
%6 = tail call i32 @remote_fuse_enable(i32 0)
ret void
}
void recurse(const int depth) {
  if (depth < 21) {
#pragma omp task default(none) firstprivate(depth)
    { recurse(depth + 1); }
#pragma omp task default(none) firstprivate(depth)
    { recurse(depth + 1); }
  }
}


x86 assembly (clang, -O0):
<recurse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x15,-0x4(%rbp)
jge    113b <recurse+0x2b>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1030 <recurse@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1030 <recurse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recurse>:
push   %rbx
cmp    $0x14,%edi
jg     112f <recurse+0x1f>
mov    %edi,%ebx
add    $0x1,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <recurse@plt>
add    $0x1,%ebx
cmp    $0x16,%ebx
jne    1120 <recurse+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @recurse(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 21
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @recurse(i32 %0) {
%2 = icmp slt i32 %0, 21
br i1 %2, label %3, label %7
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, 1
tail call void @recurse(i32 %5)
%6 = icmp eq i32 %5, 21
br i1 %6, label %7, label %3
7: ; preds = %3, %1
ret void
}
unsigned long find_ibft_region(unsigned long *sizep) {
  *sizep = 0;
  return 0;
}


x86 assembly (clang, -O0):
<find_ibft_region>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_ibft_region>:
movq   $0x0,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @find_ibft_region(i64* nocapture writeonly %0) {
store i64 0, i64* %0
ret i64 0
}