xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
scalar_t__ zmalloc(scalar_t__, char *, int);
char *zstrdup(const char *src, char *file, int line) {
  char *result;
  result = (char *)zmalloc(strlen(src) + 1, file, line);
  if (!result)
    return NULL;
  strcpy(result, src);
  return result;
}


x86 assembly (clang, -O0):
<zstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1050 <zmalloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    117b <zstrdup+0x4b>
movq   $0x0,-0x8(%rbp)
jmp    1190 <zstrdup+0x60>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zstrdup>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1050 <zmalloc@plt>
test   %rax,%rax
je     1164 <zstrdup+0x34>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    1166 <zstrdup+0x36>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @zstrdup(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load i8*, i8** %5
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %10, 1
%12 = load i8*, i8** %6
%13 = load i32, i32* %7
%14 = call i64 @zmalloc(i64 %11, i8* %12, i32 %13)
%15 = inttoptr i64 %14 to i8*
store i8* %15, i8** %8
%16 = load i8*, i8** %8
%17 = icmp ne i8* %16, null
br i1 %17, label %19, label %18
18: ; preds = %3
store i8* null, i8** %4
br label %24
19: ; preds = %3
%20 = load i8*, i8** %8
%21 = load i8*, i8** %5
%22 = call i32 @strcpy(i8* %20, i8* %21)
%23 = load i8*, i8** %8
store i8* %23, i8** %4
br label %24
24: ; preds = %19, %18
%25 = load i8*, i8** %4
ret i8* %25
}

LLVM IR (-O2):
define i8* @zstrdup(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = add nsw i64 %4, 1
%6 = tail call i64 @zmalloc(i64 %5, i8* %1, i32 %2)
%7 = inttoptr i64 %6 to i8*
%8 = icmp eq i64 %6, 0
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call i32 @strcpy(i8* %7, i8* %0)
br label %11
11: ; preds = %3, %9
%12 = phi i8* [ %7, %9 ], [ null, %3 ]
ret i8* %12
}
/* Variables and functions */
double my_j0(double);
double Sinc(double x) { return my_j0(3.14159265358979323846 * x); }


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

x86 assembly (clang, -O2):
<Sinc>:
mulsd  0xee8(%rip),%xmm0
jmp    1030 <my_j0@plt>

LLVM IR (-O0):
define double @Sinc(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 0x400921FB54442D18, %3
%5 = call double @my_j0(double %4)
ret double %5
}

LLVM IR (-O2):
define double @Sinc(double %0) {
%2 = fmul double %0, 0x400921FB54442D18
%3 = tail call double @my_j0(double %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void indenter_vide(int indentation, int trait) {
  for (int i = 1; i <= indentation + trait; i++)
    if (i % trait == 0)
      putchar('|');
    else
      putchar(' ');
}


x86 assembly (clang, -O0):
<indenter_vide>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     1172 <indenter_vide+0x62>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    1155 <indenter_vide+0x45>
mov    $0x7c,%edi
call   1030 <putchar@plt>
jmp    115f <indenter_vide+0x4f>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    1164 <indenter_vide+0x54>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <indenter_vide+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indenter_vide>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
add    %esi,%ebx
test   %ebx,%ebx
jle    115d <indenter_vide+0x4d>
mov    %esi,%r14d
neg    %ebx
mov    $0x1,%ebp
jmp    1147 <indenter_vide+0x37>
nopl   0x0(%rax,%rax,1)
call   1030 <putchar@plt>
lea    (%rbx,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x1,%eax
je     115d <indenter_vide+0x4d>
mov    %ebp,%eax
cltd
idiv   %r14d
mov    $0x7c,%edi
test   %edx,%edx
je     1130 <indenter_vide+0x20>
mov    $0x20,%edi
jmp    1130 <indenter_vide+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @indenter_vide(i32 %0, i32 %1) {
%3 = add i32 %1, %0
%4 = icmp slt i32 %3, 1
br i1 %4, label %5, label %6
5: ; preds = %6, %2
ret void
6: ; preds = %2, %6
%7 = phi i32 [ %12, %6 ], [ 1, %2 ]
%8 = srem i32 %7, %1
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i8 124, i8 32
%11 = tail call i32 @putchar(i8 signext %10)
%12 = add nuw i32 %7, 1
%13 = icmp eq i32 %7, %3
br i1 %13, label %5, label %6
}
/* Variables and functions */
scalar_t__ isdigit(char);
scalar_t__ isxdigit(char);
char toupper(char);
int hexdigit(char c) {
  int result = 0;
  if (isdigit(c))
    result = c - '0';
  else if (isxdigit(c))
    result = toupper(c) - 'A' + 10;
  return result;
}


x86 assembly (clang, -O0):
<hexdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1167 <hexdigit+0x37>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    1194 <hexdigit+0x64>
movsbl -0x1(%rbp),%edi
call   1050 <isxdigit@plt>
cmp    $0x0,%rax
je     118f <hexdigit+0x5f>
movsbl -0x1(%rbp),%edi
call   1040 <toupper@plt>
movsbl %al,%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x8(%rbp)
jmp    1194 <hexdigit+0x64>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexdigit>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
je     1145 <hexdigit+0x15>
movsbl %bl,%eax
add    $0xffffffd0,%eax
pop    %rbx
ret
movsbl %bl,%ebx
mov    %ebx,%edi
call   1050 <isxdigit@plt>
test   %rax,%rax
je     1163 <hexdigit+0x33>
mov    %ebx,%edi
call   1040 <toupper@plt>
movsbl %al,%eax
add    $0xffffffc9,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hexdigit(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = call i64 @isdigit(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 48
store i32 %10, i32* %3
br label %22
11: ; preds = %1
%12 = load i8, i8* %2
%13 = call i64 @isxdigit(i8 signext %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %21
15: ; preds = %11
%16 = load i8, i8* %2
%17 = call signext i8 @toupper(i8 signext %16)
%18 = sext i8 %17 to i32
%19 = sub nsw i32 %18, 65
%20 = add nsw i32 %19, 10
store i32 %20, i32* %3
br label %21
21: ; preds = %15, %11
br label %22
22: ; preds = %21, %7
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @hexdigit(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = sext i8 %0 to i32
%6 = add nsw i32 %5, -48
br label %14
7: ; preds = %1
%8 = tail call i64 @isxdigit(i8 signext %0)
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %7
%11 = tail call signext i8 @toupper(i8 signext %0)
%12 = sext i8 %11 to i32
%13 = add nsw i32 %12, -55
br label %14
14: ; preds = %7, %10, %4
%15 = phi i32 [ %6, %4 ], [ %13, %10 ], [ 0, %7 ]
ret i32 %15
}
/* Type definitions */
struct udcFile {
  int dummy;
};

/* Variables and functions */
int udcFastReadString(struct udcFile *, char *);
int udcFastReadStringWrap(void *f, char buf[256]) {
  return udcFastReadString((struct udcFile *)f, buf);
}


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

x86 assembly (clang, -O2):
<udcFastReadStringWrap>:
jmp    1030 <udcFastReadString@plt>

LLVM IR (-O0):
%struct.udcFile = type { i32 }
define i32 @udcFastReadStringWrap(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 = bitcast i8* %5 to %struct.udcFile*
%7 = load i8*, i8** %4
%8 = call i32 @udcFastReadString(%struct.udcFile* %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.udcFile = type { i32 }
define i32 @udcFastReadStringWrap(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to %struct.udcFile*
%4 = tail call i32 @udcFastReadString(%struct.udcFile* %3, i8* %1)
ret i32 %4
}
int bitreverse16(int n) {
  n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1);
  n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2);
  n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4);
  n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8);
  return n;
}


x86 assembly (clang, -O0):
<bitreverse16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xaaaa,%eax
sar    $0x1,%eax
mov    -0x4(%rbp),%ecx
and    $0x5555,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xcccc,%eax
sar    $0x2,%eax
mov    -0x4(%rbp),%ecx
and    $0x3333,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf0f0,%eax
sar    $0x4,%eax
mov    -0x4(%rbp),%ecx
and    $0xf0f,%ecx
shl    $0x4,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitreverse16>:
rol    $0x8,%di
mov    %edi,%eax
and    $0xf0f,%eax
shl    $0x4,%eax
shr    $0x4,%edi
and    $0xf0f,%edi
or     %eax,%edi
mov    %edi,%eax
and    $0x3333,%eax
shr    $0x2,%edi
and    $0x3333,%edi
lea    (%rdi,%rax,4),%eax
mov    %eax,%ecx
and    $0x5555,%ecx
shr    %eax
and    $0x5555,%eax
lea    (%rax,%rcx,2),%eax
ret

LLVM IR (-O0):
define i32 @bitreverse16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 43690
%5 = ashr i32 %4, 1
%6 = load i32, i32* %2
%7 = and i32 %6, 21845
%8 = shl i32 %7, 1
%9 = or i32 %5, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = and i32 %10, 52428
%12 = ashr i32 %11, 2
%13 = load i32, i32* %2
%14 = and i32 %13, 13107
%15 = shl i32 %14, 2
%16 = or i32 %12, %15
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = and i32 %17, 61680
%19 = ashr i32 %18, 4
%20 = load i32, i32* %2
%21 = and i32 %20, 3855
%22 = shl i32 %21, 4
%23 = or i32 %19, %22
store i32 %23, i32* %2
%24 = load i32, i32* %2
%25 = and i32 %24, 65280
%26 = ashr i32 %25, 8
%27 = load i32, i32* %2
%28 = and i32 %27, 255
%29 = shl i32 %28, 8
%30 = or i32 %26, %29
store i32 %30, i32* %2
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
define i32 @bitreverse16(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bitreverse.i16(i16 %2)
%4 = zext i16 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ strpbrk(char const *, char *);
int badchar(const char *s) {
  if (strpbrk(s, "/."))
    return 1;
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"/.\00"
define i32 @badchar(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strpbrk(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
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 = [3 x i8] c"/.\00"
define i32 @badchar(i8* %0) {
%2 = tail call i64 @strpbrk(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
*letraBin(int n) {
  char *arr = "0000000";
  return arr;
}


x86 assembly (clang, -O0):
<letraBin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<letraBin>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"0000000\00"
define i32* @letraBin(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
%5 = bitcast i8* %4 to i32*
ret i32* %5
}

LLVM IR (-O2):
@.str = [8 x i8] c"0000000\00"
define i32* @letraBin(i32 %0) {
ret i32* bitcast ([8 x i8]* @.str to i32*)
}
/* Variables and functions */
int /*<<< orphan*/ _I8080_PCHL();
void do0xE9() { _I8080_PCHL(); }


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

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

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

LLVM IR (-O2):
define void @do0xE9() {
%1 = tail call i32 (...) @_I8080_PCHL()
ret void
}
/* Variables and functions */
float __nv_frcp_rz(float);
float __frcp_rz(float __a) { return __nv_frcp_rz(__a); }


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

x86 assembly (clang, -O2):
<__frcp_rz>:
jmp    1030 <__nv_frcp_rz@plt>

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

LLVM IR (-O2):
define float @__frcp_rz(float %0) {
%2 = tail call float @__nv_frcp_rz(float %0)
ret float %2
}
int test_imm_74uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x74 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_74uint64_highword_mem>:
testb  $0x74,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

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


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double getWallTime() {
  struct timeval time;
  gettimeofday(&time, NULL);
  return (double)time.tv_sec + (double)time.tv_usec * .000001;
}


x86 assembly (clang, -O0):
<getWallTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm1
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xec7(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getWallTime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
mulsd  0xeca(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @getWallTime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %9
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @getWallTime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0x3EB0C6F7A0B5ED8D, double %6)
ret double %10
}
double SFMMPCToKPH(double mpc) {
  return (mpc * (3.6 * (double)(1000 * 1000) / 1000000.0));
}


x86 assembly (clang, -O0):
<SFMMPCToKPH>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @SFMMPCToKPH(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 3.600000e+00
ret double %4
}

LLVM IR (-O2):
define double @SFMMPCToKPH(double %0) {
%2 = fmul double %0, 3.600000e+00
ret double %2
}
/* Type definitions */
typedef scalar_t__ uint64_t;
typedef int int8_t;

/* Variables and functions */
int8_t compare_uint64_t(uint64_t a, uint64_t b) {
  return (a < b) ? -1 : (a > b);
}


x86 assembly (clang, -O0):
<compare_uint64_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <compare_uint64_t+0x27>
mov    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    113a <compare_uint64_t+0x3a>
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_uint64_t>:
xor    %ecx,%ecx
cmp    %rsi,%rdi
setg   %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_uint64_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %9
8: ; preds = %2
br label %14
9: ; preds = %2
%10 = load i64, i64* %3
%11 = load i64, i64* %4
%12 = icmp sgt i64 %10, %11
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %9, %8
%15 = phi i32 [ -1, %8 ], [ %13, %9 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @compare_uint64_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = icmp sgt i64 %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_lvector(long *v, long nl, long nh) { free((char *)(v + nl - 1)); }


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

x86 assembly (clang, -O2):
<free_lvector>:
lea    (%rdi,%rsi,8),%rdi
add    $0xfffffffffffffff8,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_lvector(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 i64*, i64** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds i64, i64* %7, i64 %8
%10 = getelementptr inbounds i64, i64* %9, i64 -1
%11 = bitcast i64* %10 to i8*
%12 = call i32 @free(i8* %11)
ret void
}

LLVM IR (-O2):
define void @free_lvector(i64* nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i64, i64* %0, i64 %1
%5 = getelementptr inbounds i64, i64* %4, i64 -1
%6 = bitcast i64* %5 to i8*
%7 = tail call i32 @free(i8* %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t floatToRawIntBits(float d) {
  union {
    float f;
    int32_t i;
  } tmp;
  tmp.f = d;
  return tmp.i;
}


x86 assembly (clang, -O0):
<floatToRawIntBits>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<floatToRawIntBits>:
movd   %xmm0,%eax
ret

LLVM IR (-O0):
%union.anon = type { float }
define i32 @floatToRawIntBits(float %0) {
%2 = alloca float
%3 = alloca %union.anon
store float %0, float* %2
%4 = load float, float* %2
%5 = bitcast %union.anon* %3 to float*
store float %4, float* %5
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @floatToRawIntBits(float %0) {
%2 = bitcast float %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printBST(void *num1) {
  printf("%4d\n", *(int *)num1);
  return;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%4d\0A\00"
define void @printBST(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
long int getMilli(long int t) { return (t % 1000000000) / 1000000; }


x86 assembly (clang, -O0):
<getMilli>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3b9aca00,%ecx
cqto
idiv   %rcx
mov    %rdx,%rax
mov    $0xf4240,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMilli>:
movabs $0x112e0be826d694b3,%rcx
0b 2e 11
mov    %rdi,%rax
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x1a,%rdx
add    %eax,%edx
imul   $0x3b9aca00,%edx,%eax
sub    %eax,%edi
movslq %edi,%rax
imul   $0x431bde83,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x32,%rax
add    %ecx,%eax
cltq
ret

LLVM IR (-O0):
define i64 @getMilli(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = srem i64 %3, 1000000000
%5 = sdiv i64 %4, 1000000
ret i64 %5
}

LLVM IR (-O2):
define i64 @getMilli(i64 %0) {
%2 = srem i64 %0, 1000000000
%3 = trunc i64 %2 to i32
%4 = sdiv i32 %3, 1000000
%5 = sext i32 %4 to i64
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ AUTHORITY_INFO_ACCESS;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ AUTHORITY_INFO_ACCESS_it;
AUTHORITY_INFO_ACCESS *AUTHORITY_INFO_ACCESS_new(void) {
  return (AUTHORITY_INFO_ACCESS *)ASN1_item_new(&AUTHORITY_INFO_ACCESS_it);
}


x86 assembly (clang, -O0):
<AUTHORITY_INFO_ACCESS_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AUTHORITY_INFO_ACCESS_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@AUTHORITY_INFO_ACCESS_it = global i32 0
define i32* @AUTHORITY_INFO_ACCESS_new() {
%1 = call i64 @ASN1_item_new(i32* @AUTHORITY_INFO_ACCESS_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@AUTHORITY_INFO_ACCESS_it = global i32 0
define i32* @AUTHORITY_INFO_ACCESS_new() {
%1 = tail call i64 @ASN1_item_new(i32* @AUTHORITY_INFO_ACCESS_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ gen_select(int, int, int);
int mksym_i32();
int select(int, int);
void test_SELECT() {
  int x = 0, y = 2;
  x = mksym_i32();
  y = mksym_i32();
  int r = select(x, y);
  gen_select(x, y, r);
}


x86 assembly (clang, -O0):
<test_SELECT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    $0x0,%al
call   1030 <mksym_i32@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <mksym_i32@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <select@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1050 <gen_select@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_SELECT>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <mksym_i32@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <mksym_i32@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <select@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <gen_select@plt>

LLVM IR (-O0):
define void @test_SELECT() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
%4 = call i32 (...) @mksym_i32()
store i32 %4, i32* %1
%5 = call i32 (...) @mksym_i32()
store i32 %5, i32* %2
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @select(i32 %6, i32 %7)
store i32 %8, i32* %3
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 @gen_select(i32 %9, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @test_SELECT() {
%1 = tail call i32 (...) @mksym_i32()
%2 = tail call i32 (...) @mksym_i32()
%3 = tail call i32 @select(i32 %1, i32 %2)
%4 = tail call i32 @gen_select(i32 %1, i32 %2, i32 %3)
ret void
}
void av_vorbis_parse_reset() {}


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

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

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

LLVM IR (-O2):
define void @av_vorbis_parse_reset() {
ret void
}
void clearbuf(char *buf) {
  while (*buf) {
    *buf = 0;
    buf++;
  }
}


x86 assembly (clang, -O0):
<clearbuf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     112d <clearbuf+0x2d>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <clearbuf+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clearbuf>:
cmpb   $0x0,(%rdi)
je     111d <clearbuf+0x1d>
add    $0x1,%rdi
nopl   0x0(%rax)
movb   $0x0,-0x1(%rdi)
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <clearbuf+0x10>
ret

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

LLVM IR (-O2):
define void @clearbuf(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i8* [ %6, %4 ], [ %0, %1 ]
store i8 0, i8* %5
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int putc(int, int /*<<< orphan*/ *);
int putnc(int character, int n, FILE *stream) {
  int r;
  while (n-- && (r = putc(character, stream)))
    ;
  return r;
}


x86 assembly (clang, -O0):
<putnc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    %ecx,%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
je     1153 <putnc+0x43>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <putc@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1163 <putnc+0x53>
jmp    1168 <putnc+0x58>
jmp    1122 <putnc+0x12>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putnc>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
je     1135 <putnc+0x25>
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
nop
mov    %ebx,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
test   %eax,%eax
je     1137 <putnc+0x27>
add    $0xffffffff,%ebp
jne    1120 <putnc+0x10>
jmp    1139 <putnc+0x29>
jmp    1139 <putnc+0x29>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @putnc(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
br label %8
8: ; preds = %19, %3
%9 = load i32, i32* %5
%10 = add nsw i32 %9, -1
store i32 %10, i32* %5
%11 = icmp ne i32 %9, 0
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = load i32, i32* %4
%14 = load i32*, i32** %6
%15 = call i32 @putc(i32 %13, i32* %14)
store i32 %15, i32* %7
%16 = icmp ne i32 %15, 0
br label %17
17: ; preds = %12, %8
%18 = phi i1 [ false, %8 ], [ %16, %12 ]
br i1 %18, label %19, label %20
19: ; preds = %17
br label %8
20: ; preds = %17
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @putnc(i32 %0, i32 %1, i32* nocapture %2) {
%4 = icmp eq i32 %1, 0
br i1 %4, label %12, label %7
5: ; preds = %7
%6 = icmp eq i32 %9, 0
br i1 %6, label %12, label %7
7: ; preds = %3, %5
%8 = phi i32 [ %9, %5 ], [ %1, %3 ]
%9 = add nsw i32 %8, -1
%10 = tail call i32 @putc(i32 %0, i32* %2)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %7, %5, %3
%13 = phi i32 [ undef, %3 ], [ %10, %5 ], [ 0, %7 ]
ret i32 %13
}
/* Variables and functions */
int db_get_raw(void *, char const *, scalar_t__, void *, int);
scalar_t__ strlen(char const *);
int db_get(void *dbh, const char *keystr, void *val, int len) {
  return db_get_raw(dbh, keystr, strlen(keystr) + 1, val, len);
}


x86 assembly (clang, -O0):
<db_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1030 <db_get_raw@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_get>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rcx
mov    %r14d,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <db_get_raw@plt>

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

LLVM IR (-O2):
define i32 @db_get(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%6 = add nsw i64 %5, 1
%7 = tail call i32 @db_get_raw(i8* %0, i8* %1, i64 %6, i8* %2, i32 %3)
ret i32 %7
}
/* Type definitions */
struct union_find_set {
  int dummy;
};

/* Variables and functions */
scalar_t__ uf_set_find(struct union_find_set *, int);
bool uf_set_connected(struct union_find_set *s, int i, int j) {
  return uf_set_find(s, i) == uf_set_find(s, j);
}


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

x86 assembly (clang, -O2):
<uf_set_connected>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rdi,%rbx
call   1030 <uf_set_find@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    %r14d,%esi
call   1030 <uf_set_find@plt>
xor    %ecx,%ecx
cmp    %rax,%rbp
sete   %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.union_find_set = type { i32 }
define i32 @uf_set_connected(%struct.union_find_set* %0, i32 %1, i32 %2) {
%4 = alloca %struct.union_find_set*
%5 = alloca i32
%6 = alloca i32
store %struct.union_find_set* %0, %struct.union_find_set** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.union_find_set*, %struct.union_find_set** %4
%8 = load i32, i32* %5
%9 = call i64 @uf_set_find(%struct.union_find_set* %7, i32 %8)
%10 = load %struct.union_find_set*, %struct.union_find_set** %4
%11 = load i32, i32* %6
%12 = call i64 @uf_set_find(%struct.union_find_set* %10, i32 %11)
%13 = icmp eq i64 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
%struct.union_find_set = type { i32 }
define i32 @uf_set_connected(%struct.union_find_set* %0, i32 %1, i32 %2) {
%4 = tail call i64 @uf_set_find(%struct.union_find_set* %0, i32 %1)
%5 = tail call i64 @uf_set_find(%struct.union_find_set* %0, i32 %2)
%6 = icmp eq i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
double calcJDFromJulianCent(double t) {
  double JD = t * 36525.0 + 2451545.0;
  return JD;
}


x86 assembly (clang, -O0):
<calcJDFromJulianCent>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcJDFromJulianCent>:
mulsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @calcJDFromJulianCent(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @llvm.fmuladd.f64(double %4, double 3.652500e+04, double 0x4142B42C80000000)
store double %5, double* %3
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @calcJDFromJulianCent(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 3.652500e+04, double 0x4142B42C80000000)
ret double %2
}
/* Variables and functions */
int SIGINT;
int /*<<< orphan*/ print_history();
int /*<<< orphan*/ printf(char *, ...);
char *strsignal(int);
void handle_sigint(int signal_id) {
  if (signal_id == SIGINT) {
    printf("\n");
    print_history();
  } else {
    printf("%s\n", strsignal(signal_id));
  }
}


x86 assembly (clang, -O0):
<handle_sigint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%eax
jne    1167 <handle_sigint+0x37>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <print_history@plt>
jmp    1180 <handle_sigint+0x50>
mov    -0x4(%rbp),%edi
call   1050 <strsignal@plt>
mov    %rax,%rsi
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_sigint>:
push   %rax
mov    0x2ea0(%rip),%rax
cmp    %edi,(%rax)
jne    115e <handle_sigint+0x1e>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <print_history@plt>
call   1060 <strsignal@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@.str = [2 x i8] c"\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @handle_sigint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @print_history()
br label %13
9: ; preds = %1
%10 = load i32, i32* %2
%11 = call i8* @strsignal(i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
define void @handle_sigint(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 (...) @print_history()
br label %10
7: ; preds = %1
%8 = tail call i8* @strsignal(i32 %0)
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
br label %10
10: ; preds = %7, %4
ret void
}
void setval_450(unsigned *p) { *p = 3372797449U; }


x86 assembly (clang, -O0):
<setval_450>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xc908ce09,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setval_450>:
movl   $0xc908ce09,(%rdi)
ret

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

LLVM IR (-O2):
define void @setval_450(i32* nocapture writeonly %0) {
store i32 -922169847, i32* %0
ret void
}
void foo_1_1_2_1_2_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_2_1_2_1_1_1_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void printd_aux(int n) {
  if (n < 0) {
    putchar('-');
    n = -n;
  }
  if (n / 10)
    printd_aux(n / 10);
  putchar('0' + n % 10);
}


x86 assembly (clang, -O0):
<printd_aux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1147 <printd_aux+0x27>
mov    $0x2d,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     116d <printd_aux+0x4d>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <printd_aux@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x30,%edi
call   1040 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printd_aux>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
test   %edi,%edi
jns    1136 <printd_aux+0x16>
mov    $0x2d,%edi
call   1040 <putchar@plt>
neg    %ebx
mov    %ebx,%r14d
cmp    $0xa,%ebx
jb     1150 <printd_aux+0x30>
mov    $0xcccccccd,%edi
imul   %r14,%rdi
shr    $0x23,%rdi
call   1030 <printd_aux@plt>
mov    $0xcccccccd,%eax
imul   %r14,%rax
shr    $0x23,%rax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
or     $0x30,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <putchar@plt>

LLVM IR (-O0):
define void @printd_aux(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 @putchar(i32 45)
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %9
9: ; preds = %5, %1
%10 = load i32, i32* %2
%11 = sdiv i32 %10, 10
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i32, i32* %2
%15 = sdiv i32 %14, 10
br label %16
16: ; preds = %13, %9
%17 = load i32, i32* %2
%18 = srem i32 %17, 10
%19 = add nsw i32 48, %18
%20 = call i32 @putchar(i32 %19)
ret void
}

LLVM IR (-O2):
define void @printd_aux(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @putchar(i32 45)
%5 = sub nsw i32 0, %0
br label %6
6: ; preds = %3, %1
%7 = phi i32 [ %5, %3 ], [ %0, %1 ]
%8 = icmp ult i32 %7, 10
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = udiv i32 %7, 10
tail call void @printd_aux(i32 %10)
br label %11
11: ; preds = %9, %6
%12 = urem i32 %7, 10
%13 = or i32 %12, 48
%14 = tail call i32 @putchar(i32 %13)
ret void
}
/* Variables and functions */
double fabs(double);
double _linear_kernel(double x) {
  x = fabs(x);
  if (x < 1.0)
    return 1.0 - x;
  return 0;
}


x86 assembly (clang, -O0):
<_linear_kernel>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movaps 0xefb(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeda(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1148 <_linear_kernel+0x48>
movsd  0xec7(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1150 <_linear_kernel+0x50>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_linear_kernel>:
andpd  0xef8(%rip),%xmm0
movsd  0xf00(%rip),%xmm1
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
cmpltsd %xmm1,%xmm0
andpd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @_linear_kernel(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = call double @llvm.fabs.f64(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = fcmp olt double %6, 1.000000e+00
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load double, double* %3
%10 = fsub double 1.000000e+00, %9
store double %10, double* %2
br label %12
11: ; preds = %1
store double 0.000000e+00, double* %2
br label %12
12: ; preds = %11, %8
%13 = load double, double* %2
ret double %13
}

LLVM IR (-O2):
define double @_linear_kernel(double %0) {
%2 = tail call double @llvm.fabs.f64(double %0)
%3 = fcmp olt double %2, 1.000000e+00
%4 = fsub double 1.000000e+00, %2
%5 = select i1 %3, double %4, double 0.000000e+00
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stdout;
int vfprintf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int vprintf(const char *restrict format, va_list ap) {
  return vfprintf(stdout, format, ap);
}


x86 assembly (clang, -O0):
<vprintf>:
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),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vfprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vprintf>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vfprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @vprintf(i8* noalias %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdout
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @vfprintf(i32 %5, i8* %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @vprintf(i8* noalias %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x88() {
  Assert_real((iscntrl(136) == 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",
              685, ("iscntrl should be 0 for 0x88"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x88>:
push   %rax
mov    $0x88,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2ad,%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 0x88\00"
define void @t_iscntrl_0x88() {
%1 = call i64 @iscntrl(i32 136)
%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 685, 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 0x88\00"
define void @t_iscntrl_0x88() {
%1 = tail call i64 @iscntrl(i32 136)
%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 685, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_2Euint8_reg(unsigned char val) {
  return ((val) & (-0x2E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Euint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffffd2,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Euint8_reg>:
test   $0xd2,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_2Euint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -46
%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_2Euint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -46
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}