xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ GLUT_BITMAP_8_BY_13;
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glutSwapBuffers();
int /*<<< orphan*/ printstring(int /*<<< orphan*/, char *);
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT);
  printstring(GLUT_BITMAP_8_BY_13, "Chromium nullapp");
  glutSwapBuffers();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
call   1050 <printstring@plt>
mov    $0x0,%al
call   1040 <glutSwapBuffers@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
call   1050 <printstring@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glutSwapBuffers@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GLUT_BITMAP_8_BY_13 = global i32 0
@.str = [17 x i8] c"Chromium nullapp\00"
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = call i32 @glClear(i32 %1)
%3 = load i32, i32* @GLUT_BITMAP_8_BY_13
%4 = call i32 @printstring(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @glutSwapBuffers()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GLUT_BITMAP_8_BY_13 = global i32 0
@.str = [17 x i8] c"Chromium nullapp\00"
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = tail call i32 @glClear(i32 %1)
%3 = load i32, i32* @GLUT_BITMAP_8_BY_13
%4 = tail call i32 @printstring(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @glutSwapBuffers()
ret void
}
unsigned long HibernateRTCSSMatch0Get(void) {
  return ((*((volatile unsigned long *)(0x400FC028))) >> 16);
}


x86 assembly (clang, -O0):
<HibernateRTCSSMatch0Get>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fc028,%eax
mov    (%rax),%rax
shr    $0x10,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateRTCSSMatch0Get>:
mov    0x400fc028,%rax
40
shr    $0x10,%rax
ret

LLVM IR (-O0):
define i64 @HibernateRTCSSMatch0Get() {
%1 = load volatile i64, i64* inttoptr (i64 1074774056 to i64*)
%2 = lshr i64 %1, 16
ret i64 %2
}

LLVM IR (-O2):
define i64 @HibernateRTCSSMatch0Get() {
%1 = load volatile i64, i64* inttoptr (i64 1074774056 to i64*)
%2 = lshr i64 %1, 16
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void _copy_object(void *dest, void *orig, size_t objectSize) {
  dest += sizeof(void *);
  orig += sizeof(void *);
  objectSize -= sizeof(void *);
  memcpy(dest, orig, objectSize);
}


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

x86 assembly (clang, -O2):
<_copy_object>:
add    $0x8,%rdi
add    $0x8,%rsi
add    $0xfffffffffffffff8,%rdx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @_copy_object(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = getelementptr i8, i8* %7, i64 8
store i8* %8, i8** %4
%9 = load i8*, i8** %5
%10 = getelementptr i8, i8* %9, i64 8
store i8* %10, i8** %5
%11 = load i64, i64* %6
%12 = sub i64 %11, 8
store i64 %12, i64* %6
%13 = load i8*, i8** %4
%14 = load i8*, i8** %5
%15 = load i64, i64* %6
%16 = call i32 @memcpy(i8* %13, i8* %14, i64 %15)
ret void
}

LLVM IR (-O2):
define void @_copy_object(i8* %0, i8* %1, i64 %2) {
%4 = getelementptr i8, i8* %0, i64 8
%5 = getelementptr i8, i8* %1, i64 8
%6 = add i64 %2, -8
%7 = tail call i32 @memcpy(i8* %4, i8* %5, i64 %6)
ret void
}
void ff_hevc_put_hevc_uni_w_qpel_h32_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_h32_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  for (int i = 0, j = -50, k = i + j; i <= 100; i++, j++, k = i + j) {
    printf("%d\n", k);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0xffffffce,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x64,-0x14(%rbp)
jg     1176 <main+0x66>
mov    -0x1c(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    113d <main+0x2d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xffffffce,%ebx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x2,%ebx
cmp    $0x98,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 -50, i32* %7
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = add nsw i32 %9, %10
store i32 %11, i32* %8
br label %12
12: ; preds = %18, %2
%13 = load i32, i32* %6
%14 = icmp sle i32 %13, 100
br i1 %14, label %15, label %26
15: ; preds = %12
%16 = load i32, i32* %8
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = add nsw i32 %23, %24
store i32 %25, i32* %8
br label %12
26: ; preds = %12
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %4
3: ; preds = %4
ret i32 0
4: ; preds = %2, %4
%5 = phi i32 [ -50, %2 ], [ %11, %4 ]
%6 = phi i32 [ -50, %2 ], [ %10, %4 ]
%7 = phi i32 [ 0, %2 ], [ %9, %4 ]
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%9 = add nuw nsw i32 %7, 1
%10 = add nsw i32 %6, 1
%11 = add nsw i32 %10, %9
%12 = icmp eq i32 %9, 101
br i1 %12, label %3, label %4
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t littleEndian32(unsigned char b0, unsigned char b1, unsigned char b2,
                       unsigned char b3) {
  return (int32_t)b0 | ((int32_t)b1 << 8) | ((int32_t)b2 << 16) |
         ((int32_t)b3 << 24);
}


x86 assembly (clang, -O0):
<littleEndian32>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movzbl -0x3(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
movzbl -0x4(%rbp),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<littleEndian32>:
shl    $0x8,%esi
lea    (%rsi,%rdi,1),%eax
shl    $0x10,%edx
or     %edx,%eax
shl    $0x18,%ecx
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @littleEndian32(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = load i8, i8* %6
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %10, %13
%15 = load i8, i8* %7
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 16
%18 = or i32 %14, %17
%19 = load i8, i8* %8
%20 = zext i8 %19 to i32
%21 = shl i32 %20, 24
%22 = or i32 %18, %21
ret i32 %22
}

LLVM IR (-O2):
define i32 @littleEndian32(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = zext i8 %0 to i32
%6 = zext i8 %1 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %5
%9 = zext i8 %2 to i32
%10 = shl nuw nsw i32 %9, 16
%11 = or i32 %8, %10
%12 = zext i8 %3 to i32
%13 = shl nuw i32 %12, 24
%14 = or i32 %11, %13
ret i32 %14
}
/* Variables and functions */
bool is_valid_integer(int a) { return a > 0 && a < 4000; }


x86 assembly (clang, -O0):
<is_valid_integer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1123 <is_valid_integer+0x23>
cmpl   $0xfa0,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_integer>:
add    $0xffffffff,%edi
xor    %eax,%eax
cmp    $0xf9f,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_valid_integer(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 3999
%4 = zext i1 %3 to i32
ret i32 %4
}
int test_imm_2Bint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x2B << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_2Bint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 43
%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_2Bint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 2818048
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abs(int);
int floor(int /*<<< orphan*/);
int /*<<< orphan*/ log10(int /*<<< orphan*/);
int intlen(int i) {
  if (i == 0) {
    return 1;
  }
  return floor(log10(abs(i))) + 1;
}


x86 assembly (clang, -O0):
<intlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1151 <intlen+0x21>
movl   $0x1,-0x4(%rbp)
jmp    116d <intlen+0x3d>
mov    -0x8(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%edi
call   1040 <log10@plt>
mov    %eax,%edi
call   1050 <floor@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intlen>:
test   %edi,%edi
je     1142 <intlen+0x22>
push   %rax
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
mov    %eax,%edi
call   1030 <log10@plt>
mov    %eax,%edi
call   1040 <floor@plt>
add    $0x1,%eax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @intlen(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%5 = tail call i32 @log10(i32 %4)
%6 = tail call i32 @floor(i32 %5)
%7 = add nsw i32 %6, 1
br label %8
8: ; preds = %1, %3
%9 = phi i32 [ %7, %3 ], [ 1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ ClearONOFF();
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_9900(void) {
  DeinitFields();
  ClearONOFF();
}


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

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

LLVM IR (-O0):
define void @SwitchFrom_9900() {
%1 = call i32 (...) @DeinitFields()
%2 = call i32 (...) @ClearONOFF()
ret void
}

LLVM IR (-O2):
define void @SwitchFrom_9900() {
%1 = tail call i32 (...) @DeinitFields()
%2 = tail call i32 (...) @ClearONOFF()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int __fsetlocking(FILE *fp, int type) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__fsetlocking(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}
int isspace(int ch) {
  if ((ch == ' ') || (ch == '\t'))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
je     111b <isspace+0x1b>
cmpl   $0x9,-0x8(%rbp)
jne    1127 <isspace+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <isspace+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
cmp    $0x20,%edi
sete   %al
cmp    $0x9,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = icmp eq i32 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int __unorddf2(double a, double b) { return 0; }


x86 assembly (clang, -O0):
<__unorddf2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @__unorddf2(double %0, double %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ banner(char *);
int process(int, char **);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  setbuf(stdout, 0);
  if (argc < 2) {
    banner(argv[0]);
    return 0;
  }
  return process(argc, argv);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <setbuf@plt>
cmpl   $0x2,-0x8(%rbp)
jge    1178 <main+0x48>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <banner@plt>
movl   $0x0,-0x4(%rbp)
jmp    1187 <main+0x57>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <process@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <setbuf@plt>
cmp    $0x1,%ebp
jg     115e <main+0x2e>
mov    (%rbx),%rdi
call   1050 <banner@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <process@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdout
%7 = call i32 @setbuf(i32 %6, i32 0)
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 2
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 @banner(i8* %13)
store i32 0, i32* %3
br label %19
15: ; preds = %2
%16 = load i32, i32* %4
%17 = load i8**, i8*** %5
%18 = call i32 @process(i32 %16, i8** %17)
store i32 %18, i32* %3
br label %19
19: ; preds = %15, %10
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @setbuf(i32 %3, i32 0)
%5 = icmp slt i32 %0, 2
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i8*, i8** %1
%8 = tail call i32 @banner(i8* %7)
br label %11
9: ; preds = %2
%10 = tail call i32 @process(i32 %0, i8** %1)
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ 0, %6 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x2f() {
  Assert_real((isascii(47)),
              "/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_isascii.c",
              240, ("isascii should be 1 for /"));
}


x86 assembly (clang, -O0):
<t_isascii_0x2f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2f,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xf0,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x2f>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0xf0,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for /\00"
define void @t_isascii_0x2f() {
%1 = call i32 @isascii(i32 47)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 240, i8* getelementptr inbounds ([26 x i8], [26 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for /\00"
define void @t_isascii_0x2f() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 240, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void chacha20_predoit(void) {}


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

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

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

LLVM IR (-O2):
define void @chacha20_predoit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void display_status(int x) { printf("%d\n", x); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @display_status(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void platform_terminal_free(void) { puts("\x1b[?25l"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"\1B[?25l\00"
define void @platform_terminal_free() {
%1 = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B[?25l\00"
define void @platform_terminal_free() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void _exit() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <_PROCEDURE_LINKAGE_TABLE_@plt>

x86 assembly (clang, -O2):
<_exit>:
push   %rax
xor    %eax,%eax
call   1030 <_PROCEDURE_LINKAGE_TABLE_@plt>

LLVM IR (-O0):
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
unreachable
}

LLVM IR (-O2):
define void @_exit(i32 %0) {
%2 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIGRTMIN;
int /*<<< orphan*/ SIG_UNBLOCK;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int timer_unblock(void) {
  sigset_t mask;
  sigemptyset(&mask);
  sigaddset(&mask, SIGRTMIN);
  return sigprocmask(SIG_UNBLOCK, &mask, NULL);
}


x86 assembly (clang, -O0):
<timer_unblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_unblock>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <sigaddset@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIGRTMIN = global i32 0
@SIG_UNBLOCK = global i32 0
define i32 @timer_unblock() {
%1 = alloca i32
%2 = call i32 @sigemptyset(i32* %1)
%3 = load i32, i32* @SIGRTMIN
%4 = call i32 @sigaddset(i32* %1, i32 %3)
%5 = load i32, i32* @SIG_UNBLOCK
%6 = call i32 @sigprocmask(i32 %5, i32* %1, i32* null)
ret i32 %6
}

LLVM IR (-O2):
@SIGRTMIN = global i32 0
@SIG_UNBLOCK = global i32 0
define i32 @timer_unblock() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
%4 = load i32, i32* @SIGRTMIN
%5 = call i32 @sigaddset(i32* %1, i32 %4)
%6 = load i32, i32* @SIG_UNBLOCK
%7 = call i32 @sigprocmask(i32 %6, i32* %1, i32* null)
ret i32 %7
}
int scancmp(unsigned char bytes1[], unsigned char bytes2[], int len) {
  int i;
  for (i = 0; i < len; i++)
    if (bytes1[i] != bytes2[i])
      return -1;
  return 0;
}


x86 assembly (clang, -O0):
<scancmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1161 <scancmp+0x61>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     114e <scancmp+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <scancmp+0x68>
jmp    1153 <scancmp+0x53>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <scancmp+0x16>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scancmp>:
test   %edx,%edx
jle    1122 <scancmp+0x22>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rcx,1),%edx
cmp    (%rsi,%rcx,1),%dl
jne    1125 <scancmp+0x25>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <scancmp+0x10>
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @scancmp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %1, i64 %10
%14 = load i8, i8* %13
%15 = icmp eq i8 %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %7, label %17
17: ; preds = %9, %7, %3
%18 = phi i32 [ 0, %3 ], [ 0, %7 ], [ -1, %9 ]
ret i32 %18
}
int vde_chain_nm3_free(void *mem) {
  (void)mem;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @vde_chain_nm3_free(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __set_BASEPRI(int);
void irq_setmask(void) { __set_BASEPRI(3); }


x86 assembly (clang, -O0):
<irq_setmask>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <__set_BASEPRI@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq_setmask>:
mov    $0x3,%edi
jmp    1030 <__set_BASEPRI@plt>

LLVM IR (-O0):
define void @irq_setmask() {
%1 = call i32 @__set_BASEPRI(i32 3)
ret void
}

LLVM IR (-O2):
define void @irq_setmask() {
%1 = tail call i32 @__set_BASEPRI(i32 3)
ret void
}
/* Variables and functions */
scalar_t__ OPENSSL_issetugid();
char *getenv(char const *);
char *ossl_safe_getenv(const char *name) {
  if (OPENSSL_issetugid())
    return NULL;
  return getenv(name);
}


x86 assembly (clang, -O0):
<ossl_safe_getenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <OPENSSL_issetugid@plt>
cmp    $0x0,%rax
je     114a <ossl_safe_getenv+0x2a>
movq   $0x0,-0x8(%rbp)
jmp    1157 <ossl_safe_getenv+0x37>
mov    -0x10(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ossl_safe_getenv>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <OPENSSL_issetugid@plt>
test   %rax,%rax
je     1134 <ossl_safe_getenv+0x14>
xor    %eax,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <getenv@plt>

LLVM IR (-O0):
define i8* @ossl_safe_getenv(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i64 (...) @OPENSSL_issetugid()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i8* null, i8** %2
br label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i8* @getenv(i8* %8)
store i8* %9, i8** %2
br label %10
10: ; preds = %7, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
define i8* @ossl_safe_getenv(i8* nocapture %0) {
%2 = tail call i64 (...) @OPENSSL_issetugid()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @getenv(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ null, %1 ]
ret i8* %7
}
float ANTweenTimingFunctionQuadIn(float time, float begin, float change,
                                  float duration) {
  time /= duration;
  return change * time * time + begin;
}


x86 assembly (clang, -O0):
<ANTweenTimingFunctionQuadIn>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANTweenTimingFunctionQuadIn>:
divss  %xmm3,%xmm0
mulss  %xmm0,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @ANTweenTimingFunctionQuadIn(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %8
%10 = load float, float* %5
%11 = fdiv float %10, %9
store float %11, float* %5
%12 = load float, float* %7
%13 = load float, float* %5
%14 = fmul float %12, %13
%15 = load float, float* %5
%16 = load float, float* %6
%17 = call float @llvm.fmuladd.f32(float %14, float %15, float %16)
ret float %17
}

LLVM IR (-O2):
define float @ANTweenTimingFunctionQuadIn(float %0, float %1, float %2, float %3) {
%5 = fdiv float %0, %3
%6 = fmul float %5, %2
%7 = tail call float @llvm.fmuladd.f32(float %6, float %5, float %1)
ret float %7
}
double dbl_cmp_gt(double a, double b, double c, double d) {
  return (a > b) ? c : d;
}


x86 assembly (clang, -O0):
<dbl_cmp_gt>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1137 <dbl_cmp_gt+0x37>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1141 <dbl_cmp_gt+0x41>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbl_cmp_gt>:
cmpltsd %xmm0,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm3,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @dbl_cmp_gt(double %0, double %1, double %2, double %3) {
%5 = fcmp ogt double %0, %1
%6 = select i1 %5, double %2, double %3
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int tm_hour;
  int tm_min;
  int tm_sec;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ mktime(struct tm *);
time_t daylimit(time_t timval) {
  struct tm *tp = localtime(&timval);
  tp->tm_hour = 23;
  tp->tm_min = 59;
  tp->tm_sec = 59;
  return mktime(tp);
}


x86 assembly (clang, -O0):
<daylimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x17,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x3b,0x4(%rax)
mov    -0x10(%rbp),%rax
movl   $0x3b,0x8(%rax)
mov    -0x10(%rbp),%rdi
call   1040 <mktime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<daylimit>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
movabs $0x3b00000017,%rcx
mov    %rcx,(%rax)
movl   $0x3b,0x8(%rax)
mov    %rax,%rdi
call   1040 <mktime@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
define i32 @daylimit(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.tm*
store i32 %0, i32* %2
%4 = call %struct.tm* @localtime(i32* %2)
store %struct.tm* %4, %struct.tm** %3
%5 = load %struct.tm*, %struct.tm** %3
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 0
store i32 23, i32* %6
%7 = load %struct.tm*, %struct.tm** %3
%8 = getelementptr inbounds %struct.tm, %struct.tm* %7, i32 0, i32 1
store i32 59, i32* %8
%9 = load %struct.tm*, %struct.tm** %3
%10 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 2
store i32 59, i32* %10
%11 = load %struct.tm*, %struct.tm** %3
%12 = call i32 @mktime(%struct.tm* %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
define i32 @daylimit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call %struct.tm* @localtime(i32* %2)
%4 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 0
store i32 23, i32* %4
%5 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 1
store i32 59, i32* %5
%6 = getelementptr inbounds %struct.tm, %struct.tm* %3, i64 0, i32 2
store i32 59, i32* %6
%7 = call i32 @mktime(%struct.tm* %3)
ret i32 %7
}
/* Variables and functions */
char *escape_dollar_sign(char *);
char *escape_dollar_signs(char *data) { return escape_dollar_sign(data); }


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

x86 assembly (clang, -O2):
<escape_dollar_signs>:
jmp    1030 <escape_dollar_sign@plt>

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

LLVM IR (-O2):
define i8* @escape_dollar_signs(i8* %0) {
%2 = tail call i8* @escape_dollar_sign(i8* %0)
ret i8* %2
}
double b_inreal(chan)
long chan;
{
  double val;
  char *fmt;
  int rc;
  fmt = "%le";
  if (chan == 0)
    rc = scanf(fmt, &val);
  else {
    rc = scanf(fmt, &val);
  }
  if (rc != 1)
    return (double)0;
  return val;
}


x86 assembly (clang, -O0):
<b_inreal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1149 <b_inreal+0x39>
mov    -0x20(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    %eax,-0x24(%rbp)
jmp    115b <b_inreal+0x4b>
mov    -0x20(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
je     1172 <b_inreal+0x62>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117c <b_inreal+0x6c>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_inreal>:
push   %rax
lea    0xee8(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <scanf@plt>
cmp    $0x1,%eax
je     112c <b_inreal+0x1c>
xorps  %xmm0,%xmm0
pop    %rax
ret
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%le\00"
define double @b_inreal(i64 %0) {
%2 = alloca double
%3 = alloca i64
%4 = alloca double
%5 = alloca i8*
%6 = alloca i32
store i64 %0, i64* %3
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %5
%7 = load i64, i64* %3
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %5
%11 = call i32 (i8*, ...) @scanf(i8* %10, double* %4)
store i32 %11, i32* %6
br label %15
12: ; preds = %1
%13 = load i8*, i8** %5
%14 = call i32 (i8*, ...) @scanf(i8* %13, double* %4)
store i32 %14, i32* %6
br label %15
15: ; preds = %12, %9
%16 = load i32, i32* %6
%17 = icmp ne i32 %16, 1
br i1 %17, label %18, label %19
18: ; preds = %15
store double 0.000000e+00, double* %2
br label %21
19: ; preds = %15
%20 = load double, double* %4
store double %20, double* %2
br label %21
21: ; preds = %19, %18
%22 = load double, double* %2
ret double %22
}

LLVM IR (-O2):
@.str = [4 x i8] c"%le\00"
define double @b_inreal(i64 %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%5 = icmp eq i32 %4, 1
%6 = load double, double* %2
%7 = select i1 %5, double %6, double 0.000000e+00
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ cubic_test();
int /*<<< orphan*/ float_to_frac_test();
int /*<<< orphan*/ quartic_test();
void math_test(void) {
  float_to_frac_test();
  cubic_test();
  quartic_test();
}


x86 assembly (clang, -O0):
<math_test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <float_to_frac_test@plt>
mov    $0x0,%al
call   1050 <cubic_test@plt>
mov    $0x0,%al
call   1030 <quartic_test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_test>:
push   %rax
xor    %eax,%eax
call   1040 <float_to_frac_test@plt>
xor    %eax,%eax
call   1050 <cubic_test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <quartic_test@plt>

LLVM IR (-O0):
define void @math_test() {
%1 = call i32 (...) @float_to_frac_test()
%2 = call i32 (...) @cubic_test()
%3 = call i32 (...) @quartic_test()
ret void
}

LLVM IR (-O2):
define void @math_test() {
%1 = tail call i32 (...) @float_to_frac_test()
%2 = tail call i32 (...) @cubic_test()
%3 = tail call i32 (...) @quartic_test()
ret void
}
int plugin_call(const struct plugin_list *pl, const int type, const char *args,
                struct plugin_return *pr, struct env_set *es) {
  return 0;
}


x86 assembly (clang, -O0):
<plugin_call>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.plugin_list = type opaque
%struct.plugin_return = type opaque
%struct.env_set = type opaque
define i32 @plugin_call(%struct.plugin_list* %0, i32 %1, i8* %2, %struct.plugin_return* %3, %struct.env_set* %4) {
%6 = alloca %struct.plugin_list*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca %struct.plugin_return*
%10 = alloca %struct.env_set*
store %struct.plugin_list* %0, %struct.plugin_list** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store %struct.plugin_return* %3, %struct.plugin_return** %9
store %struct.env_set* %4, %struct.env_set** %10
ret i32 0
}

LLVM IR (-O2):
%struct.plugin_list = type opaque
%struct.plugin_return = type opaque
%struct.env_set = type opaque
define i32 @plugin_call(%struct.plugin_list* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, %struct.plugin_return* nocapture readnone %3, %struct.env_set* nocapture readnone %4) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ displayBytes(int, char const *, unsigned char const *,
                                unsigned int);
void displayStateAsBytes(int level, const char *text,
                         const unsigned char *state, unsigned int width) {
  displayBytes(level, text, state, width / 8);
}


x86 assembly (clang, -O0):
<displayStateAsBytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
shr    $0x3,%ecx
call   1030 <displayBytes@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayStateAsBytes>:
shr    $0x3,%ecx
jmp    1030 <displayBytes@plt>

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

LLVM IR (-O2):
define void @displayStateAsBytes(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = lshr i32 %3, 3
%6 = tail call i32 @displayBytes(i32 %0, i8* %1, i8* %2, i32 %5)
ret void
}
/* Variables and functions */
void *calloc(int, size_t);
int /*<<< orphan*/ printf(char *, int);
void *allocate(size_t size) {
  void *mem = calloc(1, size);
  if (mem == NULL)
    printf("allocate: not enough memory for %d bytes\n", (int)size);
  return mem;
}


x86 assembly (clang, -O0):
<allocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1040 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <allocate+0x3b>
mov    -0x8(%rbp),%rax
mov    %eax,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocate>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x1,%edi
mov    %r14,%rsi
call   1040 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114b <allocate+0x2b>
lea    0xebd(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [42 x i8] c"allocate: not enough memory for %d bytes\0A\00"
define i8* @allocate(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @calloc(i32 1, i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i64, i64* %2
%10 = trunc i64 %9 to i32
%11 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %8, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [42 x i8] c"allocate: not enough memory for %d bytes\0A\00"
define i8* @allocate(i64 %0) {
%2 = tail call i8* @calloc(i32 1, i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = trunc i64 %0 to i32
%6 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *(*something(int p1, int p2))(int, int, int) { printf("How are you?\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"How are you?\0A\00"
define i8* (i32, i32, i32)* @something(i32 %0, i32 %1) {
%3 = alloca i8* (i32, i32, i32)*
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = load i8* (i32, i32, i32)*, i8* (i32, i32, i32)** %3
ret i8* (i32, i32, i32)* %7
}

LLVM IR (-O2):
@str = [13 x i8] c"How are you?\00"
define noalias i8* (i32, i32, i32)* @something(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i8* (i32, i32, i32)* undef
}
/* Type definitions */
struct server_list {
  int dummy;
};
struct server {
  int dummy;
};
struct genlist {
  int dummy;
};

/* Variables and functions */
scalar_t__ genlist_get(struct genlist *, int);
struct server *server_list_get(const struct server_list *tthis, int index) {
  return (struct server *)genlist_get(((struct genlist *)(tthis)), index);
}


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

x86 assembly (clang, -O2):
<server_list_get>:
jmp    1030 <genlist_get@plt>

LLVM IR (-O0):
%struct.server = type { i32 }
%struct.server_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.server* @server_list_get(%struct.server_list* %0, i32 %1) {
%3 = alloca %struct.server_list*
%4 = alloca i32
store %struct.server_list* %0, %struct.server_list** %3
store i32 %1, i32* %4
%5 = load %struct.server_list*, %struct.server_list** %3
%6 = bitcast %struct.server_list* %5 to %struct.genlist*
%7 = load i32, i32* %4
%8 = call i64 @genlist_get(%struct.genlist* %6, i32 %7)
%9 = inttoptr i64 %8 to %struct.server*
ret %struct.server* %9
}

LLVM IR (-O2):
%struct.server = type { i32 }
%struct.server_list = type { i32 }
%struct.genlist = type { i32 }
define %struct.server* @server_list_get(%struct.server_list* %0, i32 %1) {
%3 = bitcast %struct.server_list* %0 to %struct.genlist*
%4 = tail call i64 @genlist_get(%struct.genlist* %3, i32 %1)
%5 = inttoptr i64 %4 to %struct.server*
ret %struct.server* %5
}
void gtk_rc_add_default_file() {}


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

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

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

LLVM IR (-O2):
define void @gtk_rc_add_default_file() {
ret void
}
int test_imm_29uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x29 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_29uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 41
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}