xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ pow(double, double);
float powf(float s, float s2) { return (float)pow((double)s, (double)s2); }


x86 assembly (clang, -O0):
<powf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
call   1030 <pow@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<powf>:
push   %rax
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @powf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = call i64 @pow(double %6, double %8)
%10 = sitofp i64 %9 to float
ret float %10
}

LLVM IR (-O2):
define float @powf(float %0, float %1) {
%3 = fpext float %0 to double
%4 = fpext float %1 to double
%5 = tail call i64 @pow(double %3, double %4)
%6 = sitofp i64 %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ __iar_program_start();
void ResetISR(void) {
  (*((volatile unsigned long *)(0xE000ED88))) =
      (((*((volatile unsigned long *)(0xE000ED88))) &
        ~(0x00300000 | 0x00C00000)) |
       0x00300000 | 0x00C00000);
  __iar_program_start();
}


x86 assembly (clang, -O0):
<ResetISR>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000ed88,%eax
mov    (%rax),%rcx
and    $0xffffffffff0fffff,%rcx
or     $0x300000,%rcx
or     $0xc00000,%rcx
mov    $0xe000ed88,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <__iar_program_start@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ResetISR>:
mov    $0xe000ed88,%eax
orq    $0xf00000,(%rax)
xor    %eax,%eax
jmp    1030 <__iar_program_start@plt>

LLVM IR (-O0):
define void @ResetISR() {
%1 = load volatile i64, i64* inttoptr (i64 3758157192 to i64*)
%2 = and i64 %1, -15728641
%3 = or i64 %2, 3145728
%4 = or i64 %3, 12582912
store volatile i64 %4, i64* inttoptr (i64 3758157192 to i64*)
%5 = call i32 (...) @__iar_program_start()
ret void
}

LLVM IR (-O2):
define void @ResetISR() {
%1 = load volatile i64, i64* inttoptr (i64 3758157192 to i64*)
%2 = or i64 %1, 15728640
store volatile i64 %2, i64* inttoptr (i64 3758157192 to i64*)
%3 = tail call i32 (...) @__iar_program_start()
ret void
}
__attribute__((__section__(".text.b"))) int function2(int a) { return a + 2; }


x86 assembly (clang, -O0):
<function2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<function2>:
lea    0x2(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @function2(i32 %0) section ".text.b" {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 2
ret i32 %4
}

LLVM IR (-O2):
define i32 @function2(i32 %0) section ".text.b" {
%2 = add nsw i32 %0, 2
ret i32 %2
}
long long calc_blsr_u64(long long src1, long long src2) {
  return (src1 - 1) & (src2);
}


x86 assembly (clang, -O0):
<calc_blsr_u64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    $0x1,%rax
and    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_blsr_u64>:
lea    -0x1(%rdi),%rax
and    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @calc_blsr_u64(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 = sub nsw i64 %5, 1
%7 = load i64, i64* %4
%8 = and i64 %6, %7
ret i64 %8
}

LLVM IR (-O2):
define i64 @calc_blsr_u64(i64 %0, i64 %1) {
%3 = add nsw i64 %0, -1
%4 = and i64 %3, %1
ret i64 %4
}
int ins_nop() { return 1; }


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

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

LLVM IR (-O0):
define i32 @ins_nop() {
ret i32 1
}

LLVM IR (-O2):
define i32 @ins_nop() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ paging_init();
void paging_restart(void) { paging_init(); }


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

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

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

LLVM IR (-O2):
define void @paging_restart() {
%1 = tail call i32 (...) @paging_init()
ret void
}
/* Variables and functions */
scalar_t__ ResExistFile(char *);
int ResWhereIs(char *fileName, char *path) {
  int retval = -1;
  if (ResExistFile(fileName))
    retval = 1;
  return retval;
}


x86 assembly (clang, -O0):
<ResWhereIs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ResExistFile@plt>
cmp    $0x0,%rax
je     1141 <ResWhereIs+0x31>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ResWhereIs>:
push   %rax
call   1030 <ResExistFile@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ResWhereIs(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i64 @ResExistFile(i8* %0)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -1, i32 1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ dec2bin(char *, int);
int /*<<< orphan*/ printf(char *);
void bit_or(int flag, int mask) {
  dec2bin("   flag ", flag);
  dec2bin("   mask ", mask);
  dec2bin(" or (|) ", flag | mask);
  printf("\n");
}


x86 assembly (clang, -O0):
<bit_or>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec8(%rip),%rdi
call   1040 <dec2bin@plt>
mov    -0x8(%rbp),%esi
lea    0xec2(%rip),%rdi
call   1040 <dec2bin@plt>
mov    -0x4(%rbp),%esi
or     -0x8(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1040 <dec2bin@plt>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_or>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xed2(%rip),%rdi
mov    %ebp,%esi
call   1040 <dec2bin@plt>
lea    0xecd(%rip),%rdi
mov    %ebx,%esi
call   1040 <dec2bin@plt>
or     %ebp,%ebx
lea    0xec6(%rip),%rdi
mov    %ebx,%esi
call   1040 <dec2bin@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [9 x i8] c" flag \00"
@.str.1 = [9 x i8] c" mask \00"
@.str.2 = [9 x i8] c" or (|) \00"
@.str.3 = [2 x i8] c"\0A\00"
define void @bit_or(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = or i32 %9, %10
%12 = call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c" flag \00"
@.str.1 = [9 x i8] c" mask \00"
@.str.2 = [9 x i8] c" or (|) \00"
define void @bit_or(i32 %0, i32 %1) {
%3 = tail call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%5 = or i32 %1, %0
%6 = tail call i32 @dec2bin(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rot32r11(uint32_t x) { return (x >> 11) | (x << 21); }


x86 assembly (clang, -O0):
<rot32r11>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xb,%eax
mov    -0x4(%rbp),%ecx
shl    $0x15,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot32r11>:
mov    %edi,%eax
sar    $0xb,%eax
shl    $0x15,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot32r11(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 11
%5 = load i32, i32* %2
%6 = shl i32 %5, 21
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot32r11(i32 %0) {
%2 = ashr i32 %0, 11
%3 = shl i32 %0, 21
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char *);
void newline(void) {
  char s[] = "\r\n";
  uart_puts(s);
}


x86 assembly (clang, -O0):
<newline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xed9(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0x3(%rbp),%rdi
call   1030 <uart_puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newline>:
push   %rax
movb   $0x0,0x6(%rsp)
movw   $0xa0d,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <uart_puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.newline.s = [3 x i8] c"\0D\0A\00"
define void @newline() {
%1 = alloca [3 x i8]
%2 = bitcast [3 x i8]* %1 to i8*
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%4 = call i32 @uart_puts(i8* %3)
ret void
}

LLVM IR (-O2):
@__const.newline.s = [3 x i8] c"\0D\0A\00"
define void @newline() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%3 = call i32 @uart_puts(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void times() {
  static int counter = 32;
  printf("times %d\n", counter--);
}


x86 assembly (clang, -O0):
<times>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f0e(%rip),%esi
mov    %esi,%eax
add    $0xffffffff,%eax
mov    %eax,0x2f03(%rip)
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<times>:
mov    0x2f12(%rip),%esi
lea    -0x1(%rsi),%eax
mov    %eax,0x2f09(%rip)
lea    0xeda(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@times.counter = internal global i32 32
@.str = [10 x i8] c"times %d\0A\00"
define void @times() {
%1 = load i32, i32* @times.counter
%2 = add nsw i32 %1, -1
store i32 %2, i32* @times.counter
%3 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@times.counter = internal unnamed_addr global i32 32
@.str = [10 x i8] c"times %d\0A\00"
define void @times() {
%1 = load i32, i32* @times.counter
%2 = add nsw i32 %1, -1
store i32 %2, i32* @times.counter
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int func1_in_obj();
int main(void) { return func1_in_obj(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <func1_in_obj@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @func1_in_obj()
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func1_in_obj()
ret i32 %1
}
/* Variables and functions */
int shim_enosys(int /*<<< orphan*/, int, char const *);
int shim_fremovexattr(int fd, const char *name) {
  return shim_enosys(0, fd, name);
}


x86 assembly (clang, -O0):
<shim_fremovexattr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
xor    %edi,%edi
call   1030 <shim_enosys@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shim_fremovexattr>:
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

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

LLVM IR (-O2):
define i32 @shim_fremovexattr(i32 %0, i8* %1) {
%3 = tail call i32 @shim_enosys(i32 0, i32 %0, i8* %1)
ret i32 %3
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t SWAP16(uint16_t x) { return (x >> 8) | (x << 8); }


x86 assembly (clang, -O0):
<SWAP16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SWAP16>:
mov    %edi,%eax
sar    $0x8,%eax
shl    $0x8,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @SWAP16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = load i32, i32* %2
%6 = shl i32 %5, 8
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @SWAP16(i32 %0) {
%2 = ashr i32 %0, 8
%3 = shl i32 %0, 8
%4 = or i32 %2, %3
ret i32 %4
}
int fun845() { return 845; }


x86 assembly (clang, -O0):
<fun845>:
push   %rbp
mov    %rsp,%rbp
mov    $0x34d,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun845>:
mov    $0x34d,%eax
ret

LLVM IR (-O0):
define i32 @fun845() {
ret i32 845
}

LLVM IR (-O2):
define i32 @fun845() {
ret i32 845
}
void UART0_PutChar(char data) {
  while ((*((volatile unsigned long *)0x7F005018)) & (1 << 14))
    ;
  (*((volatile unsigned char *)0x7F005020)) = data;
}


x86 assembly (clang, -O0):
<UART0_PutChar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x7f005018,%eax
mov    (%rax),%rax
and    $0x4000,%rax
cmp    $0x0,%rax
je     1127 <UART0_PutChar+0x27>
jmp    110a <UART0_PutChar+0xa>
mov    -0x1(%rbp),%cl
mov    $0x7f005020,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UART0_PutChar>:
testq  $0x4000,0x7f005018
jne    1100 <UART0_PutChar>
mov    %dil,0x7f005020
7f
ret

LLVM IR (-O0):
define void @UART0_PutChar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %7, %1
%4 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
%5 = and i64 %4, 16384
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load i8, i8* %2
store volatile i8 %9, i8* inttoptr (i64 2130726944 to i8*)
ret void
}

LLVM IR (-O2):
define void @UART0_PutChar(i8 signext %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
%4 = and i64 %3, 16384
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
store volatile i8 %0, i8* inttoptr (i64 2130726944 to i8*)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t le16dec(const void *buf) {
  const uint8_t *p = (const uint8_t *)buf;
  return (uint16_t)((p[1] << 8) | p[0]);
}


x86 assembly (clang, -O0):
<le16dec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
or     (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<le16dec>:
mov    0x4(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @le16dec(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
%9 = shl i32 %8, 8
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 0
%12 = load i32, i32* %11
%13 = or i32 %9, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @le16dec(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = getelementptr inbounds i8, i8* %0, i64 4
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32, i32* %2
%8 = or i32 %6, %7
ret i32 %8
}
/* Type definitions */
struct timespec {
  int dummy;
};
typedef int /*<<< orphan*/ clockid_t;

/* Variables and functions */
scalar_t__ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ osaf_abort(int /*<<< orphan*/);
void osaf_clock_gettime(clockid_t i_clk_id, struct timespec *o_ts) {
  if (clock_gettime(i_clk_id, o_ts) != 0)
    osaf_abort(i_clk_id);
}


x86 assembly (clang, -O0):
<osaf_clock_gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <clock_gettime@plt>
cmp    $0x0,%rax
je     114d <osaf_clock_gettime+0x2d>
mov    -0x4(%rbp),%edi
call   1040 <osaf_abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<osaf_clock_gettime>:
push   %rbx
mov    %edi,%ebx
call   1030 <clock_gettime@plt>
test   %rax,%rax
je     1135 <osaf_clock_gettime+0x15>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <osaf_abort@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
define void @osaf_clock_gettime(i32 %0, %struct.timespec* %1) {
%3 = alloca i32
%4 = alloca %struct.timespec*
store i32 %0, i32* %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load i32, i32* %3
%6 = load %struct.timespec*, %struct.timespec** %4
%7 = call i64 @clock_gettime(i32 %5, %struct.timespec* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* %3
%11 = call i32 @osaf_abort(i32 %10)
br label %12
12: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define void @osaf_clock_gettime(i32 %0, %struct.timespec* %1) {
%3 = tail call i64 @clock_gettime(i32 %0, %struct.timespec* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @osaf_abort(i32 %0)
br label %7
7: ; preds = %5, %2
ret void
}
int find_free_list_size(int size) { return 1024 / (2 * size); }


x86 assembly (clang, -O0):
<find_free_list_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
mov    $0x400,%eax
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_free_list_size>:
add    %edi,%edi
mov    $0x400,%eax
xor    %edx,%edx
idiv   %edi
ret

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

LLVM IR (-O2):
define i32 @find_free_list_size(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = sdiv i32 1024, %2
ret i32 %3
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int create_multprec_homotopy(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(522, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<create_multprec_homotopy>:
mov    $0x20a,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @create_multprec_homotopy() {
%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_c2phc4c(i32 522, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @create_multprec_homotopy() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 522, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int grey(float value) { return 232 + (int)(value * 23.0f); }


x86 assembly (clang, -O0):
<grey>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
add    $0xe8,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<grey>:
mulss  0xef8(%rip),%xmm0
cvttss2si %xmm0,%eax
add    $0xe8,%eax
ret

LLVM IR (-O0):
define i32 @grey(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 2.300000e+01
%5 = fptosi float %4 to i32
%6 = add nsw i32 232, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @grey(float %0) {
%2 = fmul float %0, 2.300000e+01
%3 = fptosi float %2 to i32
%4 = add nsw i32 %3, 232
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ execl(char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ puts(char *);
void good() {
  puts("Win.");
  execl("/bin/sh", "sh", NULL);
}


x86 assembly (clang, -O0):
<good>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
lea    0xece(%rip),%rdi
lea    0xecc(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <execl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<good>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xed1(%rip),%rdi
lea    0xecf(%rip),%rsi
xor    %edx,%edx
pop    %rax
jmp    1040 <execl@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"Win.\00"
@.str.1 = [8 x i8] c"/bin/sh\00"
@.str.2 = [3 x i8] c"sh\00"
define void @good() {
%1 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* null)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"Win.\00"
@.str.1 = [8 x i8] c"/bin/sh\00"
@.str.2 = [3 x i8] c"sh\00"
define void @good() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @execl(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x16() {
  Assert_real((ispunct(22) == 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_ispunct.c",
              115, ("ispunct should be 0 for 0x16"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x16>:
push   %rax
mov    $0x16,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x73,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x16\00"
define void @t_ispunct_0x16() {
%1 = call i64 @ispunct(i32 22)
%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 115, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x16\00"
define void @t_ispunct_0x16() {
%1 = tail call i64 @ispunct(i32 22)
%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 115, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RemoteIO_SendMouseUp(int, int, int);
int /*<<< orphan*/ UpnpResponse_RemoteIOClient_RemoteInput_InputMouseUp(void *);
void UpnpRemoteIOClient_RemoteInput_InputMouseUp(void *upnptoken, int X, int Y,
                                                 int Button) {
  RemoteIO_SendMouseUp(X, Y, Button);
  UpnpResponse_RemoteIOClient_RemoteInput_InputMouseUp(upnptoken);
}


x86 assembly (clang, -O0):
<UpnpRemoteIOClient_RemoteInput_InputMouseUp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <RemoteIO_SendMouseUp@plt>
mov    -0x8(%rbp),%rdi
call   1040 <UpnpResponse_RemoteIOClient_RemoteInput_InputMouseUp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpRemoteIOClient_RemoteInput_InputMouseUp>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
mov    %edx,%esi
mov    %ecx,%edx
call   1030 <RemoteIO_SendMouseUp@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UpnpResponse_RemoteIOClient_RemoteInput_InputMouseUp@plt>

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

LLVM IR (-O2):
define void @UpnpRemoteIOClient_RemoteInput_InputMouseUp(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @RemoteIO_SendMouseUp(i32 %1, i32 %2, i32 %3)
%6 = tail call i32 @UpnpResponse_RemoteIOClient_RemoteInput_InputMouseUp(i8* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void ADCReferenceSet(uint32_t ui32Base, uint32_t ui32Ref) {
  ;
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000038))) =
      ((*((volatile uint32_t *)(ui32Base + 0x00000038))) & ~0x00000003) |
      ui32Ref;
}


x86 assembly (clang, -O0):
<ADCReferenceSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x38,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffffc,%ecx
or     -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x38,%eax
cltq
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCReferenceSet>:
movslq %edi,%rax
mov    0x38(%rax),%ecx
and    $0xfffffffc,%ecx
or     %esi,%ecx
mov    %ecx,0x38(%rax)
ret

LLVM IR (-O0):
define void @ADCReferenceSet(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 56
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -4
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 56
%15 = sext i32 %14 to i64
%16 = inttoptr i64 %15 to i32*
store volatile i32 %12, i32* %16
ret void
}

LLVM IR (-O2):
define void @ADCReferenceSet(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 56
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -4
%8 = or i32 %7, %1
store volatile i32 %8, i32* %5
ret void
}
/* Variables and functions */
double rint(double);
double _mesa_roundeven(double x) { return rint(x); }


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

x86 assembly (clang, -O2):
<_mesa_roundeven>:
jmp    1030 <rint@plt>

LLVM IR (-O0):
define double @_mesa_roundeven(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.rint.f64(double %3)
ret double %4
}

LLVM IR (-O2):
define double @_mesa_roundeven(double %0) {
%2 = tail call double @llvm.rint.f64(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void loser() { printf("you are loser!\n"); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"you are loser!\0A\00"
define void @loser() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"you are loser!\00"
define void @loser() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct evloop {
  int dummy;
};
struct ev {
  int dummy;
};

/* Variables and functions */
int _start_ev(struct evloop *, struct ev *);
int evsig_start(struct evloop *loop, struct ev *ev) {
  return _start_ev(loop, ev);
}


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

x86 assembly (clang, -O2):
<evsig_start>:
jmp    1030 <_start_ev@plt>

LLVM IR (-O0):
%struct.evloop = type { i32 }
%struct.ev = type { i32 }
define i32 @evsig_start(%struct.evloop* %0, %struct.ev* %1) {
%3 = alloca %struct.evloop*
%4 = alloca %struct.ev*
store %struct.evloop* %0, %struct.evloop** %3
store %struct.ev* %1, %struct.ev** %4
%5 = load %struct.evloop*, %struct.evloop** %3
%6 = load %struct.ev*, %struct.ev** %4
%7 = call i32 @_start_ev(%struct.evloop* %5, %struct.ev* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.evloop = type { i32 }
%struct.ev = type { i32 }
define i32 @evsig_start(%struct.evloop* %0, %struct.ev* %1) {
%3 = tail call i32 @_start_ev(%struct.evloop* %0, %struct.ev* %1)
ret i32 %3
}
int DRV_GET_DLOAD_INFO(unsigned char atCmdBuf[], unsigned int dloadType) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @DRV_GET_DLOAD_INFO(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 @DRV_GET_DLOAD_INFO(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
scalar_t__ islower(char);
char toupper(char);
char *strupr(char *s) {
  char *ret = s;
  while (*s != '\0') {
    if (islower(*s))
      *s = toupper(*s);
    ++s;
  }
  return ret;
}


x86 assembly (clang, -O0):
<strupr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     117f <strupr+0x5f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     116e <strupr+0x4e>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <toupper@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1134 <strupr+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strupr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1165 <strupr+0x45>
mov    %r14,%rbx
jmp    114c <strupr+0x2c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1165 <strupr+0x45>
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1140 <strupr+0x20>
movsbl (%rbx),%edi
call   1040 <toupper@plt>
mov    %al,(%rbx)
jmp    1140 <strupr+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strupr(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %12
%5 = phi i8 [ %14, %12 ], [ %2, %1 ]
%6 = phi i8* [ %13, %12 ], [ %0, %1 ]
%7 = tail call i64 @islower(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = load i8, i8* %6
%11 = tail call signext i8 @toupper(i8 signext %10)
store i8 %11, i8* %6
br label %12
12: ; preds = %9, %4
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %12, %1
ret i8* %0
}
void RTSemRWRequestReadNoResume(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemRWRequestReadNoResume() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *argv0) {
  fprintf(stderr, "Usage: %s -cvn [-o file] [-O fmt] [-f fmt] [files...]\n",
          argv0);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [55 x i8] c"Usage: %s -cvn [-o file] [-O fmt] [-f fmt] [files...]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [55 x i8] c"Usage: %s -cvn [-o file] [-O fmt] [-f fmt] [files...]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void relay_network_set_priority() {}


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

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

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

LLVM IR (-O2):
define void @relay_network_set_priority() {
ret void
}
void foo570() {}


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

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

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

LLVM IR (-O2):
define void @foo570() {
ret void
}
int a(int a[][3], int b[][3][5]) { return 0; }


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

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

LLVM IR (-O0):
define i32 @a([3 x i32]* %0, [3 x [5 x i32]]* %1) {
%3 = alloca [3 x i32]*
%4 = alloca [3 x [5 x i32]]*
store [3 x i32]* %0, [3 x i32]** %3
store [3 x [5 x i32]]* %1, [3 x [5 x i32]]** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @a([3 x i32]* nocapture readnone %0, [3 x [5 x i32]]* nocapture readnone %1) {
ret i32 0
}
void _dl_unload_cache(void) {}


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

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

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

LLVM IR (-O2):
define void @_dl_unload_cache() {
ret void
}
const char *__malidrv_build_info(void) {
  return "malidrv:  API_VERSION=401 REPO_URL= REVISION= CHANGED_REVISION= "
         "CHANGE_DATE= BUILD_DATE=Wed Dec  2 23:39:15 CET 2015 BUILD=debug "
         "TARGET_PLATFORM= MALI_PLATFORM= KDIR= "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP= USING_PROFILING=y "
         "USING_INTERNAL_PROFILING=y USING_GPU_UTILIZATION=1 "
         "USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [346 x i8] c"malidrv: API_VERSION=401 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Wed Dec 2 23:39:15 CET 2015 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP= USING_PROFILING=y USING_INTERNAL_PROFILING=y USING_GPU_UTILIZATION=1 USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([346 x i8], [346 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [346 x i8] c"malidrv: API_VERSION=401 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Wed Dec 2 23:39:15 CET 2015 BUILD=debug TARGET_PLATFORM= MALI_PLATFORM= KDIR= OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_UMP= USING_PROFILING=y USING_INTERNAL_PROFILING=y USING_GPU_UTILIZATION=1 USING_POWER_PERFORMANCE_POLICY= MALI_UPPER_HALF_SCHEDULING=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([346 x i8], [346 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ f1(char *);
void h(char c[]) { f1(c); }


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

x86 assembly (clang, -O2):
<h>:
jmp    1030 <f1@plt>

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

LLVM IR (-O2):
define void @h(i8* %0) {
%2 = tail call i32 @f1(i8* %0)
ret void
}
void ft_foreach(int *tab, int length, void (*f)(int)) {
  while (length-- > 0)
    f(*tab++);
}


x86 assembly (clang, -O0):
<ft_foreach>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    1143 <ft_foreach+0x43>
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    (%rcx),%edi
call   *%rax
jmp    1113 <ft_foreach+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_foreach>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    1131 <ft_foreach+0x31>
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rbx),%edi
add    $0x4,%rbx
call   *%r14
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1120 <ft_foreach+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @ft_foreach(i32* nocapture %0, i32 %1, void (i32)* nocapture %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %12
5: ; preds = %3, %5
%6 = phi i32* [ %9, %5 ], [ %0, %3 ]
%7 = phi i32 [ %8, %5 ], [ %1, %3 ]
%8 = add nsw i32 %7, -1
%9 = getelementptr inbounds i32, i32* %6, i64 1
%10 = load i32, i32* %6
tail call void %2(i32 %10)
%11 = icmp ugt i32 %7, 1
br i1 %11, label %5, label %12
12: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ telcmdStr(int);
int /*<<< orphan*/ teloptStr(int);
int /*<<< orphan*/ verboseOut(int, char *, char const *, int /*<<< orphan*/,
                              int /*<<< orphan*/);
void printCmdOpt(const char *str, int cmd, int opt) {
  verboseOut(2, "%s %s %s\r\n", str, telcmdStr(cmd), teloptStr(opt));
}


x86 assembly (clang, -O0):
<printCmdOpt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <telcmdStr@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
call   1040 <teloptStr@plt>
mov    -0x20(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    %eax,%r8d
mov    $0x2,%edi
lea    0xe8d(%rip),%rsi
call   1050 <verboseOut@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printCmdOpt>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rdi,%r14
mov    %esi,%edi
call   1030 <telcmdStr@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <teloptStr@plt>
lea    0xeb0(%rip),%rsi
mov    $0x2,%edi
mov    %r14,%rdx
mov    %ebp,%ecx
mov    %eax,%r8d
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <verboseOut@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%s %s %s\0D\0A\00"
define void @printCmdOpt(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = call i32 @telcmdStr(i32 %8)
%10 = load i32, i32* %6
%11 = call i32 @teloptStr(i32 %10)
%12 = call i32 @verboseOut(i32 2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s %s %s\0D\0A\00"
define void @printCmdOpt(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @telcmdStr(i32 %1)
%5 = tail call i32 @teloptStr(i32 %2)
%6 = tail call i32 @verboseOut(i32 2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %4, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ source_skip();
int source_skipn(int n) {
  while (n-- >= 0)
    if (!source_skip())
      break;
  return n;
}


x86 assembly (clang, -O0):
<source_skipn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jl     1149 <source_skipn+0x39>
mov    $0x0,%al
call   1030 <source_skip@plt>
cmp    $0x0,%eax
jne    1144 <source_skipn+0x34>
jmp    1149 <source_skipn+0x39>
jmp    111b <source_skipn+0xb>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<source_skipn>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
cmp    $0xffffffff,%edi
mov    $0xffffffff,%ebp
cmovl  %edi,%ebp
add    $0xffffffff,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %ebx,%ebx
js     1144 <source_skipn+0x34>
xor    %eax,%eax
call   1030 <source_skip@plt>
add    $0xffffffff,%ebx
test   %eax,%eax
jne    1130 <source_skipn+0x20>
jmp    1146 <source_skipn+0x36>
mov    %ebp,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @source_skipn(i32 %0) {
%2 = call i32 @llvm.smin.i32(i32 %0, i32 -1)
%3 = add i32 %2, -1
br label %4
4: ; preds = %8, %1
%5 = phi i32 [ %0, %1 ], [ %6, %8 ]
%6 = add nsw i32 %5, -1
%7 = icmp sgt i32 %5, -1
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = tail call i32 (...) @source_skip()
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %8, %4
%12 = phi i32 [ %6, %8 ], [ %3, %4 ]
ret i32 %12
}
/* Variables and functions */
float minimoDiDueNumeri(float, float);
float minimoDiTreNumeri(float numero1, float numero2, float numero3) {
  float parziale;
  parziale = minimoDiDueNumeri(numero1, numero2);
  if (numero3 > parziale) {
    return numero3;
  } else {
    return parziale;
  }
}


x86 assembly (clang, -O0):
<minimoDiTreNumeri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <minimoDiDueNumeri@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    1159 <minimoDiTreNumeri+0x49>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1163 <minimoDiTreNumeri+0x53>
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<minimoDiTreNumeri>:
push   %rax
movss  %xmm2,0x4(%rsp)
call   1030 <minimoDiDueNumeri@plt>
movss  0x4(%rsp),%xmm1
maxss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @minimoDiTreNumeri(float %0, float %1, float %2) {
%4 = alloca float
%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
%9 = load float, float* %5
%10 = load float, float* %6
%11 = call float @minimoDiDueNumeri(float %9, float %10)
store float %11, float* %8
%12 = load float, float* %7
%13 = load float, float* %8
%14 = fcmp ogt float %12, %13
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = load float, float* %7
store float %16, float* %4
br label %19
17: ; preds = %3
%18 = load float, float* %8
store float %18, float* %4
br label %19
19: ; preds = %17, %15
%20 = load float, float* %4
ret float %20
}

LLVM IR (-O2):
define float @minimoDiTreNumeri(float %0, float %1, float %2) {
%4 = tail call float @minimoDiDueNumeri(float %0, float %1)
%5 = fcmp olt float %4, %2
%6 = select i1 %5, float %2, float %4
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ my_write(int, char *, int);
void my_putchar(char c) { my_write(1, &c, 1); }


x86 assembly (clang, -O0):
<my_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edx
lea    -0x1(%rbp),%rsi
mov    %edx,%edi
call   1030 <my_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putchar>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <my_write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @my_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @my_write(i32 1, i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @my_putchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @my_write(i32 1, i8* %2, i32 1)
ret void
}