xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t reverseBits8(uint8_t b) {
  b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;
  b = (b & 0xCC) >> 2 | (b & 0x33) << 2;
  b = (b & 0xAA) >> 1 | (b & 0x55) << 1;
  return b;
}


x86 assembly (clang, -O0):
<reverseBits8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf0,%eax
sar    $0x4,%eax
mov    -0x4(%rbp),%ecx
and    $0xf,%ecx
shl    $0x4,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xcc,%eax
sar    $0x2,%eax
mov    -0x4(%rbp),%ecx
and    $0x33,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xaa,%eax
sar    $0x1,%eax
mov    -0x4(%rbp),%ecx
and    $0x55,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseBits8>:
rol    $0x4,%dil
mov    %edi,%eax
and    $0x33,%al
shl    $0x2,%al
shr    $0x2,%dil
and    $0x33,%dil
or     %al,%dil
mov    %edi,%eax
and    $0x55,%al
add    %al,%al
shr    %dil
and    $0x55,%dil
or     %al,%dil
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @reverseBits8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 240
%5 = ashr i32 %4, 4
%6 = load i32, i32* %2
%7 = and i32 %6, 15
%8 = shl i32 %7, 4
%9 = or i32 %5, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = and i32 %10, 204
%12 = ashr i32 %11, 2
%13 = load i32, i32* %2
%14 = and i32 %13, 51
%15 = shl i32 %14, 2
%16 = or i32 %12, %15
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = and i32 %17, 170
%19 = ashr i32 %18, 1
%20 = load i32, i32* %2
%21 = and i32 %20, 85
%22 = shl i32 %21, 1
%23 = or i32 %19, %22
store i32 %23, i32* %2
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @reverseBits8(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i8 @llvm.bitreverse.i8(i8 %2)
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int vfprintf(int /*<<< orphan*/ *, char const *, int /*<<< orphan*/);
int lvfprintf(FILE *stream, const char *format, va_list ap) {
  return vfprintf(stream, format, ap);
}


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

x86 assembly (clang, -O2):
<lvfprintf>:
jmp    1030 <vfprintf@plt>

LLVM IR (-O0):
define i32 @lvfprintf(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @vfprintf(i32* %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @lvfprintf(i32* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @vfprintf(i32* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
scalar_t__ cos(float);
float sdCos(float s) { return (float)cos(s * (3.1415926535f / 180.0)); }


x86 assembly (clang, -O0):
<sdCos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed2(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <cos@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdCos>:
push   %rax
cvtss2sd %xmm0,%xmm0
mulsd  0xee3(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sdCos(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double %4, 0x3F91DF46AAAAAAAB
%6 = fptrunc double %5 to float
%7 = call i64 @cos(float %6)
%8 = sitofp i64 %7 to float
ret float %8
}

LLVM IR (-O2):
define float @sdCos(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 0x3F91DF46AAAAAAAB
%4 = fptrunc double %3 to float
%5 = tail call i64 @cos(float %4)
%6 = sitofp i64 %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void loudbug_endpost(void) { fputs("\n", stderr); }


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@stderr = global i32 0
define void @loudbug_endpost() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
@stderr = global i32 0
define void @loudbug_endpost() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ strncpy(char *, char *, int);
scalar_t__ write(int, char *, int);
void tcp_main(int client_fd) {
  char buf[512];
  strncpy(buf, "The connection will be closed...\n", 512);
  if (write(client_fd, buf, 512) < 0) {
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<tcp_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x210(%rbp),%rdi
lea    0xeb4(%rip),%rsi
mov    $0x200,%edx
call   1030 <strncpy@plt>
mov    -0x4(%rbp),%edi
lea    -0x210(%rbp),%rsi
mov    $0x200,%edx
call   1040 <write@plt>
cmp    $0x0,%rax
jge    1182 <tcp_main+0x52>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcp_main>:
push   %r14
push   %rbx
sub    $0x208,%rsp
mov    %edi,%ebx
lea    0xebd(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x200,%edx
call   1030 <strncpy@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x200,%edx
call   1040 <write@plt>
test   %rax,%rax
js     1172 <tcp_main+0x42>
add    $0x208,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"The connection will be closed...\0A\00"
@EXIT_FAILURE = global i32 0
define void @tcp_main(i32 %0) {
%2 = alloca i32
%3 = alloca [512 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = call i32 @strncpy(i8* %4, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 512)
%6 = load i32, i32* %2
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%8 = call i64 @write(i32 %6, i8* %7, i32 512)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"The connection will be closed...\0A\00"
@EXIT_FAILURE = global i32 0
define void @tcp_main(i32 %0) {
%2 = alloca [512 x i8]
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%4 = call i32 @strncpy(i8* %3, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 512)
%5 = call i64 @write(i32 %0, i8* %3, i32 512)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* @EXIT_FAILURE
%9 = call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
bool aptx_update_qos(void *codec_data, uint8_t op) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @aptx_update_qos(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
void answer_otim(void) {}


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

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

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

LLVM IR (-O2):
define void @answer_otim() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xstrcpy(char *, char const *);
size_t xstrlen(char *);
char *xstrcat(char *restrict dest, const char *restrict src) {
  size_t len = xstrlen(dest);
  xstrcpy(dest + len, src);
  return dest;
}


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

x86 assembly (clang, -O2):
<xstrcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <xstrlen@plt>
lea    (%rax,%rbx,1),%rdi
mov    %r14,%rsi
call   1040 <xstrcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @xstrcat(i8* noalias %0, i8* noalias %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @xstrlen(i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i64, i64* %5
%10 = getelementptr inbounds i8, i8* %8, i64 %9
%11 = load i8*, i8** %4
%12 = call i32 @xstrcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @xstrcat(i8* noalias returned %0, i8* noalias %1) {
%3 = tail call i64 @xstrlen(i8* %0)
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = tail call i32 @xstrcpy(i8* %4, i8* %1)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
scalar_t__ scanf(char *, int *);
int GetInt(char message[50]) {
  puts(message);
  int s;
  if ((scanf("%d", &s)))
    return s;
  else {
    puts("The input was not in the correct format. Zero has been returned!");
    return 0;
  }
}


x86 assembly (clang, -O0):
<GetInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
cmp    $0x0,%rax
je     115a <GetInt+0x3a>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116d <GetInt+0x4d>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetInt>:
push   %rax
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
test   %rax,%rax
je     1142 <GetInt+0x22>
mov    0x4(%rsp),%eax
pop    %rcx
ret
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [65 x i8] c"The input was not in the correct format. Zero has been returned!\00"
define i32 @GetInt(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @puts(i8* %5)
%7 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %4
store i32 %10, i32* %2
br label %13
11: ; preds = %1
%12 = call i32 @puts(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [65 x i8] c"The input was not in the correct format. Zero has been returned!\00"
define i32 @GetInt(i8* nocapture %0) {
%2 = alloca i32
%3 = tail call i32 @puts(i8* dereferenceable(1) %0)
%4 = bitcast i32* %2 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = load i32, i32* %2
br label %11
9: ; preds = %1
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ %8, %7 ], [ 0, %9 ]
ret i32 %12
}
int my_isneg(int n) { return ((n < 0) ? 0 : 1); }


x86 assembly (clang, -O0):
<my_isneg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovl  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_isneg>:
mov    %edi,%eax
not    %eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @my_isneg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 0, i32 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @my_isneg(i32 %0) {
%2 = xor i32 %0, -1
%3 = lshr i32 %2, 31
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Msp430TimerCapComP__6__Control__clearPendingInterrupt();
void Msp430AlarmC__2__Msp430TimerControl__clearPendingInterrupt(void) {
  Msp430TimerCapComP__6__Control__clearPendingInterrupt();
}


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

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

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

LLVM IR (-O2):
define void @Msp430AlarmC__2__Msp430TimerControl__clearPendingInterrupt() {
%1 = tail call i32 (...) @Msp430TimerCapComP__6__Control__clearPendingInterrupt()
ret void
}
/* Variables and functions */
int memcmp(void const *, void const *, int);
int htable_compare(const void *k1, int l1, const void *k2, int l2) {
  if (l1 > l2) {
    return 1;
  }
  if (l1 < l2) {
    return -1;
  }
  return memcmp(k1, k2, l1);
}


x86 assembly (clang, -O0):
<htable_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x24(%rbp),%eax
jle    113e <htable_compare+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1169 <htable_compare+0x59>
mov    -0x14(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1156 <htable_compare+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <htable_compare+0x59>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htable_compare>:
mov    $0x1,%eax
cmp    %ecx,%esi
jg     1120 <htable_compare+0x10>
mov    $0xffffffff,%eax
jge    1121 <htable_compare+0x11>
ret
mov    %esi,%r8d
mov    %rdx,%rsi
mov    %r8d,%edx
jmp    1030 <memcmp@plt>

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

LLVM IR (-O2):
define i32 @htable_compare(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = icmp sgt i32 %1, %3
br i1 %5, label %10, label %6
6: ; preds = %4
%7 = icmp slt i32 %1, %3
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @memcmp(i8* %0, i8* %2, i32 %1)
br label %10
10: ; preds = %6, %4, %8
%11 = phi i32 [ %9, %8 ], [ 1, %4 ], [ -1, %6 ]
ret i32 %11
}
/* Variables and functions */
long SwapLong(long);
int /*<<< orphan*/ assert(int);
float SwapFloat(float data) {
  assert(sizeof(float) == sizeof(long));
  long s = SwapLong(*((long *)&data));
  return *((float *)&s);
}


x86 assembly (clang, -O0):
<SwapFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%rdi
call   1040 <SwapLong@plt>
mov    %rax,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SwapFloat>:
push   %rax
movss  %xmm0,(%rsp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    (%rsp),%rdi
call   1040 <SwapLong@plt>
movd   %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @SwapFloat(float %0) {
%2 = alloca float
%3 = alloca i64
store float %0, float* %2
%4 = call i32 @assert(i32 0)
%5 = bitcast float* %2 to i64*
%6 = load i64, i64* %5
%7 = call i64 @SwapLong(i64 %6)
store i64 %7, i64* %3
%8 = bitcast i64* %3 to float*
%9 = load float, float* %8
ret float %9
}

LLVM IR (-O2):
define float @SwapFloat(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = tail call i32 @assert(i32 0)
%4 = bitcast float* %2 to i64*
%5 = load i64, i64* %4
%6 = tail call i64 @SwapLong(i64 %5)
%7 = trunc i64 %6 to i32
%8 = bitcast i32 %7 to float
ret float %8
}
double real_max(double x, double y) { return ((x < y) ? y : x); }


x86 assembly (clang, -O0):
<real_max>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1131 <real_max+0x31>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <real_max+0x3b>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @real_max(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %1, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_68() {
  Assert_real((isqrt(68) == 8),
              "/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/stdlib/isqrt.c",
              345, ("Integer square root of 68 should be 8"));
}


x86 assembly (clang, -O0):
<t_sqrt_68>:
push   %rbp
mov    %rsp,%rbp
mov    $0x44,%edi
call   1030 <isqrt@plt>
cmp    $0x8,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x159,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_68>:
push   %rax
mov    $0x44,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x8,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x159,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 68 should be 8\00"
define void @t_sqrt_68() {
%1 = call i32 @isqrt(i32 68)
%2 = icmp eq i32 %1, 8
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 345, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 68 should be 8\00"
define void @t_sqrt_68() {
%1 = tail call i32 @isqrt(i32 68)
%2 = icmp eq i32 %1, 8
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 345, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage = [52 x i8] c"SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage\00"
define void @SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @__func__.SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage = [52 x i8] c"SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage\00"
define void @SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @__func__.SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage, i64 0, i64 0), i8* %0)
ret void
}
void swap(int *array, int left, int right) {
  int tmp = array[left];
  array[left] = array[right];
  array[right] = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void TDB_cmd_help_print_consensus() { printf("consensus help goes here.\n"); }


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"consensus help goes here.\0A\00"
define void @TDB_cmd_help_print_consensus() {
%1 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [26 x i8] c"consensus help goes here.\00"
define void @TDB_cmd_help_print_consensus() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x9b() {
  Assert_real((isprint(155) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              780, ("isprint should be 0 for 0x9b"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x9b\00"
define void @t_isprint_0x9b() {
%1 = tail call i64 @isprint(i32 155)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 780, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
double difftime(time_t end, time_t beginning) {
  return ((double)(end - beginning));
}


x86 assembly (clang, -O0):
<difftime>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
cvtsi2sd %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<difftime>:
sub    %rsi,%rdi
cvtsi2sd %rdi,%xmm0
ret

LLVM IR (-O0):
define double @difftime(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub nsw i64 %5, %6
%8 = sitofp i64 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @difftime(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
%4 = sitofp i64 %3 to double
ret double %4
}
/* Type definitions */
struct timeval {
  unsigned int tv_sec;
  unsigned int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ srand(unsigned int);
void rank_seed(void) {
  unsigned int ticks;
  struct timeval tv;
  gettimeofday(&tv, NULL);
  ticks = tv.tv_sec + tv.tv_usec;
  srand(ticks);
}


x86 assembly (clang, -O0):
<rank_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rank_seed>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    0x4(%rsp),%edi
add    (%rsp),%edi
pop    %rax
jmp    1040 <srand@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define void @rank_seed() {
%1 = alloca i32
%2 = alloca %struct.timeval
%3 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%7 = load i32, i32* %6
%8 = add i32 %5, %7
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = call i32 @srand(i32 %9)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define void @rank_seed() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = add i32 %7, %5
%9 = tail call i32 @srand(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ checked_send(int, unsigned char *, int);
int /*<<< orphan*/ pack_int(unsigned char *, int);
void checked_send_int(int s, int value) {
  unsigned char bytes[4];
  pack_int(bytes, value);
  checked_send(s, bytes, 4);
}


x86 assembly (clang, -O0):
<checked_send_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <pack_int@plt>
mov    -0x4(%rbp),%edi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <checked_send@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checked_send_int>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <pack_int@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    $0x4,%edx
call   1030 <checked_send@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @checked_send_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [4 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = call i32 @pack_int(i8* %6, i32 %7)
%9 = load i32, i32* %3
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %5, i64 0, i64 0
%11 = call i32 @checked_send(i32 %9, i8* %10, i32 4)
ret void
}

LLVM IR (-O2):
define void @checked_send_int(i32 %0, i32 %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = call i32 @pack_int(i8* %4, i32 %1)
%6 = call i32 @checked_send(i32 %0, i8* %4, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sectioning_underscore(char *);
void cm_subsubsection(void) { sectioning_underscore("subsubsection"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"subsubsection\00"
define void @cm_subsubsection() {
%1 = call i32 @sectioning_underscore(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"subsubsection\00"
define void @cm_subsubsection() {
%1 = tail call i32 @sectioning_underscore(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
void xxx(int argc) {
  int x;
#pragma omp parallel master taskloop
  for (int i = 0; i < 10; ++i)
    argc = x;
}


x86 assembly (clang, -O0):
<xxx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    112c <xxx+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <xxx+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @xxx(i32 %0) {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_permute_dobldobl_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(469, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_permute_dobldobl_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1d5,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_permute_dobldobl_system>:
mov    $0x1d5,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @celcon_permute_dobldobl_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 469, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @celcon_permute_dobldobl_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 469, i32* undef, i32* undef, double* undef)
ret i32 %1
}
void dd_pbl_ios_gc_achievements_reset() {}


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

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

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

LLVM IR (-O2):
define void @dd_pbl_ios_gc_achievements_reset() {
ret void
}
/* Variables and functions */
int abs(float);
int /*<<< orphan*/ getid(float);
int /*<<< orphan*/ printid(float);
void main() {
  float a, x;
  getid(a);
  printid(a);
  x = a;
  while (abs(x * x - a) > 1e-6)
    x = (x + a / x) / 2;
  printid(x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  -0x4(%rbp),%xmm0
call   1040 <getid@plt>
movss  -0x4(%rbp),%xmm0
call   1050 <printid@plt>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
movss  -0x4(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <abs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xe75(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11be <main+0x8e>
movss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
divss  -0x8(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  0xe58(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1156 <main+0x26>
movss  -0x8(%rbp),%xmm0
call   1050 <printid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <getid@plt>
call   1050 <printid@plt>
nopl   0x0(%rax,%rax,1)
movss  0xeb8(%rip),%xmm0
call   1030 <abs@plt>
test   %eax,%eax
jg     1140 <main+0x10>
movss  0xea7(%rip),%xmm0
pop    %rax
jmp    1050 <printid@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca float
%2 = alloca float
%3 = load float, float* %1
%4 = call i32 @getid(float %3)
%5 = load float, float* %1
%6 = call i32 @printid(float %5)
%7 = load float, float* %1
store float %7, float* %2
br label %8
8: ; preds = %17, %0
%9 = load float, float* %2
%10 = load float, float* %2
%11 = load float, float* %1
%12 = fneg float %11
%13 = call float @llvm.fmuladd.f32(float %9, float %10, float %12)
%14 = call i32 @abs(float %13)
%15 = sitofp i32 %14 to double
%16 = fcmp ogt double %15, 0x3EB0C6F7A0B5ED8D
br i1 %16, label %17, label %24
17: ; preds = %8
%18 = load float, float* %2
%19 = load float, float* %1
%20 = load float, float* %2
%21 = fdiv float %19, %20
%22 = fadd float %18, %21
%23 = fdiv float %22, 2.000000e+00
store float %23, float* %2
br label %8
24: ; preds = %8
%25 = load float, float* %2
%26 = call i32 @printid(float %25)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @getid(float undef)
%2 = tail call i32 @printid(float undef)
br label %3
3: ; preds = %3, %0
%4 = tail call i32 @abs(float 0x7FF8000000000000)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %3, label %6
6: ; preds = %3
%7 = tail call i32 @printid(float 0x7FF8000000000000)
ret void
}
int blk_throtl_init(struct request_queue *q) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.request_queue = type opaque
define i32 @blk_throtl_init(%struct.request_queue* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
float pow(float x, float y) {
  int i;
  for (i = 0; i < y; i++) {
    x *= x;
  }
  return x;
}


x86 assembly (clang, -O0):
<pow>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cvtsi2ssl -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1145 <pow+0x45>
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <pow+0x15>
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow>:
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm1
jbe    1123 <pow+0x23>
mov    $0x1,%eax
nopl   (%rax)
xorps  %xmm2,%xmm2
cvtsi2ss %eax,%xmm2
mulss  %xmm0,%xmm0
add    $0x1,%eax
ucomiss %xmm2,%xmm1
ja     1110 <pow+0x10>
ret

LLVM IR (-O0):
define float @pow(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32
store float %0, float* %3
store float %1, float* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = sitofp i32 %7 to float
%9 = load float, float* %4
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %18
11: ; preds = %6
%12 = load float, float* %3
%13 = load float, float* %3
%14 = fmul float %13, %12
store float %14, float* %3
br label %15
15: ; preds = %11
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
%19 = load float, float* %3
ret float %19
}

LLVM IR (-O2):
define float @pow(float %0, float %1) {
%3 = fcmp ogt float %1, 0.000000e+00
br i1 %3, label %4, label %11
4: ; preds = %2, %4
%5 = phi i32 [ %8, %4 ], [ 0, %2 ]
%6 = phi float [ %7, %4 ], [ %0, %2 ]
%7 = fmul float %6, %6
%8 = add nuw nsw i32 %5, 1
%9 = sitofp i32 %8 to float
%10 = fcmp olt float %9, %1
br i1 %10, label %4, label %11
11: ; preds = %4, %2
%12 = phi float [ %0, %2 ], [ %7, %4 ]
ret float %12
}
/* Variables and functions */
int /*<<< orphan*/ gdGdcExecServer();
int gdGdcGetCmdStat(int, int *);
int cdops_check_cmd(int f) {
  int blah[4];
  int n;
  gdGdcExecServer();
  if ((n = gdGdcGetCmdStat(f, blah)) == 1)
    return 0;
  if (n == 2)
    return 1;
  else
    return -1;
}


x86 assembly (clang, -O0):
<cdops_check_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <gdGdcExecServer@plt>
mov    -0x8(%rbp),%edi
lea    -0x20(%rbp),%rsi
call   1040 <gdGdcGetCmdStat@plt>
mov    %eax,-0x24(%rbp)
cmp    $0x1,%eax
jne    1156 <cdops_check_cmd+0x36>
movl   $0x0,-0x4(%rbp)
jmp    1173 <cdops_check_cmd+0x53>
cmpl   $0x2,-0x24(%rbp)
jne    116c <cdops_check_cmd+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1173 <cdops_check_cmd+0x53>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdops_check_cmd>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebx
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <gdGdcExecServer@plt>
mov    %rsp,%rsi
mov    %ebx,%edi
call   1040 <gdGdcGetCmdStat@plt>
xor    %ecx,%ecx
cmp    $0x2,%eax
sete   %cl
add    %ecx,%ecx
add    $0xffffffff,%ecx
cmp    $0x1,%eax
cmove  %ebp,%ecx
mov    %ecx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @cdops_check_cmd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [4 x i32]
%5 = alloca i32
store i32 %0, i32* %3
%6 = call i32 (...) @gdGdcExecServer()
%7 = load i32, i32* %3
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
%9 = call i32 @gdGdcGetCmdStat(i32 %7, i32* %8)
store i32 %9, i32* %5
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 0, i32* %2
br label %17
12: ; preds = %1
%13 = load i32, i32* %5
%14 = icmp eq i32 %13, 2
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 1, i32* %2
br label %17
16: ; preds = %12
store i32 -1, i32* %2
br label %17
17: ; preds = %16, %15, %11
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @cdops_check_cmd(i32 %0) {
%2 = alloca [4 x i32]
%3 = bitcast [4 x i32]* %2 to i8*
%4 = tail call i32 (...) @gdGdcExecServer()
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%6 = call i32 @gdGdcGetCmdStat(i32 %0, i32* %5)
%7 = icmp eq i32 %6, 2
%8 = select i1 %7, i32 1, i32 -1
%9 = icmp eq i32 %6, 1
%10 = select i1 %9, i32 0, i32 %8
ret i32 %10
}
void clean_RnB() { (*((volatile unsigned char *)0x70200028)) |= (1 << 4); }


x86 assembly (clang, -O0):
<clean_RnB>:
push   %rbp
mov    %rsp,%rbp
mov    $0x70200028,%eax
mov    (%rax),%al
movzbl %al,%eax
or     $0x10,%eax
mov    %al,%cl
mov    $0x70200028,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clean_RnB>:
orb    $0x10,0x70200028
10
ret

LLVM IR (-O0):
define void @clean_RnB() {
%1 = load volatile i8, i8* inttoptr (i64 1881145384 to i8*)
%2 = zext i8 %1 to i32
%3 = or i32 %2, 16
%4 = trunc i32 %3 to i8
store volatile i8 %4, i8* inttoptr (i64 1881145384 to i8*)
ret void
}

LLVM IR (-O2):
define void @clean_RnB() {
%1 = load volatile i8, i8* inttoptr (i64 1881145384 to i8*)
%2 = or i8 %1, 16
store volatile i8 %2, i8* inttoptr (i64 1881145384 to i8*)
ret void
}
int max(int a, int b) {
  if (a <= b)
    return (b);
  else
    return (a);
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1121 <max+0x21>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @max(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 sle i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %5
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %4
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int merge2(FILE *tp, FILE *sp) {
  char line[256];
  int nw = 0;
  while (fgets(line, 256, sp) != NULL) {
    fputs(line, tp);
    nw++;
  }
  return nw;
}


x86 assembly (clang, -O0):
<merge2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x114(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x100,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     1180 <merge2+0x60>
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <fputs@plt>
mov    -0x114(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
jmp    113d <merge2+0x1d>
mov    -0x114(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<merge2>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x108,%rsp
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsp,%rdi
mov    $0x100,%esi
mov    %r15,%rdx
call   1040 <fgets@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     1173 <merge2+0x53>
mov    %rsp,%rbx
nopl   (%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <fputs@plt>
add    $0x1,%ebp
mov    %rbx,%rdi
mov    $0x100,%esi
mov    %r15,%rdx
call   1040 <fgets@plt>
test   %rax,%rax
jne    1150 <merge2+0x30>
mov    %ebp,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @merge2(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [256 x i8]
%6 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 0, i32* %6
br label %7
7: ; preds = %12, %2
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%9 = load i32*, i32** %4
%10 = call i32* @fgets(i8* %8, i32 256, i32* %9)
%11 = icmp ne i32* %10, null
br i1 %11, label %12, label %18
12: ; preds = %7
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%14 = load i32*, i32** %3
%15 = call i32 @fputs(i8* %13, i32* %14)
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
br label %7
18: ; preds = %7
%19 = load i32, i32* %6
ret i32 %19
}

LLVM IR (-O2):
define i32 @merge2(i32* nocapture %0, i32* nocapture %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32* @fgets(i8* %4, i32 256, i32* %1)
%6 = icmp eq i32* %5, null
br i1 %6, label %13, label %7
7: ; preds = %2, %7
%8 = phi i32 [ %10, %7 ], [ 0, %2 ]
%9 = call i32 @fputs(i8* %4, i32* %0)
%10 = add nuw nsw i32 %8, 1
%11 = call i32* @fgets(i8* %4, i32 256, i32* %1)
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %7
13: ; preds = %7, %2
%14 = phi i32 [ 0, %2 ], [ %10, %7 ]
ret i32 %14
}
/* Variables and functions */
void *realloc(void *, size_t);
void *objc_realloc(void *mem, size_t size) { return realloc(mem, size); }


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

x86 assembly (clang, -O2):
<objc_realloc>:
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @objc_realloc(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 i8* @realloc(i8* %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @objc_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
void __attribute__((destructor)) shutdown(void) {}


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

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

LLVM IR (-O0):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @shutdown, i8* null }]
define void @shutdown() {
ret void
}

LLVM IR (-O2):
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @shutdown, i8* null }]
define void @shutdown() {
ret void
}