xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ stdin;
double x_atof(char *);
int x_getline(char **, int /*<<< orphan*/);
int main(void) {
  char *line = NULL;
  while (x_getline(&line, stdin) != -1) {
    printf("%.8g\n", x_atof(line));
    free(line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    0x2e8a(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdi
call   1050 <x_getline@plt>
cmp    $0xffffffff,%eax
je     1195 <main+0x55>
mov    -0x10(%rbp),%rdi
call   1030 <x_atof@plt>
lea    0xe7e(%rip),%rdi
call   1060 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <free@plt>
jmp    1157 <main+0x17>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x8(%rsp)
mov    0x2e8f(%rip),%r15
mov    (%r15),%esi
lea    0x8(%rsp),%rdi
call   1050 <x_getline@plt>
cmp    $0xffffffff,%eax
je     11ac <main+0x6c>
lea    0xe8e(%rip),%r14
lea    0x8(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    0x8(%rsp),%rdi
call   1030 <x_atof@plt>
mov    %r14,%rdi
call   1060 <printf@plt>
mov    0x8(%rsp),%rdi
call   1040 <free@plt>
mov    (%r15),%esi
mov    %rbx,%rdi
call   1050 <x_getline@plt>
cmp    $0xffffffff,%eax
jne    1180 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@stdin = global i32 0
@.str = [6 x i8] c"%.8g\0A\00"
define i32 @main() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%3 = load i32, i32* @stdin
%4 = call i32 @x_getline(i8** %1, i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %15, label %6
6: ; preds = %0, %6
%7 = load i8*, i8** %1
%8 = call double @x_atof(i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %8)
%10 = load i8*, i8** %1
%11 = call i32 @free(i8* %10)
%12 = load i32, i32* @stdin
%13 = call i32 @x_getline(i8** %1, i32 %12)
%14 = icmp eq i32 %13, -1
br i1 %14, label %15, label %6
15: ; preds = %6, %0
ret i32 0
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int sumNumbersSub(struct TreeNode *, int /*<<< orphan*/);
int sumNumbers(struct TreeNode *root) {
  if (!root)
    return 0;
  else
    return sumNumbersSub(root, 0);
}


x86 assembly (clang, -O0):
<sumNumbers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1133 <sumNumbers+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1141 <sumNumbers+0x31>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <sumNumbersSub@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumNumbers>:
test   %rdi,%rdi
je     111c <sumNumbers+0xc>
xor    %esi,%esi
jmp    1030 <sumNumbersSub@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32 @sumNumbers(%struct.TreeNode* %0) {
%2 = alloca i32
%3 = alloca %struct.TreeNode*
store %struct.TreeNode* %0, %struct.TreeNode** %3
%4 = load %struct.TreeNode*, %struct.TreeNode** %3
%5 = icmp ne %struct.TreeNode* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i32 0, i32* %2
br label %10
7: ; preds = %1
%8 = load %struct.TreeNode*, %struct.TreeNode** %3
%9 = call i32 @sumNumbersSub(%struct.TreeNode* %8, i32 0)
store i32 %9, i32* %2
br label %10
10: ; preds = %7, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32 @sumNumbers(%struct.TreeNode* %0) {
%2 = icmp eq %struct.TreeNode* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @sumNumbersSub(%struct.TreeNode* %0, i32 0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void speck_back(uint32_t *a, uint32_t *b, const uint32_t key) {
  *b = (((*b ^ *a) >> ((3) & 0x1F)) | ((*b ^ *a) << (0x20 - ((3) & 0x1F))));
  *a = ((((key ^ *a) - *b) << ((8) & 0x1F)) |
        (((key ^ *a) - *b) >> (0x20 - ((8) & 0x1F))));
}


x86 assembly (clang, -O0):
<speck_back>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
xor    (%rax),%ecx
sar    $0x3,%ecx
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rdx
xor    (%rdx),%eax
shl    $0x1d,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
xor    (%rax),%ecx
mov    -0x10(%rbp),%rax
sub    (%rax),%ecx
shl    $0x8,%ecx
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%rdx
xor    (%rdx),%eax
mov    -0x10(%rbp),%rdx
sub    (%rdx),%eax
sar    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<speck_back>:
mov    (%rdi),%eax
xor    (%rsi),%eax
mov    %eax,%ecx
sar    $0x3,%ecx
shl    $0x1d,%eax
or     %ecx,%eax
mov    %eax,(%rsi)
xor    (%rdi),%edx
sub    %eax,%edx
mov    %edx,%eax
shl    $0x8,%eax
sar    $0x18,%edx
or     %eax,%edx
mov    %edx,(%rdi)
ret

LLVM IR (-O0):
define void @speck_back(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** %5
%8 = load i32, i32* %7
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = xor i32 %8, %10
%12 = ashr i32 %11, 3
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = load i32*, i32** %4
%16 = load i32, i32* %15
%17 = xor i32 %14, %16
%18 = shl i32 %17, 29
%19 = or i32 %12, %18
%20 = load i32*, i32** %5
store i32 %19, i32* %20
%21 = load i32, i32* %6
%22 = load i32*, i32** %4
%23 = load i32, i32* %22
%24 = xor i32 %21, %23
%25 = load i32*, i32** %5
%26 = load i32, i32* %25
%27 = sub nsw i32 %24, %26
%28 = shl i32 %27, 8
%29 = load i32, i32* %6
%30 = load i32*, i32** %4
%31 = load i32, i32* %30
%32 = xor i32 %29, %31
%33 = load i32*, i32** %5
%34 = load i32, i32* %33
%35 = sub nsw i32 %32, %34
%36 = ashr i32 %35, 24
%37 = or i32 %28, %36
%38 = load i32*, i32** %4
store i32 %37, i32* %38
ret void
}

LLVM IR (-O2):
define void @speck_back(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = load i32, i32* %1
%5 = load i32, i32* %0
%6 = xor i32 %5, %4
%7 = ashr i32 %6, 3
%8 = shl i32 %6, 29
%9 = or i32 %7, %8
store i32 %9, i32* %1
%10 = load i32, i32* %0
%11 = xor i32 %10, %2
%12 = sub nsw i32 %11, %9
%13 = shl i32 %12, 8
%14 = ashr i32 %12, 24
%15 = or i32 %13, %14
store i32 %15, i32* %0
ret void
}
int level_to_pers(int level) {
  switch (level) {
  case (-4):
    return 7UL;
  case -3:
    return 6UL;
  case -2:
    return 5UL;
  case (-1):
    return 1UL;
  case 0:
    return 2UL;
  case 1:
    return 3UL;
  case 4:
  case 5:
    return 4UL;
  case 6:
    return 8UL;
  }
  return 0UL;
}


x86 assembly (clang, -O0):
<level_to_pers>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xa,%eax
ja     1190 <level_to_pers+0x90>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x7,-0x4(%rbp)
jmp    1197 <level_to_pers+0x97>
movl   $0x6,-0x4(%rbp)
jmp    1197 <level_to_pers+0x97>
movl   $0x5,-0x4(%rbp)
jmp    1197 <level_to_pers+0x97>
movl   $0x1,-0x4(%rbp)
jmp    1197 <level_to_pers+0x97>
movl   $0x2,-0x4(%rbp)
jmp    1197 <level_to_pers+0x97>
movl   $0x3,-0x4(%rbp)
jmp    1197 <level_to_pers+0x97>
movl   $0x4,-0x4(%rbp)
jmp    1197 <level_to_pers+0x97>
movl   $0x8,-0x4(%rbp)
jmp    1197 <level_to_pers+0x97>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<level_to_pers>:
add    $0x4,%edi
xor    %eax,%eax
cmp    $0xa,%edi
ja     1117 <level_to_pers+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

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

LLVM IR (-O2):
@switch.table.level_to_pers = [11 x i32] [i32 7, i32 6, i32 5, i32 1, i32 2, i32 3, i32 0, i32 0, i32 4, i32 4, i32 8]
define i32 @level_to_pers(i32 %0) {
%2 = add i32 %0, 4
%3 = icmp ult i32 %2, 11
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.level_to_pers, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xde() {
  Assert_real((iscntrl(222) == 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_iscntrl.c",
              1115, ("iscntrl should be 0 for 0xde"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xde>:
push   %rax
mov    $0xde,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x45b,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xde\00"
define void @t_iscntrl_0xde() {
%1 = call i64 @iscntrl(i32 222)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1115, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xde\00"
define void @t_iscntrl_0xde() {
%1 = tail call i64 @iscntrl(i32 222)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1115, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int isdigit(unsigned char);
int isdigit_c(char c) { return isdigit((unsigned char)c); }


x86 assembly (clang, -O0):
<isdigit_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit_c>:
movzbl %dil,%edi
jmp    1030 <isdigit@plt>

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

LLVM IR (-O2):
define i32 @isdigit_c(i8 signext %0) {
%2 = tail call i32 @isdigit(i8 zeroext %0)
ret i32 %2
}
int test_imm_E6uint16_mem(unsigned short *val) {
  return ((*val) & (-0xE6 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E6uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff1a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E6uint16_mem>:
movzwl (%rdi),%eax
test   $0xff1a,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E6uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -230
%7 = icmp ne i32 %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_E6uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -230
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int approximate_indel_rate_inline(int, int);
int approximate_indel_rate(int size, int displacement) {
  return approximate_indel_rate_inline(size, displacement);
}


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

x86 assembly (clang, -O2):
<approximate_indel_rate>:
jmp    1030 <approximate_indel_rate_inline@plt>

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

LLVM IR (-O2):
define i32 @approximate_indel_rate(i32 %0, i32 %1) {
%3 = tail call i32 @approximate_indel_rate_inline(i32 %0, i32 %1)
ret i32 %3
}
unsigned int inl_p(unsigned short port) {
  unsigned int _v;
  __asm__ __volatile__("in"
                       "l"
                       " %"
                       "w"
                       "1,%"
                       ""
                       "0"
                       "\noutb %%al,$0x80"
                       : "=a"(_v)
                       : "Nd"(port));
  return _v;
}


x86 assembly (clang, -O0):
<inl_p>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%eax
out    %al,$0x80
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inl_p>:
mov    %edi,%edx
in     (%dx),%eax
out    %al,$0x80
ret

LLVM IR (-O0):
define i32 @inl_p(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i32 asm sideeffect "inl ${1:w},$0\0Aoutb %al,$$0x80", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @inl_p(i16 zeroext %0) {
%2 = tail call i32 asm sideeffect "inl ${1:w},$0\0Aoutb %al,$$0x80", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0)
ret i32 %2
}
double bb_alb_modis(double redchan, double nirchan, double chan3, double chan4,
                    double chan5, double chan6, double chan7) {
  double result;
  result =
      (0.22831 * redchan + 0.15982 * nirchan +
       0.09132 * (chan3 + chan4 + chan5) + 0.10959 * chan6 + 0.22831 * chan7);
  return result;
}


x86 assembly (clang, -O0):
<bb_alb_modis>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xee4(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xebf(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  0xe93(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  0xe76(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<bb_alb_modis>:
mulsd  0xef8(%rip),%xmm1
movsd  0xef8(%rip),%xmm7
mulsd  %xmm7,%xmm0
addsd  %xmm1,%xmm0
addsd  %xmm3,%xmm2
addsd  %xmm4,%xmm2
mulsd  0xee8(%rip),%xmm2
mulsd  0xee8(%rip),%xmm5
addsd  %xmm2,%xmm0
addsd  %xmm5,%xmm0
mulsd  %xmm6,%xmm7
addsd  %xmm7,%xmm0
ret

LLVM IR (-O0):
define double @bb_alb_modis(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double %6, double* %14
%16 = load double, double* %8
%17 = load double, double* %9
%18 = fmul double 1.598200e-01, %17
%19 = call double @llvm.fmuladd.f64(double 2.283100e-01, double %16, double %18)
%20 = load double, double* %10
%21 = load double, double* %11
%22 = fadd double %20, %21
%23 = load double, double* %12
%24 = fadd double %22, %23
%25 = call double @llvm.fmuladd.f64(double 0x3FB760BF5D78811B, double %24, double %19)
%26 = load double, double* %13
%27 = call double @llvm.fmuladd.f64(double 1.095900e-01, double %26, double %25)
%28 = load double, double* %14
%29 = call double @llvm.fmuladd.f64(double 2.283100e-01, double %28, double %27)
store double %29, double* %15
%30 = load double, double* %15
ret double %30
}

LLVM IR (-O2):
define double @bb_alb_modis(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = fmul double %1, 1.598200e-01
%9 = tail call double @llvm.fmuladd.f64(double %0, double 2.283100e-01, double %8)
%10 = fadd double %2, %3
%11 = fadd double %10, %4
%12 = tail call double @llvm.fmuladd.f64(double %11, double 0x3FB760BF5D78811B, double %9)
%13 = tail call double @llvm.fmuladd.f64(double %5, double 1.095900e-01, double %12)
%14 = tail call double @llvm.fmuladd.f64(double %6, double 2.283100e-01, double %13)
ret double %14
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char *, size_t);
int strlen(char *);
char *(sdup)(char *src) {
  size_t n = 1 + strlen(src);
  char *x = malloc(n);
  memcpy(x, src, n);
  return x;
}


x86 assembly (clang, -O0):
<sdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @sdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 1, %6
%8 = sext i32 %7 to i64
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = load i8*, i8** %2
%13 = load i64, i64* %3
%14 = call i32 @memcpy(i8* %11, i8* %12, i64 %13)
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
define i8* @sdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i8* @malloc(i64 %4)
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i64 %4)
ret i8* %5
}
void XDefineCursor() {}


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

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

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

LLVM IR (-O2):
define void @XDefineCursor() {
ret void
}
unsigned int mbr_partition_get_type(unsigned size, unsigned char *partition,
                                    unsigned int *partition_type) {
  unsigned int type_offset = 0x1BE + 0x04;
  if (size < type_offset) {
    goto end;
  }
  *partition_type = partition[type_offset];
end:
  return 0;
}


x86 assembly (clang, -O0):
<mbr_partition_get_type>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x1c2,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jae    1127 <mbr_partition_get_type+0x27>
jmp    1138 <mbr_partition_get_type+0x38>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
movzbl (%rax,%rcx,1),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbr_partition_get_type>:
cmp    $0x1c2,%edi
jb     1111 <mbr_partition_get_type+0x11>
movzbl 0x1c2(%rsi),%eax
mov    %eax,(%rdx)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @mbr_partition_get_type(i32 %0, i8* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32* %2, i32** %6
store i32 450, i32* %7
%8 = load i32, i32* %4
%9 = load i32, i32* %7
%10 = icmp ult i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %3
br label %20
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = load i32, i32* %7
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = load i32*, i32** %6
store i32 %18, i32* %19
br label %20
20: ; preds = %12, %11
ret i32 0
}

LLVM IR (-O2):
define i32 @mbr_partition_get_type(i32 %0, i8* nocapture %1, i32* nocapture writeonly %2) {
%4 = icmp ult i32 %0, 450
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = getelementptr inbounds i8, i8* %1, i64 450
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
store i32 %8, i32* %2
br label %9
9: ; preds = %3, %5
ret i32 0
}
void TOKEN_ELLIPSIS(int x, ...) {}


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

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

LLVM IR (-O0):
define void @TOKEN_ELLIPSIS(i32 %0, ...) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @TOKEN_ELLIPSIS(i32 %0, ...) {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
void null_alias_bad(int *x) {
  int *y = NULL;
  x = (int *)malloc(sizeof(int *));
  *x = 42;
}


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

x86 assembly (clang, -O2):
<null_alias_bad>:
push   %rax
mov    $0x8,%edi
call   1030 <malloc@plt>
movl   $0x2a,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @null_alias_bad(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
store i32* %0, i32** %2
store i32* null, i32** %3
%4 = call i64 @malloc(i32 8)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %2
%6 = load i32*, i32** %2
store i32 42, i32* %6
ret void
}

LLVM IR (-O2):
define void @null_alias_bad(i32* nocapture readnone %0) {
%2 = tail call i64 @malloc(i32 8)
%3 = inttoptr i64 %2 to i32*
store i32 42, i32* %3
ret void
}
/* Variables and functions */
int EPERM;
int optee_verify_bootm_image(unsigned long image_addr,
                             unsigned long image_load_addr,
                             unsigned long image_len) {
  return -EPERM;
}


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

x86 assembly (clang, -O2):
<optee_verify_bootm_image>:
mov    0x2ed1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EPERM = global i32 0
define i32 @optee_verify_bootm_image(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i32, i32* @EPERM
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@EPERM = global i32 0
define i32 @optee_verify_bootm_image(i64 %0, i64 %1, i64 %2) {
%4 = load i32, i32* @EPERM
%5 = sub nsw i32 0, %4
ret i32 %5
}
void Cyc_SIG_DFL(int ignore) { return; }


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

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

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

LLVM IR (-O2):
define void @Cyc_SIG_DFL(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char *, char *);
int check_error(char *buf) {
  if (strstr(buf, "ERROR") != NULL)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<check_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
je     1142 <check_error+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <check_error+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_error>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"ERROR\00"
define i32 @check_error(i8* %0) {
%2 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void module_notfound(const char *module) {
  printf("Error!\nModule %s not found!", module);
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"Error!\0AModule %s not found!\00"
define void @module_notfound(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [28 x i8] c"Error!\0AModule %s not found!\00"
define void @module_notfound(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
__attribute__((used)) pid_t _getpid(void) { return 0; }


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

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

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 ()* @_getpid to i8*)], section "llvm.metadata"
define i32 @_getpid() {
ret i32 0
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 ()* @_getpid to i8*)], section "llvm.metadata"
define i32 @_getpid() {
ret i32 0
}
void mlx5e_ethtool_cleanup_steering(struct mlx5e_priv *priv) {}


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

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

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

LLVM IR (-O2):
%struct.mlx5e_priv = type opaque
define void @mlx5e_ethtool_cleanup_steering(%struct.mlx5e_priv* nocapture %0) {
ret void
}
void foo(int a, int b) {
  if (a == b) {
    a++;
  } else {
    b++;
  }
  if (a == b) {
    a++;
  } else {
    b++;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1124 <foo+0x24>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112d <foo+0x2d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1147 <foo+0x47>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1150 <foo+0x50>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @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 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
br label %14
11: ; preds = %2
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
store i32 %13, i32* %4
br label %14
14: ; preds = %11, %8
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = icmp eq i32 %15, %16
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %24
21: ; preds = %14
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %24
24: ; preds = %21, %18
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0, i32 %1) {
ret void
}
void mid_point(double x0, double y0, double x1, double y1, double *mx,
               double *my) {
  *mx = (x0 + x1) / 2.0;
  *my = (y0 + y1) / 2.0;
}


x86 assembly (clang, -O0):
<mid_point>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xece(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mid_point>:
addsd  %xmm2,%xmm0
movsd  0xef4(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  %xmm0,(%rdi)
addsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,(%rsi)
ret

LLVM IR (-O0):
define void @mid_point(double %0, double %1, double %2, double %3, double* %4, double* %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double*
%12 = alloca double*
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double* %4, double** %11
store double* %5, double** %12
%13 = load double, double* %7
%14 = load double, double* %9
%15 = fadd double %13, %14
%16 = fdiv double %15, 2.000000e+00
%17 = load double*, double** %11
store double %16, double* %17
%18 = load double, double* %8
%19 = load double, double* %10
%20 = fadd double %18, %19
%21 = fdiv double %20, 2.000000e+00
%22 = load double*, double** %12
store double %21, double* %22
ret void
}

LLVM IR (-O2):
define void @mid_point(double %0, double %1, double %2, double %3, double* nocapture writeonly %4, double* nocapture writeonly %5) {
%7 = fadd double %0, %2
%8 = fmul double %7, 5.000000e-01
store double %8, double* %4
%9 = fadd double %1, %3
%10 = fmul double %9, 5.000000e-01
store double %10, double* %5
ret void
}
void handle_TERM(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handle_TERM(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ keyboard_parse_set_neg_row(long, int, int);
int /*<<< orphan*/ keyboard_parse_set_pos_row(long, int, int, int);
void keyboard_set_map_any(signed long sym, int row, int col, int shift) {
  if (row >= 0) {
    keyboard_parse_set_pos_row(sym, row, col, shift);
  } else {
    keyboard_parse_set_neg_row(sym, row, col);
  }
}


x86 assembly (clang, -O0):
<keyboard_set_map_any>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1156 <keyboard_set_map_any+0x36>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <keyboard_parse_set_pos_row@plt>
jmp    1165 <keyboard_set_map_any+0x45>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <keyboard_parse_set_neg_row@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyboard_set_map_any>:
test   %esi,%esi
js     1129 <keyboard_set_map_any+0x9>
jmp    1030 <keyboard_parse_set_pos_row@plt>
jmp    1040 <keyboard_parse_set_neg_row@plt>

LLVM IR (-O0):
define void @keyboard_set_map_any(i64 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i64 %0, i64* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %4
%12 = load i64, i64* %5
%13 = load i32, i32* %6
%14 = load i32, i32* %7
%15 = load i32, i32* %8
%16 = call i32 @keyboard_parse_set_pos_row(i64 %12, i32 %13, i32 %14, i32 %15)
br label %22
17: ; preds = %4
%18 = load i64, i64* %5
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = call i32 @keyboard_parse_set_neg_row(i64 %18, i32 %19, i32 %20)
br label %22
22: ; preds = %17, %11
ret void
}

LLVM IR (-O2):
define void @keyboard_set_map_any(i64 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %1, -1
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @keyboard_parse_set_pos_row(i64 %0, i32 %1, i32 %2, i32 %3)
br label %10
8: ; preds = %4
%9 = tail call i32 @keyboard_parse_set_neg_row(i64 %0, i32 %1, i32 %2)
br label %10
10: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dprintf(int, char *, char *, char *);
int usage(char *a0) {
  dprintf(2,
          "%s - duplicate text/code finder\n"
          "finds the biggest duplicated blocks\n"
          "usage %s [-w] [-i min] [-s start] [-e end] file\n"
          "-w: remove leading whitespace\n"
          "-i min: specify minimal block length in lines (default: 4)\n"
          "-s start: specify start line (0-based index)\n"
          "-e end: specify end line (0-based index)\n"
          "-a atime: number of seconds before updating status (0: no status)\n"
          "file may be specified as '-' in which case stdin is used\n"
          "output goes to stdout.\n",
          a0, a0);
  return 1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x2,%edi
lea    0xed0(%rip),%rsi
call   1030 <dprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rcx
lea    0xee5(%rip),%rsi
mov    $0x2,%edi
mov    %rcx,%rdx
call   1030 <dprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [438 x i8] c"%s - duplicate text/code finder\0Afinds the biggest duplicated blocks\0Ausage %s [-w] [-i min] [-s start] [-e end] file\0A-w: remove leading whitespace\0A-i min: specify minimal block length in lines (default: 4)\0A-s start: specify start line (0-based index)\0A-e end: specify end line (0-based index)\0A-a atime: number of seconds before updating status (0: no status)\0Afile may be specified as '-' in which case stdin is used\0Aoutput goes to stdout.\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @dprintf(i32 2, i8* getelementptr inbounds ([438 x i8], [438 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [438 x i8] c"%s - duplicate text/code finder\0Afinds the biggest duplicated blocks\0Ausage %s [-w] [-i min] [-s start] [-e end] file\0A-w: remove leading whitespace\0A-i min: specify minimal block length in lines (default: 4)\0A-s start: specify start line (0-based index)\0A-e end: specify end line (0-based index)\0A-a atime: number of seconds before updating status (0: no status)\0Afile may be specified as '-' in which case stdin is used\0Aoutput goes to stdout.\0A\00"
define i32 @usage(i8* %0) {
%2 = tail call i32 @dprintf(i32 2, i8* getelementptr inbounds ([438 x i8], [438 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ writeLog(char *, char *, char *);
void logNotFound(char *ip, char *get) { writeLog(ip, get, "404 Not Found"); }


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

x86 assembly (clang, -O2):
<logNotFound>:
lea    0xee9(%rip),%rdx
jmp    1030 <writeLog@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"404 Not Found\00"
define void @logNotFound(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 @writeLog(i8* %5, i8* %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"404 Not Found\00"
define void @logNotFound(i8* %0, i8* %1) {
%3 = tail call i32 @writeLog(i8* %0, i8* %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printarr(int a[], int n) {
  for (int i = 0; i < n; i++) {
    printf("%i ", a[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printarr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printarr+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printarr+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printarr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printarr+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printarr+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i \00"
define void @printarr(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;

/* Variables and functions */
int pthread_condattr_getpshared(const pthread_condattr_t *attr, int *pshared) {
  (void)attr;
  (void)pshared;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @pthread_condattr_getpshared(i32* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
struct msghdr {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ dobind(int);
int /*<<< orphan*/ next_sendmsg(int, struct msghdr const *, int);
int /*<<< orphan*/ set_next_sendmsg();
ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags) {
  set_next_sendmsg();
  dobind(sockfd);
  return next_sendmsg(sockfd, msg, flags);
}


x86 assembly (clang, -O0):
<sendmsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1040 <set_next_sendmsg@plt>
mov    -0x4(%rbp),%edi
call   1050 <dobind@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <next_sendmsg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendmsg>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <set_next_sendmsg@plt>
mov    %ebp,%edi
call   1050 <dobind@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <next_sendmsg@plt>

LLVM IR (-O0):
%struct.msghdr = type { i32 }
define i32 @sendmsg(i32 %0, %struct.msghdr* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.msghdr*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.msghdr* %1, %struct.msghdr** %5
store i32 %2, i32* %6
%7 = call i32 (...) @set_next_sendmsg()
%8 = load i32, i32* %4
%9 = call i32 @dobind(i32 %8)
%10 = load i32, i32* %4
%11 = load %struct.msghdr*, %struct.msghdr** %5
%12 = load i32, i32* %6
%13 = call i32 @next_sendmsg(i32 %10, %struct.msghdr* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.msghdr = type { i32 }
define i32 @sendmsg(i32 %0, %struct.msghdr* %1, i32 %2) {
%4 = tail call i32 (...) @set_next_sendmsg()
%5 = tail call i32 @dobind(i32 %0)
%6 = tail call i32 @next_sendmsg(i32 %0, %struct.msghdr* %1, i32 %2)
ret i32 %6
}
void jpeg_idct_1x1(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ABGRToAR30Row_AVX2() {
ret void
}
__attribute__((always_)) const double fmaxk(double x, double y) {
  return x > y ? x : y;
}


x86 assembly (clang, -O0):
<fmaxk>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <fmaxk+0x2d>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <fmaxk+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmaxk>:
maxsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @fmaxk(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_gettid;
int /*<<< orphan*/ syscall(int /*<<< orphan*/);
pid_t sysflake_gettid(void) { return syscall(SYS_gettid); }


x86 assembly (clang, -O0):
<sysflake_gettid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysflake_gettid>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_gettid = global i32 0
define i32 @sysflake_gettid() {
%1 = load i32, i32* @SYS_gettid
%2 = call i32 @syscall(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@SYS_gettid = global i32 0
define i32 @sysflake_gettid() {
%1 = load i32, i32* @SYS_gettid
%2 = tail call i32 @syscall(i32 %1)
ret i32 %2
}
/* Variables and functions */
int time_total_milliseconds(float);
int time_milliseconds(float t) { return time_total_milliseconds(t) % 1000; }


x86 assembly (clang, -O0):
<time_milliseconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <time_total_milliseconds@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_milliseconds>:
push   %rax
call   1030 <time_total_milliseconds@plt>
cltq
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @time_milliseconds(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @time_total_milliseconds(float %3)
%5 = srem i32 %4, 1000
ret i32 %5
}

LLVM IR (-O2):
define i32 @time_milliseconds(float %0) {
%2 = tail call i32 @time_total_milliseconds(float %0)
%3 = srem i32 %2, 1000
ret i32 %3
}