xunge/DecIR huggingface dataset:
unsigned int U8TOU32(const unsigned char *p) {
  return (((unsigned int)(p[0] & 0xff)) | ((unsigned int)(p[1] & 0xff) << 8) |
          ((unsigned int)(p[2] & 0xff) << 16) |
          ((unsigned int)(p[3] & 0xff) << 24));
}


x86 assembly (clang, -O0):
<U8TOU32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
and    $0xff,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
and    $0xff,%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @U8TOU32(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = and i32 %6, 255
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = and i32 %11, 255
%13 = shl i32 %12, 8
%14 = or i32 %7, %13
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 2
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = and i32 %18, 255
%20 = shl i32 %19, 16
%21 = or i32 %14, %20
%22 = load i8*, i8** %2
%23 = getelementptr inbounds i8, i8* %22, i64 3
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = and i32 %25, 255
%27 = shl i32 %26, 24
%28 = or i32 %21, %27
ret i32 %28
}

LLVM IR (-O2):
define i32 @U8TOU32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void hi() {
  putchar('h');
  putchar('i');
}


x86 assembly (clang, -O0):
<hi>:
push   %rbp
mov    %rsp,%rbp
mov    $0x68,%edi
call   1030 <putchar@plt>
mov    $0x69,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hi>:
push   %rax
mov    $0x68,%edi
call   1030 <putchar@plt>
mov    $0x69,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @hi() {
%1 = call i32 @putchar(i8 signext 104)
%2 = call i32 @putchar(i8 signext 105)
ret void
}

LLVM IR (-O2):
define void @hi() {
%1 = tail call i32 @putchar(i8 signext 104)
%2 = tail call i32 @putchar(i8 signext 105)
ret void
}
long Interpolate(long p, long p1, long p2, long v1, long v2) {
  long dp, dv, di;
  if (p1 == p2)
    return v1;
  dv = v2 - v1;
  dp = p2 - p1;
  di = p - p1;
  return v1 + ((long)(di * dv) / dp);
}


x86 assembly (clang, -O0):
<Interpolate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jne    1133 <Interpolate+0x33>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    117c <Interpolate+0x7c>
mov    -0x30(%rbp),%rax
sub    -0x28(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x20(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x48(%rbp),%rax
imul   -0x40(%rbp),%rax
cqto
idivq  -0x38(%rbp)
mov    %rax,%rcx
mov    -0x50(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interpolate>:
mov    %rcx,%r9
mov    %rdx,%rcx
sub    %rsi,%rcx
je     1134 <Interpolate+0x34>
sub    %r9,%r8
sub    %rsi,%rdi
imul   %r8,%rdi
mov    %rdi,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     112b <Interpolate+0x2b>
mov    %rdi,%rax
cqto
idiv   %rcx
jmp    1131 <Interpolate+0x31>
mov    %edi,%eax
xor    %edx,%edx
div    %ecx
add    %rax,%r9
mov    %r9,%rax
ret

LLVM IR (-O0):
define i64 @Interpolate(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
store i64 %0, i64* %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i64 %3, i64* %10
store i64 %4, i64* %11
%15 = load i64, i64* %8
%16 = load i64, i64* %9
%17 = icmp eq i64 %15, %16
br i1 %17, label %18, label %20
18: ; preds = %5
%19 = load i64, i64* %10
store i64 %19, i64* %6
br label %37
20: ; preds = %5
%21 = load i64, i64* %11
%22 = load i64, i64* %10
%23 = sub nsw i64 %21, %22
store i64 %23, i64* %13
%24 = load i64, i64* %9
%25 = load i64, i64* %8
%26 = sub nsw i64 %24, %25
store i64 %26, i64* %12
%27 = load i64, i64* %7
%28 = load i64, i64* %8
%29 = sub nsw i64 %27, %28
store i64 %29, i64* %14
%30 = load i64, i64* %10
%31 = load i64, i64* %14
%32 = load i64, i64* %13
%33 = mul nsw i64 %31, %32
%34 = load i64, i64* %12
%35 = sdiv i64 %33, %34
%36 = add nsw i64 %30, %35
store i64 %36, i64* %6
br label %37
37: ; preds = %20, %18
%38 = load i64, i64* %6
ret i64 %38
}

LLVM IR (-O2):
define i64 @Interpolate(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = icmp eq i64 %2, %1
br i1 %6, label %14, label %7
7: ; preds = %5
%8 = sub nsw i64 %4, %3
%9 = sub nsw i64 %2, %1
%10 = sub nsw i64 %0, %1
%11 = mul nsw i64 %8, %10
%12 = sdiv i64 %11, %9
%13 = add nsw i64 %12, %3
br label %14
14: ; preds = %5, %7
%15 = phi i64 [ %13, %7 ], [ %3, %5 ]
ret i64 %15
}
void mt_trace_SoftIRQ_start(int id) {}


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

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

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

LLVM IR (-O2):
define void @mt_trace_SoftIRQ_start(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int search(int *, int, int);
int main(void) {
  int test[6] = {-1, 0, 3, 5, 9, 12};
  printf("possible index = %d\n", search(test, 6, 2));
  printf("possible index = %d\n", search(test, 6, 9));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x6,%esi
mov    $0x2,%edx
call   1040 <search@plt>
mov    %eax,%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    $0x6,%esi
mov    $0x9,%edx
call   1040 <search@plt>
mov    %eax,%esi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    0xee2(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x6,%esi
mov    $0x2,%edx
call   1040 <search@plt>
lea    0xebe(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x6,%esi
mov    $0x9,%edx
call   1040 <search@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.test = [6 x i32] [i32 -1, i32 0, i32 3, i32 5, i32 9, i32 12]
@.str = [21 x i8] c"possible index = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
store i32 0, i32* %1
%3 = bitcast [6 x i32]* %2 to i8*
%4 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%5 = call i32 @search(i32* %4, i32 6, i32 2)
%6 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 0
%8 = call i32 @search(i32* %7, i32 6, i32 9)
%9 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.test = [6 x i32] [i32 -1, i32 0, i32 3, i32 5, i32 9, i32 12]
@.str = [21 x i8] c"possible index = %d\0A\00"
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @search(i32* %3, i32 6, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 @search(i32* %3, i32 6, i32 9)
%7 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ FOURCC(char, char, char, char);
int /*<<< orphan*/ NodeUnRegisterClass(int /*<<< orphan*/);
void ASF_Done() {
  NodeUnRegisterClass(FOURCC('R', 'A', 'S', 'F'));
  NodeUnRegisterClass(FOURCC('R', 'A', 'S', 'H'));
}


x86 assembly (clang, -O0):
<ASF_Done>:
push   %rbp
mov    %rsp,%rbp
mov    $0x52,%edi
mov    $0x41,%esi
mov    $0x53,%edx
mov    $0x46,%ecx
call   1030 <FOURCC@plt>
mov    %eax,%edi
call   1040 <NodeUnRegisterClass@plt>
mov    $0x52,%edi
mov    $0x41,%esi
mov    $0x53,%edx
mov    $0x48,%ecx
call   1030 <FOURCC@plt>
mov    %eax,%edi
call   1040 <NodeUnRegisterClass@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASF_Done>:
push   %rax
mov    $0x52,%edi
mov    $0x41,%esi
mov    $0x53,%edx
mov    $0x46,%ecx
call   1030 <FOURCC@plt>
mov    %eax,%edi
call   1040 <NodeUnRegisterClass@plt>
mov    $0x52,%edi
mov    $0x41,%esi
mov    $0x53,%edx
mov    $0x48,%ecx
call   1030 <FOURCC@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <NodeUnRegisterClass@plt>

LLVM IR (-O0):
define void @ASF_Done() {
%1 = call i32 @FOURCC(i8 signext 82, i8 signext 65, i8 signext 83, i8 signext 70)
%2 = call i32 @NodeUnRegisterClass(i32 %1)
%3 = call i32 @FOURCC(i8 signext 82, i8 signext 65, i8 signext 83, i8 signext 72)
%4 = call i32 @NodeUnRegisterClass(i32 %3)
ret void
}

LLVM IR (-O2):
define void @ASF_Done() {
%1 = tail call i32 @FOURCC(i8 signext 82, i8 signext 65, i8 signext 83, i8 signext 70)
%2 = tail call i32 @NodeUnRegisterClass(i32 %1)
%3 = tail call i32 @FOURCC(i8 signext 82, i8 signext 65, i8 signext 83, i8 signext 72)
%4 = tail call i32 @NodeUnRegisterClass(i32 %3)
ret void
}
void coresight_cti_reset(struct coresight_cti *cti) {}


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

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

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

LLVM IR (-O2):
%struct.coresight_cti = type opaque
define void @coresight_cti_reset(%struct.coresight_cti* nocapture %0) {
ret void
}
int ft_iscalc(char c) {
  return (('0' <= c && c <= '9') || c == '-' || c == '+');
}


x86 assembly (clang, -O0):
<ft_iscalc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     112d <ft_iscalc+0x2d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    114c <ft_iscalc+0x4c>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     114c <ft_iscalc+0x4c>
movsbl -0x1(%rbp),%eax
cmp    $0x2b,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_iscalc>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
cmp    $0x2d,%dil
sete   %cl
cmp    $0x2b,%dil
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @ft_iscalc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 48, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br i1 %9, label %18, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 45
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 43
br label %18
18: ; preds = %14, %10, %6
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @ft_iscalc(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = icmp eq i8 %0, 45
%5 = or i1 %4, %3
%6 = icmp eq i8 %0, 43
%7 = or i1 %6, %5
%8 = zext i1 %7 to i32
ret i32 %8
}
unsigned int str_to_uint(char *s) {
  unsigned int n = 0;
  while (*s) {
    if (*s > 47 && *s < 58)
      n = 10 * n + (*s - '0');
    s++;
  }
  return n;
}


x86 assembly (clang, -O0):
<str_to_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1160 <str_to_uint+0x60>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jle    114f <str_to_uint+0x4f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jge    114f <str_to_uint+0x4f>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <str_to_uint+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_to_uint>:
mov    (%rdi),%dl
test   %dl,%dl
je     1131 <str_to_uint+0x31>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl %dl,%eax
lea    -0x30(%rax),%edx
cmp    $0xa,%dl
lea    (%rcx,%rcx,4),%edx
lea    -0x30(%rax,%rdx,2),%eax
cmovae %ecx,%eax
movzbl (%rdi),%edx
add    $0x1,%rdi
mov    %eax,%ecx
test   %dl,%dl
jne    1110 <str_to_uint+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @str_to_uint(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %26, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %29
8: ; preds = %4
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sgt i32 %11, 47
br i1 %12, label %13, label %26
13: ; preds = %8
%14 = load i8*, i8** %2
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp slt i32 %16, 58
br i1 %17, label %18, label %26
18: ; preds = %13
%19 = load i32, i32* %3
%20 = mul i32 10, %19
%21 = load i8*, i8** %2
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = sub nsw i32 %23, 48
%25 = add i32 %20, %24
store i32 %25, i32* %3
br label %26
26: ; preds = %18, %13, %8
%27 = load i8*, i8** %2
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %2
br label %4
29: ; preds = %4
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
define i32 @str_to_uint(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %18, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %16, %4 ], [ %2, %1 ]
%6 = phi i32 [ %14, %4 ], [ 0, %1 ]
%7 = phi i8* [ %15, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = add i8 %5, -48
%10 = icmp ult i8 %9, 10
%11 = mul i32 %6, 10
%12 = add i32 %11, -48
%13 = add i32 %12, %8
%14 = select i1 %10, i32 %13, i32 %6
%15 = getelementptr inbounds i8, i8* %7, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %4
18: ; preds = %4, %1
%19 = phi i32 [ 0, %1 ], [ %14, %4 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ randombytes_fallback(unsigned char *, size_t);
void randombytes(unsigned char *buf, size_t buflen) {
  randombytes_fallback(buf, buflen);
}


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

x86 assembly (clang, -O2):
<randombytes>:
jmp    1030 <randombytes_fallback@plt>

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

LLVM IR (-O2):
define void @randombytes(i8* %0, i64 %1) {
%3 = tail call i32 @randombytes_fallback(i8* %0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_ocaml_comment_entities();
int /*<<< orphan*/ test_ocaml_comments();
void all_ocaml_tests() {
  test_ocaml_comments();
  test_ocaml_comment_entities();
}


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

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

LLVM IR (-O0):
define void @all_ocaml_tests() {
%1 = call i32 (...) @test_ocaml_comments()
%2 = call i32 (...) @test_ocaml_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_ocaml_tests() {
%1 = tail call i32 (...) @test_ocaml_comments()
%2 = tail call i32 (...) @test_ocaml_comment_entities()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_16(int /*<<< orphan*/ const *, int);
uint16_t bnep_event_channel_opened_get_bnep_cid(const uint8_t *event) {
  return little_endian_read_16(event, 3);
}


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

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

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

LLVM IR (-O2):
define i32 @bnep_event_channel_opened_get_bnep_cid(i32* %0) {
%2 = tail call i32 @little_endian_read_16(i32* %0, i32 3)
ret i32 %2
}
void ff_hevc_put_hevc_epel_h32_8_sse4() {}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @foo_2_1_2_2_2_1_1_1_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AssertFailure(char *, int);
void SysCtlLDOConfigSet(unsigned long ulConfig) {
  {
    if (!((ulConfig == 0x00000001) || (ulConfig == 0x00000000))) {
      AssertFailure(
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/"
          "Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/sysctl.c",
          1643);
    }
  };
  (*((volatile unsigned long *)(0x400FE160))) = ulConfig;
}


x86 assembly (clang, -O0):
<SysCtlLDOConfigSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x1,-0x8(%rbp)
je     1143 <SysCtlLDOConfigSet+0x33>
cmpq   $0x0,-0x8(%rbp)
je     1143 <SysCtlLDOConfigSet+0x33>
lea    0xec7(%rip),%rdi
mov    $0x66b,%esi
call   1030 <AssertFailure@plt>
mov    -0x8(%rbp),%rcx
mov    $0x400fe160,%eax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlLDOConfigSet>:
push   %rbx
mov    %rdi,%rbx
cmp    $0x2,%rdi
jb     112b <SysCtlLDOConfigSet+0x1b>
lea    0xedf(%rip),%rdi
mov    $0x66b,%esi
call   1030 <AssertFailure@plt>
mov    %rbx,0x400fe160
40
pop    %rbx
ret

LLVM IR (-O0):
@.str = [200 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/sysctl.c\00"
define void @SysCtlLDOConfigSet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 1
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = call i32 @AssertFailure(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0), i32 1643)
br label %10
10: ; preds = %8, %5, %1
%11 = load i64, i64* %2
store volatile i64 %11, i64* inttoptr (i64 1074782560 to i64*)
ret void
}

LLVM IR (-O2):
@.str = [200 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AmesianX/OpenBLT/refs/heads/master/Target/Demo/ARMCM3_LM3S_EK_LM3S6965_Crossworks/Boot/lib/driverlib/sysctl.c\00"
define void @SysCtlLDOConfigSet(i64 %0) {
%2 = icmp ult i64 %0, 2
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @AssertFailure(i8* getelementptr inbounds ([200 x i8], [200 x i8]* @.str, i64 0, i64 0), i32 1643)
br label %5
5: ; preds = %3, %1
store volatile i64 %0, i64* inttoptr (i64 1074782560 to i64*)
ret void
}
/* Variables and functions */
char *getmem_temp(scalar_t__);
char *strcpy(char *, char *);
scalar_t__ strlen(char *);
char *quickstrdup_temp(char *s) {
  char *r = getmem_temp(strlen(s) + 1);
  return strcpy(r, s);
}


x86 assembly (clang, -O0):
<quickstrdup_temp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <getmem_temp@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quickstrdup_temp>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <getmem_temp@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @quickstrdup_temp(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @getmem_temp(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i8* @strcpy(i8* %8, i8* %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @quickstrdup_temp(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @getmem_temp(i64 %3)
%5 = tail call i8* @strcpy(i8* dereferenceable(1) %4, i8* dereferenceable(1) %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ io_png_write_f32(char const *, float const *, int, int, int);
void printrgb(const float *rgb, int w, int h, const char *name) {
  io_png_write_f32(name, rgb, w, h, 3);
}


x86 assembly (clang, -O0):
<printrgb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    $0x3,%r8d
call   1030 <io_png_write_f32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printrgb>:
mov    %edx,%eax
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rcx,%rdi
mov    %eax,%ecx
mov    $0x3,%r8d
jmp    1030 <io_png_write_f32@plt>

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

LLVM IR (-O2):
define void @printrgb(float* %0, i32 %1, i32 %2, i8* %3) {
%5 = tail call i32 @io_png_write_f32(i8* %3, float* %0, i32 %1, i32 %2, i32 3)
ret void
}
/* Variables and functions */
scalar_t__ display_chunked_string(int /*<<< orphan*/);
int /*<<< orphan*/ tio_display_string(char *, int, int, int /*<<< orphan*/);
void op_dspnl() {
  if (display_chunked_string(0)) {
    tio_display_string("\n", 1, 1, 0);
  }
}


x86 assembly (clang, -O0):
<op_dspnl>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <display_chunked_string@plt>
cmp    $0x0,%rax
je     114a <op_dspnl+0x2a>
lea    0xec4(%rip),%rdi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %edx,%esi
call   1030 <tio_display_string@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_dspnl>:
push   %rax
xor    %edi,%edi
call   1040 <display_chunked_string@plt>
test   %rax,%rax
je     1146 <op_dspnl+0x26>
lea    0xecc(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
pop    %rax
jmp    1030 <tio_display_string@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @op_dspnl() {
%1 = call i64 @display_chunked_string(i32 0)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @tio_display_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 0)
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @op_dspnl() {
%1 = tail call i64 @display_chunked_string(i32 0)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @tio_display_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 0)
br label %5
5: ; preds = %3, %0
ret void
}
int test_imm_EDuint8_mem(unsigned char *val) {
  return ((*val) & (-0xED << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_EDuint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -237
%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_EDuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 19
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_hline_set(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_hline_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_hline_set+0x2a>
jmp    1170 <cmd_hline_set+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_hline_set>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_hline_set+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_hline_set(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
int f1(int a) { return a * 6 - a; }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x6,-0x4(%rbp),%eax
sub    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 6
%5 = load i32, i32* %2
%6 = sub nsw i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @f1(i32 %0) {
%2 = mul i32 %0, 5
ret i32 %2
}
int compare_int(int a, int b) {
  if (a < b) {
    return -1;
  }
  return 1;
}


x86 assembly (clang, -O0):
<compare_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1122 <compare_int+0x22>
movl   $0xffffffff,-0x4(%rbp)
jmp    1129 <compare_int+0x29>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_int>:
xor    %eax,%eax
cmp    %esi,%edi
setge  %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_int(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 -1, i32 1
ret i32 %4
}
/* Variables and functions */
int reverse(int);
bool isPalindrome(int x) {
  if (x < 0)
    return 0;
  if (x == reverse(x))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isPalindrome>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1131 <isPalindrome+0x21>
movl   $0x0,-0x4(%rbp)
jmp    115f <isPalindrome+0x4f>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <reverse@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cmp    %ecx,%eax
jne    1158 <isPalindrome+0x48>
movl   $0x1,-0x4(%rbp)
jmp    115f <isPalindrome+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPalindrome>:
test   %edi,%edi
js     1127 <isPalindrome+0x17>
push   %rbx
mov    %edi,%ebx
call   1030 <reverse@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ebx,%ecx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @isPalindrome(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @reverse(i32 %0)
%5 = icmp eq i32 %4, %0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
scalar_t__ tgamma(double);
long double tgammal(long double x) { return (long double)tgamma((double)x); }


x86 assembly (clang, -O0):
<tgammal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <tgamma@plt>
mov    %rax,-0x18(%rbp)
fildll -0x18(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tgammal>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <tgamma@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @tgammal(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call i64 @tgamma(double %4)
%6 = sitofp i64 %5 to x86_fp80
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @tgammal(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call i64 @tgamma(double %2)
%4 = sitofp i64 %3 to x86_fp80
ret x86_fp80 %4
}
/* Variables and functions */
int /*<<< orphan*/ acguard2l_(float *, int *, int *, int *, int *);
void cacguard2l(float cu[], int nx, int ny, int nxe, int nye) {
  acguard2l_(cu, &nx, &ny, &nxe, &nye);
  return;
}


x86 assembly (clang, -O0):
<cacguard2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x14(%rbp),%rcx
lea    -0x18(%rbp),%r8
call   1030 <acguard2l_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cacguard2l>:
sub    $0x18,%rsp
mov    %esi,0x14(%rsp)
mov    %edx,0x10(%rsp)
mov    %ecx,0xc(%rsp)
mov    %r8d,0x8(%rsp)
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1030 <acguard2l_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @cacguard2l(float* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca float*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store float* %0, float** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load float*, float** %6
%12 = call i32 @acguard2l_(float* %11, i32* %7, i32* %8, i32* %9, i32* %10)
ret void
}

LLVM IR (-O2):
define void @cacguard2l(float* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 %4, i32* %9
%10 = call i32 @acguard2l_(float* %0, i32* %6, i32* %7, i32* %8, i32* %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int kill(int pid, int sig) { exit(0xdead); }


x86 assembly (clang, -O0):
<kill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xdead,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<kill>:
push   %rax
mov    $0xdead,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @kill(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @exit(i32 57005)
unreachable
}

LLVM IR (-O2):
define i32 @kill(i32 %0, i32 %1) {
%3 = tail call i32 @exit(i32 57005)
unreachable
}
/* Type definitions */
struct client {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ audio_plist_get_serial();
int /*<<< orphan*/ send_data_int(struct client *, int /*<<< orphan*/);
int req_plist_get_serial(struct client *cli) {
  if (!send_data_int(cli, audio_plist_get_serial()))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<req_plist_get_serial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <audio_plist_get_serial@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <send_data_int@plt>
cmp    $0x0,%eax
jne    115b <req_plist_get_serial+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1162 <req_plist_get_serial+0x42>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<req_plist_get_serial>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <audio_plist_get_serial@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <send_data_int@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.client = type { i32 }
define i32 @req_plist_get_serial(%struct.client* %0) {
%2 = tail call i32 (...) @audio_plist_get_serial()
%3 = tail call i32 @send_data_int(%struct.client* %0, i32 %2)
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void collisions_search() {}


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

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

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

LLVM IR (-O2):
define void @collisions_search() {
ret void
}
/* Variables and functions */
const void *syslinux_getadv(int tag, size_t *size) { return NULL; }


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

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

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

LLVM IR (-O2):
define noalias i8* @syslinux_getadv(i32 %0, i64* nocapture readnone %1) {
ret i8* null
}
int $Sub$$_sys_istty(unsigned int *f) { return 1; }


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

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

LLVM IR (-O0):
define i32 @"$Sub$$_sys_istty"(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
ret i32 1
}

LLVM IR (-O2):
define i32 @"$Sub$$_sys_istty"(i32* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *);
int sys_arch_prctl(int, unsigned long);
int /*<<< orphan*/ sys_exit(int);
void *backend_get_tls(void) {
  unsigned long addr;
  int err;
  err = sys_arch_prctl(0x1003, (unsigned long)&addr);
  if (err) {
    debug("Failed to get FS\n");
    sys_exit(1);
  }
  return (void *)addr;
}


x86 assembly (clang, -O0):
<backend_get_tls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rsi
mov    $0x1003,%edi
call   1050 <sys_arch_prctl@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1169 <backend_get_tls+0x39>
lea    0xea6(%rip),%rdi
call   1040 <debug@plt>
mov    $0x1,%edi
call   1030 <sys_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<backend_get_tls>:
push   %rax
mov    %rsp,%rsi
mov    $0x1003,%edi
call   1050 <sys_arch_prctl@plt>
test   %eax,%eax
je     1158 <backend_get_tls+0x28>
lea    0xeb7(%rip),%rdi
call   1040 <debug@plt>
mov    $0x1,%edi
call   1030 <sys_exit@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Failed to get FS\0A\00"
define i8* @backend_get_tls() {
%1 = alloca i64
%2 = alloca i32
%3 = ptrtoint i64* %1 to i64
%4 = call i32 @sys_arch_prctl(i32 4099, i64 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 @debug(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @sys_exit(i32 1)
br label %10
10: ; preds = %7, %0
%11 = load i64, i64* %1
%12 = inttoptr i64 %11 to i8*
ret i8* %12
}

LLVM IR (-O2):
@.str = [18 x i8] c"Failed to get FS\0A\00"
define i8* @backend_get_tls() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = ptrtoint i64* %1 to i64
%4 = call i32 @sys_arch_prctl(i32 4099, i64 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = call i32 @debug(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @sys_exit(i32 1)
br label %9
9: ; preds = %6, %0
%10 = load i64, i64* %1
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}
void Sys_MakeCodeWriteable(void *start_addr, void *end_addr) {}


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

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

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

LLVM IR (-O2):
define void @Sys_MakeCodeWriteable(i8* nocapture %0, i8* nocapture %1) {
ret void
}
double geom_dV_cyl_rpz_B(double xm[], double xp[]) {
  return 0.5 * (xp[0] + xm[0]) * (xp[0] - xm[0]) * (xp[1] - xm[1]);
}


x86 assembly (clang, -O0):
<geom_dV_cyl_rpz_B>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
addsd  (%rax),%xmm1
movsd  0xedc(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_dV_cyl_rpz_B>:
movupd (%rsi),%xmm0
movupd (%rdi),%xmm1
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
mulsd  0xee8(%rip),%xmm2
subpd  %xmm1,%xmm0
mulsd  %xmm0,%xmm2
unpckhpd %xmm0,%xmm0
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @geom_dV_cyl_rpz_B(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %3
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = fadd double %7, %10
%12 = fmul double 5.000000e-01, %11
%13 = load double*, double** %4
%14 = getelementptr inbounds double, double* %13, i64 0
%15 = load double, double* %14
%16 = load double*, double** %3
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
%19 = fsub double %15, %18
%20 = fmul double %12, %19
%21 = load double*, double** %4
%22 = getelementptr inbounds double, double* %21, i64 1
%23 = load double, double* %22
%24 = load double*, double** %3
%25 = getelementptr inbounds double, double* %24, i64 1
%26 = load double, double* %25
%27 = fsub double %23, %26
%28 = fmul double %20, %27
ret double %28
}

LLVM IR (-O2):
define double @geom_dV_cyl_rpz_B(double* nocapture %0, double* nocapture %1) {
%3 = bitcast double* %1 to <2 x double>*
%4 = load <2 x double>, <2 x double>* %3
%5 = bitcast double* %0 to <2 x double>*
%6 = load <2 x double>, <2 x double>* %5
%7 = fadd <2 x double> %4, %6
%8 = extractelement <2 x double> %7, i64 0
%9 = fmul double %8, 5.000000e-01
%10 = fsub <2 x double> %4, %6
%11 = extractelement <2 x double> %10, i64 0
%12 = fmul double %11, %9
%13 = extractelement <2 x double> %10, i64 1
%14 = fmul double %12, %13
ret double %14
}
/* Variables and functions */
int /*<<< orphan*/ STcountBAll();
int /*<<< orphan*/ STshowAll();
void STinspect() {
  STshowAll();
  STcountBAll();
}


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

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

LLVM IR (-O0):
define void @STinspect() {
%1 = call i32 (...) @STshowAll()
%2 = call i32 (...) @STcountBAll()
ret void
}

LLVM IR (-O2):
define void @STinspect() {
%1 = tail call i32 (...) @STshowAll()
%2 = tail call i32 (...) @STcountBAll()
ret void
}
void test_islessequal(double x, double y, int true) {
  if (__builtin_islessequal(x, y)) {
    if (!true)
      abort();
  } else {
    if (true)
      abort();
  }
}


x86 assembly (clang, -O0):
<test_islessequal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     114d <test_islessequal+0x3d>
cmpl   $0x0,-0x14(%rbp)
jne    1148 <test_islessequal+0x38>
call   1030 <abort@plt>
jmp    1161 <test_islessequal+0x51>
cmpl   $0x0,-0x14(%rbp)
je     115c <test_islessequal+0x4c>
call   1030 <abort@plt>
jmp    1161 <test_islessequal+0x51>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_islessequal>:
push   %rax
ucomisd %xmm0,%xmm1
jae    1120 <test_islessequal+0x10>
test   %edi,%edi
je     1124 <test_islessequal+0x14>
call   1030 <abort@plt>
test   %edi,%edi
je     111b <test_islessequal+0xb>
pop    %rax
ret

LLVM IR (-O0):
define void @test_islessequal(double %0, double %1, i32 %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca i32
store double %0, double* %4
store double %1, double* %5
store i32 %2, i32* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fcmp ole double %7, %8
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i32, i32* %6
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %10
unreachable
14: ; preds = %10
br label %20
15: ; preds = %3
%16 = load i32, i32* %6
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %15
unreachable
19: ; preds = %15
br label %20
20: ; preds = %19, %14
ret void
}

LLVM IR (-O2):
define void @test_islessequal(double %0, double %1, i32 %2) {
%4 = fcmp ugt double %0, %1
%5 = icmp eq i32 %2, 0
br i1 %4, label %8, label %6
6: ; preds = %3
br i1 %5, label %7, label %10
7: ; preds = %6
tail call void @abort()
unreachable
8: ; preds = %3
br i1 %5, label %10, label %9
9: ; preds = %8
tail call void @abort()
unreachable
10: ; preds = %8, %6
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ cpi_fatalf(char *, int);
int pthread_mutex_unlock(int /*<<< orphan*/ *);
void unlock_mutex(pthread_mutex_t *mutex) {
  int ec;
  if ((ec = pthread_mutex_unlock(mutex))) {
    cpi_fatalf(("Could not unlock a mutex due to error %d."), ec);
  }
}


x86 assembly (clang, -O0):
<unlock_mutex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pthread_mutex_unlock@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
je     1150 <unlock_mutex+0x30>
mov    -0xc(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1040 <cpi_fatalf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlock_mutex>:
push   %rax
call   1030 <pthread_mutex_unlock@plt>
test   %eax,%eax
je     1139 <unlock_mutex+0x19>
lea    0xecf(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <cpi_fatalf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Could not unlock a mutex due to error %d.\00"
define void @unlock_mutex(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @pthread_mutex_unlock(i32* %4)
store i32 %5, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 @cpi_fatalf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Could not unlock a mutex due to error %d.\00"
define void @unlock_mutex(i32* %0) {
%2 = tail call i32 @pthread_mutex_unlock(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @cpi_fatalf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %6
6: ; preds = %4, %1
ret void
}