xunge/DecIR huggingface dataset:
int cr_overflow_set(unsigned this_cr) { return (this_cr & 0x1); }


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

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

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

LLVM IR (-O2):
define i32 @cr_overflow_set(i32 %0) {
%2 = and i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void destroy() { endwin(); }


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

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

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

LLVM IR (-O2):
define void @destroy() {
%1 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int divisors(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int i = 1;
  int n = 0;
  while (divisors(n) < 500) {
    n += i;
    i++;
  }
  printf("\nresult: %i\n", n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%edi
call   1040 <divisors@plt>
cmp    $0x1f4,%eax
jge    116e <main+0x4e>
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1144 <main+0x24>
mov    -0x18(%rbp),%esi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %edi,%edi
call   1040 <divisors@plt>
cmp    $0x1f3,%eax
jg     1153 <main+0x33>
mov    $0x1,%ebp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
add    %ebp,%ebx
add    $0x1,%ebp
mov    %ebx,%edi
call   1040 <divisors@plt>
cmp    $0x1f4,%eax
jl     1140 <main+0x20>
lea    0xea6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"\0Aresult: %i\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @divisors(i32 0)
%4 = icmp slt i32 %3, 500
br i1 %4, label %5, label %12
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 0, %2 ]
%7 = phi i32 [ %9, %5 ], [ 1, %2 ]
%8 = add nuw nsw i32 %6, %7
%9 = add nuw nsw i32 %7, 1
%10 = tail call i32 @divisors(i32 %8)
%11 = icmp slt i32 %10, 500
br i1 %11, label %5, label %12
12: ; preds = %5, %2
%13 = phi i32 [ 0, %2 ], [ %8, %5 ]
%14 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cBreak();
int /*<<< orphan*/ dash();
void sM() {
  dash();
  dash();
  cBreak();
}


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

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

LLVM IR (-O0):
define void @sM() {
%1 = call i32 (...) @dash()
%2 = call i32 (...) @dash()
%3 = call i32 (...) @cBreak()
ret void
}

LLVM IR (-O2):
define void @sM() {
%1 = tail call i32 (...) @dash()
%2 = tail call i32 (...) @dash()
%3 = tail call i32 (...) @cBreak()
ret void
}
void I422ToAR30Row_C() {}


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

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

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

LLVM IR (-O2):
define void @I422ToAR30Row_C() {
ret void
}
void CRYPTO_lock(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_lock() {
ret void
}
unsigned int shift_16_bit_feedback_register() {
  static unsigned int register_16 = 1;
  unsigned int new_bit;
  new_bit = (register_16 & 0x01) ^ ((register_16 & 0x04) >> 2) ^
            ((register_16 & 0x08) >> 3) ^ ((register_16 & 0x20) >> 5);
  register_16 = register_16 >> 1;
  register_16 = register_16 | (new_bit << 15);
  return (register_16);
}


x86 assembly (clang, -O0):
<shift_16_bit_feedback_register>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f16(%rip),%eax
and    $0x1,%eax
mov    0x2f0d(%rip),%ecx
and    $0x4,%ecx
shr    $0x2,%ecx
xor    %ecx,%eax
mov    0x2eff(%rip),%ecx
and    $0x8,%ecx
shr    $0x3,%ecx
xor    %ecx,%eax
mov    0x2ef1(%rip),%ecx
and    $0x20,%ecx
shr    $0x5,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    0x2ee0(%rip),%eax
shr    $0x1,%eax
mov    %eax,0x2ed7(%rip)
mov    0x2ed1(%rip),%eax
mov    -0x4(%rbp),%ecx
shl    $0xf,%ecx
or     %ecx,%eax
mov    %eax,0x2ec3(%rip)
mov    0x2ebd(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_16_bit_feedback_register>:
mov    0x2f1a(%rip),%ecx
mov    %ecx,%eax
shr    $0x2,%eax
xor    %ecx,%eax
mov    %ecx,%edx
shr    $0x3,%edx
mov    %ecx,%esi
shr    $0x5,%esi
xor    %edx,%esi
xor    %eax,%esi
shr    %ecx
shl    $0xf,%esi
movzwl %si,%eax
or     %ecx,%eax
mov    %eax,0x2ef5(%rip)
ret

LLVM IR (-O0):
@shift_16_bit_feedback_register.register_16 = internal global i32 1
define i32 @shift_16_bit_feedback_register() {
%1 = alloca i32
%2 = load i32, i32* @shift_16_bit_feedback_register.register_16
%3 = and i32 %2, 1
%4 = load i32, i32* @shift_16_bit_feedback_register.register_16
%5 = and i32 %4, 4
%6 = lshr i32 %5, 2
%7 = xor i32 %3, %6
%8 = load i32, i32* @shift_16_bit_feedback_register.register_16
%9 = and i32 %8, 8
%10 = lshr i32 %9, 3
%11 = xor i32 %7, %10
%12 = load i32, i32* @shift_16_bit_feedback_register.register_16
%13 = and i32 %12, 32
%14 = lshr i32 %13, 5
%15 = xor i32 %11, %14
store i32 %15, i32* %1
%16 = load i32, i32* @shift_16_bit_feedback_register.register_16
%17 = lshr i32 %16, 1
store i32 %17, i32* @shift_16_bit_feedback_register.register_16
%18 = load i32, i32* @shift_16_bit_feedback_register.register_16
%19 = load i32, i32* %1
%20 = shl i32 %19, 15
%21 = or i32 %18, %20
store i32 %21, i32* @shift_16_bit_feedback_register.register_16
%22 = load i32, i32* @shift_16_bit_feedback_register.register_16
ret i32 %22
}

LLVM IR (-O2):
@shift_16_bit_feedback_register.register_16 = internal unnamed_addr global i32 1
define i32 @shift_16_bit_feedback_register() {
%1 = load i32, i32* @shift_16_bit_feedback_register.register_16
%2 = lshr i32 %1, 2
%3 = xor i32 %2, %1
%4 = lshr i32 %1, 3
%5 = xor i32 %3, %4
%6 = lshr i32 %1, 5
%7 = xor i32 %5, %6
%8 = lshr i32 %1, 1
%9 = shl i32 %7, 15
%10 = and i32 %9, 32768
%11 = or i32 %10, %8
store i32 %11, i32* @shift_16_bit_feedback_register.register_16
ret i32 %11
}
/* Variables and functions */
void *memset(void *ptr, int val, size_t n) {
  unsigned char *buf = (unsigned char *)ptr;
  size_t i = 0;
  do {
    *buf = (unsigned char)val;
  } while (buf -= sizeof(unsigned char) && ++i < n);
  return ptr;
}


x86 assembly (clang, -O0):
<memset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
cmp    -0x18(%rbp),%rax
setb   %al
and    $0x1,%al
movzbl %al,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    111f <memset+0x1f>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memset>:
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nop
mov    %sil,(%rdi)
cmp    %rdx,%rax
sbb    $0x0,%rdi
add    $0x1,%rax
jmp    1110 <memset+0x10>

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

LLVM IR (-O2):
define noalias i8* @memset(i8* nocapture writeonly %0, i32 %1, i64 %2) {
%4 = trunc i32 %1 to i8
br label %5
5: ; preds = %5, %3
%6 = phi i8* [ %0, %3 ], [ %11, %5 ]
%7 = phi i64 [ 0, %3 ], [ %8, %5 ]
store i8 %4, i8* %6
%8 = add i64 %7, 1
%9 = icmp ult i64 %8, %2
%10 = sext i1 %9 to i64
%11 = getelementptr inbounds i8, i8* %6, i64 %10
br label %5
}
/* Variables and functions */
char UART0_GetChar();
int /*<<< orphan*/ UART0_Port_Init();
int /*<<< orphan*/ UART0_PutChar(char);
int /*<<< orphan*/ UART0_SendString(char *);
int /*<<< orphan*/ UART0_Set_BaudRate();
int /*<<< orphan*/ UART0_Set_Format();
int main() {
  char data;
  UART0_Port_Init();
  UART0_Set_BaudRate();
  UART0_Set_Format();
  UART0_SendString("Hello World!\n\r");
  while (1) {
    data = UART0_GetChar();
    UART0_PutChar(data + 1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <UART0_Port_Init@plt>
mov    $0x0,%al
call   1060 <UART0_Set_BaudRate@plt>
mov    $0x0,%al
call   1070 <UART0_Set_Format@plt>
lea    0xe75(%rip),%rdi
call   1050 <UART0_SendString@plt>
mov    $0x0,%al
call   1080 <UART0_GetChar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movsbl %al,%edi
call   1030 <UART0_PutChar@plt>
jmp    1190 <main+0x30>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <UART0_Port_Init@plt>
xor    %eax,%eax
call   1060 <UART0_Set_BaudRate@plt>
xor    %eax,%eax
call   1070 <UART0_Set_Format@plt>
lea    0xe83(%rip),%rdi
call   1050 <UART0_SendString@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1080 <UART0_GetChar@plt>
add    $0x1,%al
movsbl %al,%edi
call   1030 <UART0_PutChar@plt>
jmp    1190 <main+0x30>

LLVM IR (-O0):
@.str = [15 x i8] c"Hello World!\0A\0D\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 (...) @UART0_Port_Init()
%4 = call i32 (...) @UART0_Set_BaudRate()
%5 = call i32 (...) @UART0_Set_Format()
%6 = call i32 @UART0_SendString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %0, %7
%8 = call signext i8 (...) @UART0_GetChar()
store i8 %8, i8* %2
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = add nsw i32 %10, 1
%12 = trunc i32 %11 to i8
%13 = call i32 @UART0_PutChar(i8 signext %12)
br label %7
}

LLVM IR (-O2):
@.str = [15 x i8] c"Hello World!\0A\0D\00"
define i32 @main() {
%1 = tail call i32 (...) @UART0_Port_Init()
%2 = tail call i32 (...) @UART0_Set_BaudRate()
%3 = tail call i32 (...) @UART0_Set_Format()
%4 = tail call i32 @UART0_SendString(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %5, %0
%6 = tail call signext i8 (...) @UART0_GetChar()
%7 = add i8 %6, 1
%8 = tail call i32 @UART0_PutChar(i8 signext %7)
br label %5
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
__attribute__((always_)) uint64_t detexPixel64GetR16(uint64_t pixel) {
  return pixel & 0xFFFF;
}


x86 assembly (clang, -O0):
<detexPixel64GetR16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<detexPixel64GetR16>:
movzwl %di,%eax
ret

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

LLVM IR (-O2):
define i32 @detexPixel64GetR16(i32 %0) {
%2 = and i32 %0, 65535
ret i32 %2
}
/* Variables and functions */
double signbit(double);
double function_signbit(double x) { return signbit(x); }


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

x86 assembly (clang, -O2):
<function_signbit>:
jmp    1030 <signbit@plt>

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

LLVM IR (-O2):
define double @function_signbit(double %0) {
%2 = tail call double @signbit(double %0)
ret double %2
}
/* Type definitions */
struct timespec {
  long long tv_nsec;
  scalar_t__ tv_sec;
};
typedef long long int64_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
int clock_gettime(int, struct timespec *);
int /*<<< orphan*/ perror(char *);
int64_t read_nanos(int type) {
  struct timespec ts;
  int rv = clock_gettime(type, &ts);
  if (rv < 0) {
    perror("clock_gettime");
    abort();
  }
  return (int64_t)ts.tv_sec * 1000000000LL + ts.tv_nsec;
}


x86 assembly (clang, -O0):
<read_nanos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
call   1040 <clock_gettime@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1167 <read_nanos+0x37>
lea    0xea5(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
imul   $0x3b9aca00,-0x10(%rbp),%rax
3b
add    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_nanos>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
call   1040 <clock_gettime@plt>
test   %eax,%eax
js     1155 <read_nanos+0x25>
imul   $0x3b9aca00,0x10(%rsp),%rax
9a 3b
add    0x8(%rsp),%rax
add    $0x18,%rsp
ret
lea    0xea4(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
@.str = [14 x i8] c"clock_gettime\00"
define i64 @read_nanos(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @clock_gettime(i32 %5, %struct.timespec* %3)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %1
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%14 = load i64, i64* %13
%15 = mul nsw i64 %14, 1000000000
%16 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%17 = load i64, i64* %16
%18 = add nsw i64 %15, %17
ret i64 %18
}

LLVM IR (-O2):
%struct.timespec = type { i64, i64 }
@.str = [14 x i8] c"clock_gettime\00"
define i64 @read_nanos(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = call i32 @clock_gettime(i32 %0, %struct.timespec* %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %1
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
%11 = load i64, i64* %10
%12 = mul nsw i64 %11, 1000000000
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
%14 = load i64, i64* %13
%15 = add nsw i64 %12, %14
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xf8() {
  Assert_real((iscntrl(248) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              1245, ("iscntrl should be 0 for 0xf8"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xf8\00"
define void @t_iscntrl_0xf8() {
%1 = call i64 @iscntrl(i32 248)
%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 1245, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xf8\00"
define void @t_iscntrl_0xf8() {
%1 = tail call i64 @iscntrl(i32 248)
%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 1245, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ net_usleep(unsigned int);
void network_sleep(unsigned int microseconds) { net_usleep(microseconds); }


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

x86 assembly (clang, -O2):
<network_sleep>:
jmp    1030 <net_usleep@plt>

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

LLVM IR (-O2):
define void @network_sleep(i32 %0) {
%2 = tail call i32 @net_usleep(i32 %0)
ret void
}
void pattern2inslash() {}


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

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

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

LLVM IR (-O2):
define void @pattern2inslash() {
ret void
}
int quicktime_minor() { return 2; }


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

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

LLVM IR (-O0):
define i32 @quicktime_minor() {
ret i32 2
}

LLVM IR (-O2):
define i32 @quicktime_minor() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sigint_handler(int sig) { printf("foo\n"); }


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

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

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

LLVM IR (-O2):
@str = [4 x i8] c"foo\00"
define void @sigint_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
void *GetVbrTag(void *x, void *y) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @GetVbrTag(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ countSort(int *, int, int);
int getMax(int *, int);
void radixsort(int *arr, int n) {
  int m = getMax(arr, n);
  int exp;
  for (exp = 1; m / exp > 0; exp *= 10)
    countSort(arr, n, exp);
}


x86 assembly (clang, -O0):
<radixsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <getMax@plt>
mov    %eax,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0x14(%rbp)
cmp    $0x0,%eax
jle    1170 <radixsort+0x50>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <countSort@plt>
imul   $0xa,-0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1145 <radixsort+0x25>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radixsort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%r15
call   1040 <getMax@plt>
test   %eax,%eax
jle    115b <radixsort+0x3b>
mov    %eax,%ebp
mov    $0x1,%ebx
nopl   (%rax)
mov    %r15,%rdi
mov    %r14d,%esi
mov    %ebx,%edx
call   1030 <countSort@plt>
add    %ebx,%ebx
lea    (%rbx,%rbx,4),%ebx
mov    %ebp,%eax
cltd
idiv   %ebx
test   %eax,%eax
jg     1140 <radixsort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @radixsort(i32* %0, i32 %1) {
%3 = tail call i32 @getMax(i32* %0, i32 %1)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 1, %2 ]
%7 = tail call i32 @countSort(i32* %0, i32 %1, i32 %6)
%8 = mul nsw i32 %6, 10
%9 = sdiv i32 %3, %8
%10 = icmp sgt i32 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ several_dereferences_ok(int *, int *, int *);
void report_correct_error_among_multiple_bad() {
  int *p = NULL;
  several_dereferences_ok(p, p, p);
}


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

x86 assembly (clang, -O2):
<report_correct_error_among_multiple_bad>:
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <several_dereferences_ok@plt>

LLVM IR (-O0):
define void @report_correct_error_among_multiple_bad() {
%1 = alloca i32*
store i32* null, i32** %1
%2 = load i32*, i32** %1
%3 = load i32*, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @several_dereferences_ok(i32* %2, i32* %3, i32* %4)
ret void
}

LLVM IR (-O2):
define void @report_correct_error_among_multiple_bad() {
%1 = tail call i32 @several_dereferences_ok(i32* null, i32* null, i32* null)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
int strlen(char const *);
char *gt1_name_context_strdup(const char *s) {
  int len;
  char *new;
  len = strlen(s);
  new = ((char *)malloc((len + 1) * sizeof(char)));
  memcpy(new, s, len);
  new[len] = '\0';
  return new;
}


x86 assembly (clang, -O0):
<gt1_name_context_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt1_name_context_strdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %eax,%r15d
lea    0x1(%r15),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1040 <memcpy@plt>
movslq %r15d,%rax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @gt1_name_context_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = mul i64 %9, 1
%11 = trunc i64 %10 to i32
%12 = call i64 @malloc(i32 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %4
%14 = load i8*, i8** %4
%15 = load i8*, i8** %2
%16 = load i32, i32* %3
%17 = call i32 @memcpy(i8* %14, i8* %15, i32 %16)
%18 = load i8*, i8** %4
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
store i8 0, i8* %21
%22 = load i8*, i8** %4
ret i8* %22
}

LLVM IR (-O2):
define i8* @gt1_name_context_strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i32 %2)
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
store i8 0, i8* %8
ret i8* %5
}
/* Variables and functions */
int PATH_MAX;
int /*<<< orphan*/ execl(char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int main(int argc, char *argv[]) {
  char pyfile[PATH_MAX];
  sprintf(pyfile, "%s.py", argv[0]);
  execl(pyfile, pyfile, NULL);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x28(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe97(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x28(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    %rsi,%rdi
call   1040 <execl@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    0x2ec3(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    (%rsi),%rdx
lea    0xeb6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
call   1040 <execl@plt>
xor    %eax,%eax
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@PATH_MAX = global i32 0
@.str = [6 x i8] c"%s.py\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = load i32, i32* @PATH_MAX
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %5
%10 = alloca i8, i64 %8
store i64 %8, i64* %6
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = call i32 @execl(i8* %10, i8* %10, i32* null)
%16 = load i8*, i8** %5
ret i32 0
}

LLVM IR (-O2):
@PATH_MAX = global i32 0
@.str = [6 x i8] c"%s.py\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i32, i32* @PATH_MAX
%4 = zext i32 %3 to i64
%5 = alloca i8, i64 %4
%6 = load i8*, i8** %1
%7 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i32 @execl(i8* %5, i8* %5, i32* null)
ret i32 0
}
void bigadd(int *sn, int *n) {
  int i, tmp, c = 0;
  for (i = 0; i < 600; i++) {
    tmp = sn[i] + n[i] + c;
    sn[i] = tmp % 10;
    c = tmp / 10;
  }
}


x86 assembly (clang, -O0):
<bigadd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x258,-0x14(%rbp)
jge    1175 <bigadd+0x75>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
add    (%rcx,%rdx,4),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111a <bigadd+0x1a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigadd>:
xor    %eax,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    (%rdi,%rax,4),%ecx
add    (%rsi,%rax,4),%ecx
movslq %ecx,%r8
imul   $0x66666667,%r8,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%r8d
mov    %r8d,(%rdi,%rax,4)
add    $0x1,%rax
cmp    $0x258,%rax
jne    1110 <bigadd+0x10>
ret

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

LLVM IR (-O2):
define void @bigadd(i32* nocapture %0, i32* nocapture %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %14, %3 ]
%5 = phi i32 [ 0, %2 ], [ %13, %3 ]
%6 = getelementptr inbounds i32, i32* %0, i64 %4
%7 = load i32, i32* %6
%8 = getelementptr inbounds i32, i32* %1, i64 %4
%9 = load i32, i32* %8
%10 = add i32 %7, %5
%11 = add i32 %10, %9
%12 = srem i32 %11, 10
store i32 %12, i32* %6
%13 = sdiv i32 %11, 10
%14 = add nuw nsw i64 %4, 1
%15 = icmp eq i64 %14, 600
br i1 %15, label %16, label %3
16: ; preds = %3
ret void
}
long mul_long(long arg1, long arg2) { return arg1 * arg2; }


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

x86 assembly (clang, -O2):
<mul_long>:
mov    %rdi,%rax
imul   %rsi,%rax
ret

LLVM IR (-O0):
define i64 @mul_long(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 = mul nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @mul_long(i64 %0, i64 %1) {
%3 = mul nsw i64 %1, %0
ret i64 %3
}
/* Variables and functions */
scalar_t__ max_lex_val();
int /*<<< orphan*/ set_lex_val(int, scalar_t__);
void assign_greatest_precedence(int symnum) {
  set_lex_val(symnum, max_lex_val() + 1);
}


x86 assembly (clang, -O0):
<assign_greatest_precedence>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <max_lex_val@plt>
mov    -0x8(%rbp),%edi
mov    %rax,%rsi
add    $0x1,%rsi
call   1040 <set_lex_val@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assign_greatest_precedence>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <max_lex_val@plt>
lea    0x1(%rax),%rsi
mov    %ebx,%edi
pop    %rbx
jmp    1040 <set_lex_val@plt>

LLVM IR (-O0):
define void @assign_greatest_precedence(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 (...) @max_lex_val()
%5 = add nsw i64 %4, 1
%6 = call i32 @set_lex_val(i32 %3, i64 %5)
ret void
}

LLVM IR (-O2):
define void @assign_greatest_precedence(i32 %0) {
%2 = tail call i64 (...) @max_lex_val()
%3 = add nsw i64 %2, 1
%4 = tail call i32 @set_lex_val(i32 %0, i64 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_mmap;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int /*<<< orphan*/ *, int, int,
                           int, int, int);
int main(int argc, char **argv) {
  for (;;) {
    (void)syscall(SYS_mmap, NULL, 1, 2, 3, -1, 0x12345678);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    $0x3,%r8d
mov    $0xffffffff,%r9d
movl   $0x12345678,(%rsp)
call   1030 <syscall@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x2ec4(%rip),%rbx
nopl   0x0(%rax)
mov    (%rbx),%edi
movl   $0x12345678,(%rsp)
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    $0x3,%r8d
mov    $0xffffffff,%r9d
call   1030 <syscall@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
@SYS_mmap = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %6
6: ; preds = %6, %2
%7 = load i32, i32* @SYS_mmap
%8 = call i32 @syscall(i32 %7, i32* null, i32 1, i32 2, i32 3, i32 -1, i32 305419896)
br label %6
}

LLVM IR (-O2):
@SYS_mmap = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = load i32, i32* @SYS_mmap
%5 = tail call i32 @syscall(i32 %4, i32* null, i32 1, i32 2, i32 3, i32 -1, i32 305419896)
br label %3
}
double func(double x, double a0, double b1, double b2) {
  double f = a0 / (1 + b1 * x + b2 * x * x);
  return (f);
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xecd(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
mulsd  %xmm0,%xmm2
addsd  0xef4(%rip),%xmm2
mulsd  %xmm0,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
divsd  %xmm3,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @func(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%10 = load double, double* %6
%11 = load double, double* %7
%12 = load double, double* %5
%13 = call double @llvm.fmuladd.f64(double %11, double %12, double 1.000000e+00)
%14 = load double, double* %8
%15 = load double, double* %5
%16 = fmul double %14, %15
%17 = load double, double* %5
%18 = call double @llvm.fmuladd.f64(double %16, double %17, double %13)
%19 = fdiv double %10, %18
store double %19, double* %9
%20 = load double, double* %9
ret double %20
}

LLVM IR (-O2):
define double @func(double %0, double %1, double %2, double %3) {
%5 = tail call double @llvm.fmuladd.f64(double %2, double %0, double 1.000000e+00)
%6 = fmul double %0, %3
%7 = tail call double @llvm.fmuladd.f64(double %6, double %0, double %5)
%8 = fdiv double %1, %7
ret double %8
}
/* Variables and functions */
size_t reverse(size_t num) {
  size_t n = 0;
  while (num != 0) {
    size_t digit = num % 10;
    n = n * 10 + digit;
    num /= 10;
  }
  return n;
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1151 <reverse+0x51>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,-0x18(%rbp)
imul   $0xa,-0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x8(%rbp)
jmp    1110 <reverse+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
test   %rdi,%rdi
je     114a <reverse+0x4a>
mov    %rdi,%rcx
xor    %eax,%eax
movabs $0xcccccccccccccccd,%r8
cc cc cc
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    (%rax,%rax,4),%rsi
mov    %rcx,%rax
mul    %r8
shr    $0x3,%rdx
lea    (%rdx,%rdx,1),%rax
lea    (%rax,%rax,4),%rax
mov    %rcx,%rdi
sub    %rax,%rdi
lea    (%rdi,%rsi,2),%rax
cmp    $0x9,%rcx
mov    %rdx,%rcx
ja     1120 <reverse+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @reverse(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %5
5: ; preds = %8, %1
%6 = load i64, i64* %2
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i64, i64* %2
%10 = urem i64 %9, 10
store i64 %10, i64* %4
%11 = load i64, i64* %3
%12 = mul i64 %11, 10
%13 = load i64, i64* %4
%14 = add i64 %12, %13
store i64 %14, i64* %3
%15 = load i64, i64* %2
%16 = udiv i64 %15, 10
store i64 %16, i64* %2
br label %5
17: ; preds = %5
%18 = load i64, i64* %3
ret i64 %18
}

LLVM IR (-O2):
define i64 @reverse(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %9, %3 ], [ %0, %1 ]
%5 = phi i64 [ %8, %3 ], [ 0, %1 ]
%6 = urem i64 %4, 10
%7 = mul i64 %5, 10
%8 = add i64 %6, %7
%9 = udiv i64 %4, 10
%10 = icmp ult i64 %4, 10
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i64 [ 0, %1 ], [ %8, %3 ]
ret i64 %12
}
int main(void) {
  printf("Ariel Augusto dos Santos");
  printf("\n \t Ariel  \n 16 anos \n 166cm");
  float a = 2.346728;
  printf("%.1f %.2f %.3f %.5f", &a, &a, &a, &a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  0xebd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
lea    0xeeb(%rip),%rdi
lea    -0x8(%rbp),%r8
mov    %r8,%rsi
mov    %r8,%rdx
mov    %r8,%rcx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x401630cb,0x4(%rsp)
40
lea    0xefa(%rip),%rdi
lea    0x4(%rsp),%rcx
mov    %rcx,%rsi
mov    %rcx,%rdx
mov    %rcx,%r8
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Ariel Augusto dos Santos\00"
@.str.1 = [29 x i8] c"\0A \09 Ariel \0A 16 anos \0A 166cm\00"
@.str.2 = [20 x i8] c"%.1f %.2f %.3f %.5f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
store float 0x4002C61960000000, float* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), float* %2, float* %2, float* %2, float* %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Ariel Augusto dos Santos\00"
@.str.1 = [29 x i8] c"\0A \09 Ariel \0A 16 anos \0A 166cm\00"
@.str.2 = [20 x i8] c"%.1f %.2f %.3f %.5f\00"
define i32 @main() {
%1 = alloca float
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%4 = bitcast float* %1 to i8*
store float 0x4002C61960000000, float* %1
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), float* %1, float* %1, float* %1, float* %1)
ret i32 0
}
int rubix_color(int side) {
  switch (side) {
  case 0:
    return 0;
  case 1:
    return 1;
  case 2:
    return 2;
  case 3:
    return 3;
  case 4:
    return 4;
  case 5:
    return 5;
  }
}


x86 assembly (clang, -O0):
<rubix_color>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x5,%rax
ja     116f <rubix_color+0x6f>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    116f <rubix_color+0x6f>
movl   $0x1,-0x4(%rbp)
jmp    116f <rubix_color+0x6f>
movl   $0x2,-0x4(%rbp)
jmp    116f <rubix_color+0x6f>
movl   $0x3,-0x4(%rbp)
jmp    116f <rubix_color+0x6f>
movl   $0x4,-0x4(%rbp)
jmp    116f <rubix_color+0x6f>
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rubix_color>:
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
cmp    $0x5,%ecx
cmovb  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @rubix_color(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 5
%4 = select i1 %3, i32 %0, i32 0
ret i32 %4
}
char *ld_get_type(struct loaddisplay *ld) { return "LoadDisplay"; }


x86 assembly (clang, -O0):
<ld_get_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.loaddisplay = type opaque
@.str = [12 x i8] c"LoadDisplay\00"
define i8* @ld_get_type(%struct.loaddisplay* %0) {
%2 = alloca %struct.loaddisplay*
store %struct.loaddisplay* %0, %struct.loaddisplay** %2
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.loaddisplay = type opaque
@.str = [12 x i8] c"LoadDisplay\00"
define i8* @ld_get_type(%struct.loaddisplay* nocapture readnone %0) {
ret i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0)
}
int stepHash(int key) { return 3 - (key % 3); }


x86 assembly (clang, -O0):
<stepHash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    $0x3,%eax
sub    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stepHash>:
movslq %edi,%rcx
imul   $0x55555556,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rax
add    %edx,%eax
lea    (%rax,%rax,2),%eax
sub    %ecx,%eax
add    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @stepHash(i32 %0) {
%2 = srem i32 %0, 3
%3 = sub nsw i32 3, %2
ret i32 %3
}
/* Type definitions */
struct object {
  int dummy;
};
struct cons {
  int dummy;
};

/* Variables and functions */
struct cons *create_cons0(struct object *, struct object *);
struct cons *create_cons(struct object *head, struct object *tail) {
  struct cons *cons = create_cons0(head, tail);
  return cons;
}


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

x86 assembly (clang, -O2):
<create_cons>:
jmp    1030 <create_cons0@plt>

LLVM IR (-O0):
%struct.cons = type { i32 }
%struct.object = type { i32 }
define %struct.cons* @create_cons(%struct.object* %0, %struct.object* %1) {
%3 = alloca %struct.object*
%4 = alloca %struct.object*
%5 = alloca %struct.cons*
store %struct.object* %0, %struct.object** %3
store %struct.object* %1, %struct.object** %4
%6 = load %struct.object*, %struct.object** %3
%7 = load %struct.object*, %struct.object** %4
%8 = call %struct.cons* @create_cons0(%struct.object* %6, %struct.object* %7)
store %struct.cons* %8, %struct.cons** %5
%9 = load %struct.cons*, %struct.cons** %5
ret %struct.cons* %9
}

LLVM IR (-O2):
%struct.cons = type { i32 }
%struct.object = type { i32 }
define %struct.cons* @create_cons(%struct.object* %0, %struct.object* %1) {
%3 = tail call %struct.cons* @create_cons0(%struct.object* %0, %struct.object* %1)
ret %struct.cons* %3
}
int RAND_egd_bytes(const char *path, int bytes) { return (-1); }


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

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

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

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