xunge/DecIR huggingface dataset:
long symnewyear(int symyear) {
  int E;
  E = symyear - 1;
  return -678575.0 + 364.0 * E + 7.0 * (int)((52.0 * E + 146.0) / 293.0);
}


x86 assembly (clang, -O0):
<symnewyear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xf03(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xeff(%rip),%xmm0
addsd  %xmm0,%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xed2(%rip),%xmm2
addsd  %xmm2,%xmm0
movsd  0xeb6(%rip),%xmm2
divsd  %xmm2,%xmm0
cvttsd2si %xmm0,%eax
cvtsi2sd %eax,%xmm0
movsd  0xe9a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<symnewyear>:
add    $0xffffffff,%edi
cvtsi2sd %edi,%xmm0
movsd  0xef1(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeed(%rip),%xmm1
mulsd  0xeed(%rip),%xmm0
addsd  0xeed(%rip),%xmm0
divsd  0xeed(%rip),%xmm0
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
mulsd  0xee5(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
ret

LLVM IR (-O0):
define i64 @symnewyear(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 1
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sitofp i32 %6 to double
%8 = call double @llvm.fmuladd.f64(double 3.640000e+02, double %7, double -6.785750e+05)
%9 = load i32, i32* %3
%10 = sitofp i32 %9 to double
%11 = call double @llvm.fmuladd.f64(double 5.200000e+01, double %10, double 1.460000e+02)
%12 = fdiv double %11, 2.930000e+02
%13 = fptosi double %12 to i32
%14 = sitofp i32 %13 to double
%15 = call double @llvm.fmuladd.f64(double 7.000000e+00, double %14, double %8)
%16 = fptosi double %15 to i64
ret i64 %16
}

LLVM IR (-O2):
define i64 @symnewyear(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = sitofp i32 %2 to double
%4 = tail call double @llvm.fmuladd.f64(double %3, double 3.640000e+02, double -6.785750e+05)
%5 = tail call double @llvm.fmuladd.f64(double %3, double 5.200000e+01, double 1.460000e+02)
%6 = fdiv double %5, 2.930000e+02
%7 = fptosi double %6 to i32
%8 = sitofp i32 %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %8, double 7.000000e+00, double %4)
%10 = fptosi double %9 to i64
ret i64 %10
}
/* Variables and functions */
int strlen(char *);
long hash(char *word) {
  long result = 42;
  int i = 0;
  for (; i < strlen(word); i++) {
    result += word[i] * (i + 1);
  }
  return result;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x2a,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    1174 <hash+0x64>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
cltq
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <hash+0x1b>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    $0x2a,%r15d
test   %eax,%eax
jle    1150 <hash+0x40>
xor    %ebx,%ebx
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%eax
add    $0x1,%rbx
imul   %ebx,%eax
cltq
add    %rax,%r15
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1130 <hash+0x20>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @hash(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %18
4: ; preds = %1, %4
%5 = phi i64 [ %10, %4 ], [ 0, %1 ]
%6 = phi i64 [ %14, %4 ], [ 42, %1 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %5
%8 = load i8, i8* %7
%9 = sext i8 %8 to i64
%10 = add nuw nsw i64 %5, 1
%11 = mul i64 %10, %9
%12 = shl i64 %11, 32
%13 = ashr exact i64 %12, 32
%14 = add nsw i64 %6, %13
%15 = tail call i32 @strlen(i8* %0)
%16 = sext i32 %15 to i64
%17 = icmp slt i64 %10, %16
br i1 %17, label %4, label %18
18: ; preds = %4, %1
%19 = phi i64 [ 42, %1 ], [ %14, %4 ]
ret i64 %19
}
/* Variables and functions */
int /*<<< orphan*/ print_it(char const **);
int print_routine(const char *salutation, const char *name) {
  const char *strings[] = {salutation, name};
  print_it(strings);
  return 0;
}


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

x86 assembly (clang, -O2):
<print_routine>:
sub    $0x18,%rsp
mov    %rdi,(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rsp,%rdi
call   1030 <print_it@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @print_routine(i8* %0, i8* %1) {
%3 = alloca [2 x i8*]
%4 = bitcast [2 x i8*]* %3 to i8*
%5 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 0
store i8* %0, i8** %5
%6 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 1
store i8* %1, i8** %6
%7 = call i32 @print_it(i8** %5)
ret i32 0
}
/* Variables and functions */
unsigned long UINT_MAX;
unsigned long strtoul(char const *, char **, int /*<<< orphan*/);
int parse_uint(const char *str, unsigned int *u) {
  char *end;
  unsigned long ul = strtoul(str, &end, 0);
  if (*end)
    return 1;
  if (ul > UINT_MAX)
    return 1;
  *u = (unsigned int)ul;
  return 0;
}


x86 assembly (clang, -O0):
<parse_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
xor    %edx,%edx
call   1030 <strtoul@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     114c <parse_uint+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    117f <parse_uint+0x6f>
mov    -0x28(%rbp),%rax
mov    0x2e91(%rip),%rcx
cmp    (%rcx),%rax
jbe    116c <parse_uint+0x5c>
movl   $0x1,-0x4(%rbp)
jmp    117f <parse_uint+0x6f>
mov    -0x28(%rbp),%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_uint>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
xor    %edx,%edx
call   1030 <strtoul@plt>
mov    %rax,%rcx
mov    0x8(%rsp),%rax
cmpb   $0x0,(%rax)
mov    $0x1,%eax
jne    1146 <parse_uint+0x36>
mov    0x2eab(%rip),%rdx
cmp    (%rdx),%rcx
ja     1146 <parse_uint+0x36>
mov    %ecx,(%rbx)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@UINT_MAX = global i64 0
define i32 @parse_uint(i8* %0, i32* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i64 @strtoul(i8* %0, i8** %3, i32 0)
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
%9 = load i64, i64* @UINT_MAX
%10 = icmp ugt i64 %5, %9
%11 = select i1 %8, i1 true, i1 %10
br i1 %11, label %14, label %12
12: ; preds = %2
%13 = trunc i64 %5 to i32
store i32 %13, i32* %1
br label %14
14: ; preds = %2, %12
%15 = phi i32 [ 0, %12 ], [ 1, %2 ]
ret i32 %15
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
void SSIIntDisable(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000014))) &= ~(ui32IntFlags);
}


x86 assembly (clang, -O0):
<SSIIntDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%rcx
and    %rdx,%rcx
mov    %rcx,0x14(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIIntDisable>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    -0x10(%rsp),%rax
not    %rax
mov    -0x8(%rsp),%rcx
and    %rax,0x14(%rcx)
ret

LLVM IR (-O0):
define void @SSIIntDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = xor i64 %5, -1
%7 = load volatile i64, i64* %3
%8 = add nsw i64 %7, 20
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @SSIIntDisable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = xor i64 %5, -1
%7 = load volatile i64, i64* %3
%8 = add nsw i64 %7, 20
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = and i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}
void gdk_region_new() {}


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

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

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

LLVM IR (-O2):
define void @gdk_region_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _ITM_finalizeProcess();
void tanger_stm_shutdown() { _ITM_finalizeProcess(); }


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

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

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

LLVM IR (-O2):
define void @tanger_stm_shutdown() {
%1 = tail call i32 (...) @_ITM_finalizeProcess()
ret void
}
/* Variables and functions */
size_t _max(size_t a, size_t b) { return (a < b) ? b : a; }


x86 assembly (clang, -O0):
<_max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1127 <_max+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <_max+0x2f>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_max>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmovb  %rsi,%rax
ret

LLVM IR (-O0):
define i64 @_max(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 = icmp ult i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %4
br label %12
10: ; preds = %2
%11 = load i64, i64* %3
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @_max(i64 %0, i64 %1) {
%3 = icmp ult i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void display_usage() {
  printf("pinMux --pin <pin> --value <value>\n");
  printf("\t<pin>\te.g. P8_45\n");
  printf("\t<value>\tdecimal value of the new mux code\n");
  printf("\n");
}


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

x86 assembly (clang, -O2):
<display_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xeef(%rip),%rdi
call   1040 <puts@plt>
lea    0xef5(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"pinMux --pin <pin> --value <value>\0A\00"
@.str.1 = [19 x i8] c"\09<pin>\09e.g. P8_45\0A\00"
@.str.2 = [44 x i8] c"\09<value>\09decimal value of the new mux code\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @display_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [35 x i8] c"pinMux --pin <pin> --value <value>\00"
@str.4 = [18 x i8] c"\09<pin>\09e.g. P8_45\00"
@str.5 = [43 x i8] c"\09<value>\09decimal value of the new mux code\00"
define void @display_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
ret void
}
void hash_table_remove() {}


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

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

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

LLVM IR (-O2):
define void @hash_table_remove() {
ret void
}
int XDisplayCells() {}


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

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

LLVM IR (-O0):
define i32 @XDisplayCells() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XDisplayCells() {
ret i32 undef
}
void port_byte_out(unsigned short port, unsigned char data) {
  __asm__("out %%al, %% dx" : : "a"(data), "d"(port));
}


x86 assembly (clang, -O0):
<port_byte_out>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    -0x2(%rbp),%dx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<port_byte_out>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @port_byte_out(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i16, i16* %3
ret void
}

LLVM IR (-O2):
define void @port_byte_out(i16 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "out %al, % dx", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i8 %1, i16 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_load1_ps(float *);
__m128 test_mm_load1_ps(float *y) { return _mm_load1_ps(y); }


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

x86 assembly (clang, -O2):
<test_mm_load1_ps>:
jmp    1030 <_mm_load1_ps@plt>

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

LLVM IR (-O2):
define i32 @test_mm_load1_ps(float* %0) {
%2 = tail call i32 @_mm_load1_ps(float* %0)
ret i32 %2
}
void X509_REVOKED_get_ext(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_REVOKED_get_ext() {
ret void
}
int contains_newline(the_command)
register char *the_command;
{
  while (*the_command) {
    if (*the_command == '\n')
      return 1;
    ++the_command;
  }
  return 0;
}


x86 assembly (clang, -O0):
<contains_newline>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1142 <contains_newline+0x42>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1131 <contains_newline+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1149 <contains_newline+0x49>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <contains_newline+0x8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<contains_newline>:
movzbl (%rdi),%eax
test   %al,%al
je     1111 <contains_newline+0x11>
cmp    $0xa,%al
je     1114 <contains_newline+0x14>
add    $0x1,%rdi
jmp    1100 <contains_newline>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @contains_newline(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %8
i8 10, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
br label %8
8: ; preds = %2, %7
%9 = phi i32 [ 1, %7 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x0d() {
  Assert_real((isalnum(13) == 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_isalnum.c",
              70, ("isalnum should be 0 for 0x0d"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x0d>:
push   %rax
mov    $0xd,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x46,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x0d\00"
define void @t_isalnum_0x0d() {
%1 = call i64 @isalnum(i32 13)
%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 70, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x0d\00"
define void @t_isalnum_0x0d() {
%1 = tail call i64 @isalnum(i32 13)
%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 70, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TODO(char *);
void test_gen_Tmu() {
  TODO("Decommenter et adapter la syntaxe des tests anciens");
}


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

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

LLVM IR (-O0):
@.str = [52 x i8] c"Decommenter et adapter la syntaxe des tests anciens\00"
define void @test_gen_Tmu() {
%1 = call i32 @TODO(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"Decommenter et adapter la syntaxe des tests anciens\00"
define void @test_gen_Tmu() {
%1 = tail call i32 @TODO(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret void
}
void backup_file_void(void) {}


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

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

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

LLVM IR (-O2):
define void @backup_file_void() {
ret void
}
int test_imm_92int8_mem(signed char *val) {
  return ((*val) & (-0x92 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_92int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff6e,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_92int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -146
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Variables and functions */
size_t strlen(char const *);
size_t my_strlen(const char *s) { return strlen(s); }


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

x86 assembly (clang, -O2):
<my_strlen>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i64 @my_strlen(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
ret i64 %2
}
/* Type definitions */
struct kbuffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct kbuffer *);
void kbuffer_free(struct kbuffer *kbuf) { free(kbuf); }


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

x86 assembly (clang, -O2):
<kbuffer_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.kbuffer = type { i32 }
define void @kbuffer_free(%struct.kbuffer* %0) {
%2 = alloca %struct.kbuffer*
store %struct.kbuffer* %0, %struct.kbuffer** %2
%3 = load %struct.kbuffer*, %struct.kbuffer** %2
%4 = call i32 @free(%struct.kbuffer* %3)
ret void
}

LLVM IR (-O2):
%struct.kbuffer = type { i32 }
define void @kbuffer_free(%struct.kbuffer* nocapture %0) {
%2 = tail call i32 @free(%struct.kbuffer* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RegReadA(int, unsigned char *);
unsigned char TriSts(void) {
  unsigned char UcRsltSts = 0;
  unsigned char UcVal;
  RegReadA(0x0129, &UcVal);
  if (UcVal & 0x03) {
    RegReadA(0x01F4, &UcVal);
    UcRsltSts = UcVal & 0x11;
    UcRsltSts |= 0x80;
  }
  return (UcRsltSts);
}


x86 assembly (clang, -O0):
<TriSts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
mov    $0x129,%edi
lea    -0x2(%rbp),%rsi
call   1030 <RegReadA@plt>
movzbl -0x2(%rbp),%eax
and    $0x3,%eax
cmp    $0x0,%eax
je     115e <TriSts+0x4e>
mov    $0x1f4,%edi
lea    -0x2(%rbp),%rsi
call   1030 <RegReadA@plt>
movzbl -0x2(%rbp),%eax
and    $0x11,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
or     $0x80,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TriSts>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x129,%edi
call   1030 <RegReadA@plt>
testb  $0x3,0x7(%rsp)
je     1140 <TriSts+0x30>
lea    0x7(%rsp),%rsi
mov    $0x1f4,%edi
call   1030 <RegReadA@plt>
mov    0x7(%rsp),%al
and    $0x11,%al
or     $0x80,%al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @TriSts() {
%1 = alloca i8
%2 = alloca i8
store i8 0, i8* %1
%3 = call i32 @RegReadA(i32 297, i8* %2)
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = and i32 %5, 3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %0
%9 = call i32 @RegReadA(i32 500, i8* %2)
%10 = load i8, i8* %2
%11 = zext i8 %10 to i32
%12 = and i32 %11, 17
%13 = trunc i32 %12 to i8
store i8 %13, i8* %1
%14 = load i8, i8* %1
%15 = zext i8 %14 to i32
%16 = or i32 %15, 128
%17 = trunc i32 %16 to i8
store i8 %17, i8* %1
br label %18
18: ; preds = %8, %0
%19 = load i8, i8* %1
ret i8 %19
}

LLVM IR (-O2):
define zeroext i8 @TriSts() {
%1 = alloca i8
%2 = call i32 @RegReadA(i32 297, i8* %1)
%3 = load i8, i8* %1
%4 = and i8 %3, 3
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %0
%7 = call i32 @RegReadA(i32 500, i8* %1)
%8 = load i8, i8* %1
%9 = and i8 %8, 17
%10 = or i8 %9, -128
br label %11
11: ; preds = %6, %0
%12 = phi i8 [ %10, %6 ], [ 0, %0 ]
ret i8 %12
}
unsigned long hash_fn(char *key) {
  char *str = key;
  unsigned long hash = 5381;
  int c;
  while ((c = *str++))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<hash_fn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movq   $0x1505,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     1152 <hash_fn+0x52>
mov    -0x18(%rbp),%rax
shl    $0x5,%rax
add    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    1118 <hash_fn+0x18>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_fn>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <hash_fn+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_fn+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @hash_fn(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void jsoo_eval() { exit(1); }


x86 assembly (clang, -O0):
<jsoo_eval>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
define void @jsoo_eval() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @jsoo_eval() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ f(unsigned int);
void g(unsigned n) {
  if (n < 5)
    n = 5;
  f(n);
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jae    112c <g+0x1c>
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
cmp    $0x6,%edi
mov    $0x5,%eax
cmovb  %eax,%edi
jmp    1030 <f@plt>

LLVM IR (-O0):
define void @g(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 5
br i1 %4, label %5, label %6
5: ; preds = %1
store i32 5, i32* %2
br label %6
6: ; preds = %5, %1
%7 = load i32, i32* %2
%8 = call i32 @f(i32 %7)
ret void
}

LLVM IR (-O2):
define void @g(i32 %0) {
%2 = icmp ugt i32 %0, 5
%3 = select i1 %2, i32 %0, i32 5
%4 = tail call i32 @f(i32 %3)
ret void
}
int diag_count(int dim, int n) { return n * dim - ((n * (n + 1)) / 2); }


x86 assembly (clang, -O0):
<diag_count>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<diag_count>:
mov    %edi,%eax
imul   %esi,%eax
lea    0x1(%rsi),%ecx
imul   %esi,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
add    %ecx,%edx
sar    %edx
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @diag_count(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %5, %6
%8 = load i32, i32* %4
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 1
%11 = mul nsw i32 %8, %10
%12 = sdiv i32 %11, 2
%13 = sub nsw i32 %7, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @diag_count(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = add nsw i32 %1, 1
%5 = mul nsw i32 %4, %1
%6 = sdiv i32 %5, -2
%7 = add i32 %6, %3
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, int, char *, int);
scalar_t__ strlen(char const *);
void stats_line(const char *zLabel, int iValue) {
  int nLabel = ((int)strlen(zLabel));
  printf("  %s%.*s %5d\n", zLabel, 35 - nLabel,
         "................................", iValue);
}


x86 assembly (clang, -O0):
<stats_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x23,%edx
sub    -0x10(%rbp),%edx
mov    -0xc(%rbp),%r8d
lea    0xeae(%rip),%rdi
lea    0xeb5(%rip),%rcx
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stats_line>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    $0x23,%edx
sub    %eax,%edx
lea    0xec5(%rip),%rdi
lea    0xecc(%rip),%rcx
mov    %rbx,%rsi
mov    %ebp,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c" %s%.*s %5d\0A\00"
@.str.1 = [33 x i8] c"................................\00"
define void @stats_line(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = trunc i64 %7 to i32
store i32 %8, i32* %5
%9 = load i8*, i8** %3
%10 = load i32, i32* %5
%11 = sub nsw i32 35, %10
%12 = load i32, i32* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %11, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c" %s%.*s %5d\0A\00"
@.str.1 = [33 x i8] c"................................\00"
define void @stats_line(i8* %0, i32 %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = trunc i64 %3 to i32
%5 = sub nsw i32 35, %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %5, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret void
}
long kernel__Int__unary_32d_45d(long self) {
  long var;
  long var1;
  var1 = -self;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


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

x86 assembly (clang, -O2):
<kernel__Int__unary_32d_45d>:
mov    %rdi,%rax
neg    %rax
ret

LLVM IR (-O0):
define i64 @kernel__Int__unary_32d_45d(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = sub nsw i64 0, %5
store i64 %6, i64* %4
%7 = load i64, i64* %4
store i64 %7, i64* %3
br label %8
8: ; preds = %1
%9 = load i64, i64* %3
ret i64 %9
}

LLVM IR (-O2):
define i64 @kernel__Int__unary_32d_45d(i64 %0) {
%2 = sub nsw i64 0, %0
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void printVersion(FILE *stream) {
  fprintf(stream, "vAVRdisasm version 1.9 - 04/03/2011.\n");
  fprintf(stream, "Written by Vanya Sergeev - <vsergeev@gmail.com>\n");
}


x86 assembly (clang, -O0):
<printVersion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeef(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printVersion>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    $0x25,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fwrite@plt>
lea    0xef2(%rip),%rdi
mov    $0x30,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"vAVRdisasm version 1.9 - 04/03/2011.\0A\00"
@.str.1 = [49 x i8] c"Written by Vanya Sergeev - <vsergeev@gmail.com>\0A\00"
define void @printVersion(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"vAVRdisasm version 1.9 - 04/03/2011.\0A\00"
@.str.1 = [49 x i8] c"Written by Vanya Sergeev - <vsergeev@gmail.com>\0A\00"
define void @printVersion(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i64 37, i64 1, i32* %0)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0), i64 48, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void Copyright(void) {
  fprintf(
      stderr,
      "===================================================================\n"
      " TS 26.104                                                         \n"
      " REL-5 V5.4.0 2004-03                                              \n"
      " REL-6 V6.1.0 2004-03                                              \n"
      " 3GPP AMR Floating-point Speech Decoder                            \n"
      "===================================================================\n");
}


x86 assembly (clang, -O0):
<Copyright>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Copyright>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [409 x i8] c"===================================================================\0A TS 26.104 \0A REL-5 V5.4.0 2004-03 \0A REL-6 V6.1.0 2004-03 \0A 3GPP AMR Floating-point Speech Decoder \0A===================================================================\0A\00"
define void @Copyright() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([409 x i8], [409 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [409 x i8] c"===================================================================\0A TS 26.104 \0A REL-5 V5.4.0 2004-03 \0A REL-6 V6.1.0 2004-03 \0A 3GPP AMR Floating-point Speech Decoder \0A===================================================================\0A\00"
define void @Copyright() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([409 x i8], [409 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void RNDResponseSink_RenderingControl_GetMute(struct UPnPService *Service,
                                              int ErrorCode, void *User,
                                              int CurrentMute) {
  printf("RND Invoke Response: RenderingControl/GetMute[ErrorCode:%d](%d)\r\n",
         ErrorCode, CurrentMute);
}


x86 assembly (clang, -O0):
<RNDResponseSink_RenderingControl_GetMute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNDResponseSink_RenderingControl_GetMute>:
lea    0xee9(%rip),%rdi
mov    %ecx,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [66 x i8] c"RND Invoke Response: RenderingControl/GetMute[ErrorCode:%d](%d)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetMute(%struct.UPnPService* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca %struct.UPnPService*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store %struct.UPnPService* %0, %struct.UPnPService** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = load i32, i32* %8
%11 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [66 x i8] c"RND Invoke Response: RenderingControl/GetMute[ErrorCode:%d](%d)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetMute(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char usage(int retval) {
  fprintf(
      stderr,
      "Usage: stinit [-h] [-v] [-f dbname] [-p] [drivename_or_number ...]\n");
  exit(retval);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [68 x i8] c"Usage: stinit [-h] [-v] [-f dbname] [-p] [drivename_or_number ...]\0A\00"
define signext i8 @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [68 x i8] c"Usage: stinit [-h] [-v] [-f dbname] [-p] [drivename_or_number ...]\0A\00"
define signext i8 @usage(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ prinf(char *);
void main() {
  prinf("Hello World");
  int x = 10;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <prinf@plt>
movl   $0xa,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @prinf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i32 10, i32* %1
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
define void @main() {
%1 = tail call i32 @prinf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
void event_text(s) char *s;
{
  char msg[200];
  snprintf(msg, sizeof(msg), "Ignoring text: %s", s);
  event_warning(msg);
}


x86 assembly (clang, -O0):
<event_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0xc8,%esi
lea    0xeba(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
lea    -0xd0(%rbp),%rdi
mov    $0x0,%al
call   1030 <event_warning@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<event_text>:
push   %rbx
sub    $0xd0,%rsp
mov    %rdi,%rcx
lea    0xece(%rip),%rdx
mov    %rsp,%rbx
mov    $0xc8,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <snprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <event_warning@plt>
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Ignoring text: %s\00"
define void @event_text(i8* %0) {
%2 = alloca i8*
%3 = alloca [200 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %4, i64 200, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @event_warning to i32 (i8*, ...)*)(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Ignoring text: %s\00"
define void @event_text(i8* %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %3, i64 200, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @event_warning to i32 (i8*, ...)*)(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int write(int, char *, int);
void putblk(char *blk, int len) {
  int rslt;
  rslt = write(1, blk, len);
  if (rslt != len) {
    fprintf(stderr, "putbyte: write error\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<putblk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     117e <putblk+0x4e>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xe91(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putblk>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
mov    $0x1,%edi
mov    %ebx,%edx
call   1030 <write@plt>
cmp    %ebx,%eax
jne    1148 <putblk+0x18>
pop    %rbx
ret
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"putbyte: write error\0A\00"
define void @putblk(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @write(i32 1, i8* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"putbyte: write error\0A\00"
define void @putblk(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @write(i32 1, i8* %0, i32 %1)
%4 = icmp eq i32 %3, %1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret void
}