xunge/DecIR huggingface dataset:
char r_off_sign(double a) {
  if (a < 0)
    return (-1);
  else if (a == 0)
    return (0);
  else
    return (1);
}


x86 assembly (clang, -O0):
<r_off_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1120 <r_off_sign+0x20>
movb   $0xff,-0x1(%rbp)
jmp    1145 <r_off_sign+0x45>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1141 <r_off_sign+0x41>
jp     1141 <r_off_sign+0x41>
movb   $0x0,-0x1(%rbp)
jmp    1145 <r_off_sign+0x45>
movb   $0x1,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_off_sign>:
xorpd  %xmm1,%xmm1
movapd %xmm0,%xmm2
cmpneqsd %xmm1,%xmm2
movq   %xmm2,%rcx
and    $0x1,%ecx
ucomisd %xmm0,%xmm1
mov    $0xff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @r_off_sign(double %0) {
%2 = alloca i8
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store i8 -1, i8* %2
br label %12
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp oeq double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7
store i8 0, i8* %2
br label %12
11: ; preds = %7
store i8 1, i8* %2
br label %12
12: ; preds = %11, %10, %6
%13 = load i8, i8* %2
ret i8 %13
}

LLVM IR (-O2):
define signext i8 @r_off_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp une double %0, 0.000000e+00
%4 = zext i1 %3 to i8
%5 = select i1 %2, i8 -1, i8 %4
ret i8 %5
}
void Ctypes_hook_rd_sgn_u8(void) {}


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

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

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

LLVM IR (-O2):
define void @Ctypes_hook_rd_sgn_u8() {
ret void
}
/* Type definitions */
typedef char GLubyte;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
char *gluErrorString(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void nurbsError(GLenum errorCode) {
  const GLubyte *estring;
  estring = gluErrorString(errorCode);
  fprintf(stderr, "Nurbs Error: %s\n", estring);
  exit(0);
}


x86 assembly (clang, -O0):
<nurbsError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <gluErrorString@plt>
mov    %rax,-0x10(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xea5(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<nurbsError>:
push   %rax
call   1040 <gluErrorString@plt>
mov    0x2ea3(%rip),%rcx
mov    (%rcx),%edi
lea    0xeba(%rip),%rsi
mov    %rax,%rdx
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"Nurbs Error: %s\0A\00"
define void @nurbsError(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @gluErrorString(i32 %4)
store i8* %5, i8** %3
%6 = load i32, i32* @stderr
%7 = load i8*, i8** %3
%8 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"Nurbs Error: %s\0A\00"
define void @nurbsError(i32 %0) {
%2 = tail call i8* @gluErrorString(i32 %0)
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int bar();
int foo();
int main() {
  if (foo() != (1 + 6 + (5 + 31) * 2))
    abort();
  if (bar() != (1 + 7 + (21 + 8) * 2))
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <foo@plt>
cmp    $0x4f,%eax
je     1156 <main+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0x0,%al
call   1040 <bar@plt>
cmp    $0x42,%eax
je     116d <main+0x3d>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <foo@plt>
cmp    $0x4f,%eax
jne    114d <main+0x1d>
xor    %eax,%eax
call   1040 <bar@plt>
cmp    $0x42,%eax
jne    114d <main+0x1d>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @foo()
%3 = icmp ne i32 %2, 79
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 (...) @bar()
%8 = icmp ne i32 %7, 66
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = icmp eq i32 %1, 79
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 (...) @bar()
%7 = icmp eq i32 %6, 66
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
ret i32 0
}
/* Variables and functions */
int vrna_file_PS_rnaplot(char const *, char const *, char const *,
                         int /*<<< orphan*/ *);
int PS_rna_plot(char *string, char *structure, char *ssfile) {
  return vrna_file_PS_rnaplot((const char *)string, (const char *)structure,
                              (const char *)ssfile, NULL);
}


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

x86 assembly (clang, -O2):
<PS_rna_plot>:
xor    %ecx,%ecx
jmp    1030 <vrna_file_PS_rnaplot@plt>

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

LLVM IR (-O2):
define i32 @PS_rna_plot(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @vrna_file_PS_rnaplot(i8* %0, i8* %1, i8* %2, i32* null)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void aesWrite(uint32_t offset, uint32_t val32) {
  void (*p_aesWrite)(uint32_t offset, uint32_t val32);
  p_aesWrite = (void (*)(uint32_t offset, uint32_t val32))0x0300118dU;
  p_aesWrite(offset, val32);
}


x86 assembly (clang, -O0):
<aesWrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x300118d,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aesWrite>:
mov    $0x300118d,%eax
jmp    *%rax

LLVM IR (-O0):
define void @aesWrite(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca void (i32, i32)*
store i32 %0, i32* %3
store i32 %1, i32* %4
store void (i32, i32)* inttoptr (i64 50336141 to void (i32, i32)*), void (i32, i32)** %5
%6 = load void (i32, i32)*, void (i32, i32)** %5
%7 = load i32, i32* %3
%8 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @aesWrite(i32 %0, i32 %1) {
tail call void inttoptr (i64 50336141 to void (i32, i32)*)(i32 %0, i32 %1)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t pad8(uint32_t x) { return (x + 7) & ~((uint32_t)7); }


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

x86 assembly (clang, -O2):
<pad8>:
lea    0x7(%rdi),%eax
and    $0xfffffff8,%eax
ret

LLVM IR (-O0):
define i32 @pad8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 7
%5 = and i32 %4, -8
ret i32 %5
}

LLVM IR (-O2):
define i32 @pad8(i32 %0) {
%2 = add nsw i32 %0, 7
%3 = and i32 %2, -8
ret i32 %3
}
void test_pass(void) {}


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

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

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

LLVM IR (-O2):
define void @test_pass() {
ret void
}
void si_swapinfo(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<si_swapinfo>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<si_swapinfo>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.si_swapinfo = [12 x i8] c"si_swapinfo\00"
define void @si_swapinfo() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.si_swapinfo, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.si_swapinfo = [12 x i8] c"si_swapinfo\00"
define void @si_swapinfo() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.si_swapinfo, i64 0, i64 0))
ret void
}
int compareCh(const void *chA, const void *chB) {
  return *(const char *)chA - *(const char *)chB;
}


x86 assembly (clang, -O0):
<compareCh>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareCh>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compareCh(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @compareCh(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ cwd;

/* Variables and functions */
char *getcwd(char *, int);
char *Sys_Cwd(void) {
  static char cwd[256];
  char *result = getcwd(cwd, sizeof(cwd) - 1);
  if (result != cwd)
    return NULL;
  cwd[256 - 1] = 0;
  return cwd;
}


x86 assembly (clang, -O0):
<Sys_Cwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0x2f21(%rip),%rdi
mov    $0xff,%esi
call   1030 <getcwd@plt>
mov    %rax,-0x10(%rbp)
lea    0x2f0c(%rip),%rax
cmp    %rax,-0x10(%rbp)
je     114b <Sys_Cwd+0x3b>
movq   $0x0,-0x8(%rbp)
jmp    115d <Sys_Cwd+0x4d>
movb   $0x0,0x2fed(%rip)
lea    0x2ee7(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_Cwd>:
push   %rbx
lea    0x2f28(%rip),%rbx
mov    %rbx,%rdi
mov    $0xff,%esi
call   1030 <getcwd@plt>
cmp    %rbx,%rax
je     112e <Sys_Cwd+0x1e>
xor    %ebx,%ebx
jmp    1135 <Sys_Cwd+0x25>
movb   $0x0,0x300a(%rip)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@Sys_Cwd.cwd = internal global [256 x i8] zeroinitializer
define i8* @Sys_Cwd() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @getcwd(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 0), i32 255)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 0)
br i1 %5, label %6, label %7
6: ; preds = %0
store i8* null, i8** %1
br label %8
7: ; preds = %0
store i8 0, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 255)
store i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 0), i8** %1
br label %8
8: ; preds = %7, %6
%9 = load i8*, i8** %1
ret i8* %9
}

LLVM IR (-O2):
@Sys_Cwd.cwd = internal global [256 x i8] zeroinitializer
define i8* @Sys_Cwd() {
%1 = tail call i8* @getcwd(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 0), i32 255)
%2 = icmp eq i8* %1, getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 0)
br i1 %2, label %3, label %4
3: ; preds = %0
store i8 0, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 255)
br label %4
4: ; preds = %0, %3
%5 = phi i8* [ getelementptr inbounds ([256 x i8], [256 x i8]* @Sys_Cwd.cwd, i64 0, i64 0), %3 ], [ null, %0 ]
ret i8* %5
}
nullproc(int f, int n) {}


x86 assembly (clang, -O0):
<nullproc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @nullproc(i32 %0, i32 %1) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, double);
int printVec(FILE *f, double a[], int n) {
  int i;
  for (i = 0; i < n; i++)
    fprintf(f, "%.17e ", a[i]);
  return 0;
}


x86 assembly (clang, -O0):
<printVec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1161 <printVec+0x51>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xeb2(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <printVec+0x1a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printVec>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %edx,%edx
jle    114a <printVec+0x3a>
mov    %rsi,%r14
mov    %rdi,%r12
mov    %edx,%r13d
xor    %ebx,%ebx
lea    0xed1(%rip),%r15
nop
movsd  (%r14,%rbx,8),%xmm0
mov    %r12,%rdi
mov    %r15,%rsi
call   1030 <fprintf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1130 <printVec+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%.17e \00"
define i32 @printVec(i32* nocapture %0, double* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds double, double* %1, i64 %8
%10 = load double, double* %9
%11 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
main(int argc, char **argv) {
  char buf[10];
  strcpy(buf, argv[1]);
  printf("%s\n", buf);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1a(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
lea    -0x1a(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x8(%rsi),%rsi
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = call i32 @strcpy(i8* %4, i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
int errno;
scalar_t__ write(int, void const *, size_t);
ssize_t __sulong_posix_write(int fd, const void *buf, size_t count) {
  {
    int native_errno = errno;
    ssize_t result = write(fd, buf, count);
    if (result == (ssize_t)-1) {
      result = (ssize_t)(long)-errno;
    }
    errno = native_errno;
    return result;
  }
}


x86 assembly (clang, -O0):
<__sulong_posix_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0xffffffffffffffff,-0x28(%rbp)
jne    115f <__sulong_posix_write+0x4f>
xor    %eax,%eax
mov    0x2e89(%rip),%rcx
sub    (%rcx),%eax
cltq
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%ecx
mov    0x2e77(%rip),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sulong_posix_write>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ec6(%rip),%rbx
mov    (%rbx),%ebp
call   1030 <write@plt>
movslq (%rbx),%rcx
neg    %rcx
cmp    $0xffffffffffffffff,%rax
cmove  %rcx,%rax
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
define i64 @__sulong_posix_write(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
%8 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%9 = load i32, i32* @errno
store i32 %9, i32* %7
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = load i64, i64* %6
%13 = call i64 @write(i32 %10, i8* %11, i64 %12)
store i64 %13, i64* %8
%14 = load i64, i64* %8
%15 = icmp eq i64 %14, -1
br i1 %15, label %16, label %20
16: ; preds = %3
%17 = load i32, i32* @errno
%18 = sub nsw i32 0, %17
%19 = sext i32 %18 to i64
store i64 %19, i64* %8
br label %20
20: ; preds = %16, %3
%21 = load i32, i32* %7
store i32 %21, i32* @errno
%22 = load i64, i64* %8
ret i64 %22
}

LLVM IR (-O2):
@errno = global i32 0
define i64 @__sulong_posix_write(i32 %0, i8* nocapture %1, i64 %2) {
%4 = load i32, i32* @errno
%5 = tail call i64 @write(i32 %0, i8* %1, i64 %2)
%6 = icmp eq i64 %5, -1
%7 = load i32, i32* @errno
%8 = sub nsw i32 0, %7
%9 = sext i32 %8 to i64
%10 = select i1 %6, i64 %9, i64 %5
store i32 %4, i32* @errno
ret i64 %10
}
int shlib_visibility_checkweak() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @shlib_visibility_checkweak() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int sudp_vis(u_char *data, int len) { return len; }


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

x86 assembly (clang, -O2):
<sudp_vis>:
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @sudp_vis(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
ret i32 %5
}

LLVM IR (-O2):
define i32 @sudp_vis(i32* nocapture readnone %0, i32 returned %1) {
ret i32 %1
}
void SPUstopChannels1(unsigned short channels) {}


x86 assembly (clang, -O0):
<SPUstopChannels1>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @SPUstopChannels1(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
ret void
}

LLVM IR (-O2):
define void @SPUstopChannels1(i16 zeroext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char const *);
int word_uniq(const void *v, const void *w, void *unused) {
  const char *a = *(const char **)v;
  const char *b = *(const char **)w;
  return !strcmp(a, b);
}


x86 assembly (clang, -O0):
<word_uniq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<word_uniq>:
push   %rax
mov    (%rdi),%rdi
mov    (%rsi),%rsi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @word_uniq(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
%11 = load i8*, i8** %10
store i8* %11, i8** %7
%12 = load i8*, i8** %5
%13 = bitcast i8* %12 to i8**
%14 = load i8*, i8** %13
store i8* %14, i8** %8
%15 = load i8*, i8** %7
%16 = load i8*, i8** %8
%17 = call i32 @strcmp(i8* %15, i8* %16)
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @word_uniq(i8* nocapture %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = bitcast i8* %0 to i8**
%5 = load i8*, i8** %4
%6 = bitcast i8* %1 to i8**
%7 = load i8*, i8** %6
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %7)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int max(int, int);
int /*<<< orphan*/ printf(char *);
void test_max(void) {
  printf("Test max using assert:      ");
  assert(max(13, 14) == 14);
  assert(max(14, 13) == 14);
  printf(" OK\n");
}


x86 assembly (clang, -O0):
<test_max>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xd,%edi
mov    $0xe,%esi
call   1040 <max@plt>
cmp    $0xe,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0xe,%edi
mov    $0xd,%esi
call   1040 <max@plt>
cmp    $0xe,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_max>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
mov    $0xd,%edi
mov    $0xe,%esi
call   1050 <max@plt>
xor    %edi,%edi
cmp    $0xe,%eax
sete   %dil
call   1060 <assert@plt>
mov    $0xe,%edi
mov    $0xd,%esi
call   1050 <max@plt>
xor    %edi,%edi
cmp    $0xe,%eax
sete   %dil
call   1060 <assert@plt>
lea    0xe8f(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Test max using assert: \00"
@.str.1 = [5 x i8] c" OK\0A\00"
define void @test_max() {
%1 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @max(i32 13, i32 14)
%3 = icmp eq i32 %2, 14
%4 = zext i1 %3 to i32
%5 = call i32 @assert(i32 %4)
%6 = call i32 @max(i32 14, i32 13)
%7 = icmp eq i32 %6, 14
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"Test max using assert: \00"
@str = [4 x i8] c" OK\00"
define void @test_max() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @max(i32 13, i32 14)
%3 = icmp eq i32 %2, 14
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @max(i32 14, i32 13)
%7 = icmp eq i32 %6, 14
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISREG(int /*<<< orphan*/);
int /*<<< orphan*/ stat(char const *, struct stat *);
int is_regular_file(const char *path) {
  struct stat path_stat;
  stat(path, &path_stat);
  return S_ISREG(path_stat.st_mode);
}


x86 assembly (clang, -O0):
<is_regular_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    -0x10(%rbp),%edi
call   1040 <S_ISREG@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_regular_file>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%edi
pop    %rax
jmp    1040 <S_ISREG@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_regular_file(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @S_ISREG(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_regular_file(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @S_ISREG(i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _leak_free(void *addr, const char *fname, int l_nmb) { free(addr); }


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

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

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

LLVM IR (-O2):
define void @_leak_free(i8* nocapture %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
unsigned long PAPI_thread_id();
void PAPIF_THREAD_ID(unsigned long *id) { *id = PAPI_thread_id(); }


x86 assembly (clang, -O0):
<PAPIF_THREAD_ID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <PAPI_thread_id@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PAPIF_THREAD_ID>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <PAPI_thread_id@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @PAPIF_THREAD_ID(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i64 (...) @PAPI_thread_id()
%4 = load i64*, i64** %2
store i64 %3, i64* %4
ret void
}

LLVM IR (-O2):
define void @PAPIF_THREAD_ID(i64* nocapture writeonly %0) {
%2 = tail call i64 (...) @PAPI_thread_id()
store i64 %2, i64* %0
ret void
}
/* Type definitions */
struct vec3 {
  int dummy;
};

/* Variables and functions */
float vec3_distance_squared(float *, float *);
__attribute__((always_)) float psvec3_distance_squared(struct vec3 *a,
                                                       struct vec3 *b) {
  return vec3_distance_squared((float *)a, (float *)b);
}


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

x86 assembly (clang, -O2):
<psvec3_distance_squared>:
jmp    1030 <vec3_distance_squared@plt>

LLVM IR (-O0):
%struct.vec3 = type { i32 }
define float @psvec3_distance_squared(%struct.vec3* %0, %struct.vec3* %1) {
%3 = alloca %struct.vec3*
%4 = alloca %struct.vec3*
store %struct.vec3* %0, %struct.vec3** %3
store %struct.vec3* %1, %struct.vec3** %4
%5 = load %struct.vec3*, %struct.vec3** %3
%6 = bitcast %struct.vec3* %5 to float*
%7 = load %struct.vec3*, %struct.vec3** %4
%8 = bitcast %struct.vec3* %7 to float*
%9 = call float @vec3_distance_squared(float* %6, float* %8)
ret float %9
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
define float @psvec3_distance_squared(%struct.vec3* %0, %struct.vec3* %1) {
%3 = bitcast %struct.vec3* %0 to float*
%4 = bitcast %struct.vec3* %1 to float*
%5 = tail call float @vec3_distance_squared(float* %3, float* %4)
ret float %5
}
/* Type definitions */
typedef int /*<<< orphan*/ mp_limb_t;

/* Variables and functions */
int /*<<< orphan*/ mpn_mul_n(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ *, long);
int main() {
  mp_limb_t *x = NULL, *y = NULL;
  long nx = 0;
  mpn_mul_n(y, x, x, nx);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <mpn_mul_n@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <mpn_mul_n@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i64
store i32 0, i32* %1
store i32* null, i32** %2
store i32* null, i32** %3
store i64 0, i64* %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %2
%7 = load i32*, i32** %2
%8 = load i64, i64* %4
%9 = call i32 @mpn_mul_n(i32* %5, i32* %6, i32* %7, i64 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @mpn_mul_n(i32* null, i32* null, i32* null, i64 0)
ret i32 0
}
/* Variables and functions */
scalar_t__ isspace(char);
int strlen(char *);
char *trimr(char *s) {
  char *_s = s + strlen(s);
  while (isspace(*--_s))
    ;
  *(_s + 1) = '\0';
  return s;
}


x86 assembly (clang, -O0):
<trimr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
movsbl -0x1(%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     1174 <trimr+0x54>
jmp    114d <trimr+0x2d>
mov    -0x10(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trimr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
cltq
lea    (%rax,%r14,1),%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
movsbl -0x2(%rbx),%edi
call   1040 <isspace@plt>
add    $0xffffffffffffffff,%rbx
test   %rax,%rax
jne    1140 <trimr+0x20>
movb   $0x0,(%rbx)
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @trimr(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
br label %5
5: ; preds = %5, %1
%6 = phi i8* [ %4, %1 ], [ %7, %5 ]
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = load i8, i8* %7
%9 = tail call i64 @isspace(i8 signext %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %5
11: ; preds = %5
store i8 0, i8* %6
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ Beep_A2B(int, int);
int /*<<< orphan*/ Beep_DD(int, int, int);
void Beep_ON() {
  Beep_A2B(0, 500);
  Beep_DD(500, 400, 2);
  Beep_A2B(500, 600);
  Beep_DD(1000, 330, 1);
}


x86 assembly (clang, -O0):
<Beep_ON>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1f4,%esi
call   1030 <Beep_A2B@plt>
mov    $0x1f4,%edi
mov    $0x190,%esi
mov    $0x2,%edx
call   1040 <Beep_DD@plt>
mov    $0x1f4,%edi
mov    $0x258,%esi
call   1030 <Beep_A2B@plt>
mov    $0x3e8,%edi
mov    $0x14a,%esi
mov    $0x1,%edx
call   1040 <Beep_DD@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Beep_ON>:
push   %rax
xor    %edi,%edi
mov    $0x1f4,%esi
call   1030 <Beep_A2B@plt>
mov    $0x1f4,%edi
mov    $0x190,%esi
mov    $0x2,%edx
call   1040 <Beep_DD@plt>
mov    $0x1f4,%edi
mov    $0x258,%esi
call   1030 <Beep_A2B@plt>
mov    $0x3e8,%edi
mov    $0x14a,%esi
mov    $0x1,%edx
pop    %rax
jmp    1040 <Beep_DD@plt>

LLVM IR (-O0):
define void @Beep_ON() {
%1 = call i32 @Beep_A2B(i32 0, i32 500)
%2 = call i32 @Beep_DD(i32 500, i32 400, i32 2)
%3 = call i32 @Beep_A2B(i32 500, i32 600)
%4 = call i32 @Beep_DD(i32 1000, i32 330, i32 1)
ret void
}

LLVM IR (-O2):
define void @Beep_ON() {
%1 = tail call i32 @Beep_A2B(i32 0, i32 500)
%2 = tail call i32 @Beep_DD(i32 500, i32 400, i32 2)
%3 = tail call i32 @Beep_A2B(i32 500, i32 600)
%4 = tail call i32 @Beep_DD(i32 1000, i32 330, i32 1)
ret void
}
void RTThreadGetName(void) {}


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

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

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

LLVM IR (-O2):
define void @RTThreadGetName() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, float *);
main() {
  float fahrenheit;
  scanf("%f", &fahrenheit);
  printf("%f", 5.0 * (fahrenheit - 32.0) / 9.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xec0(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xeac(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe98(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xeec(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xeb5(%rip),%xmm0
mulsd  0xeb5(%rip),%xmm0
divsd  0xeb5(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fsub double %5, 3.200000e+01
%7 = fmul double 5.000000e+00, %6
%8 = fdiv double %7, 9.000000e+00
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = fadd double %5, -3.200000e+01
%7 = fmul double %6, 5.000000e+00
%8 = fdiv double %7, 9.000000e+00
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}
/* Variables and functions */
char *md5HexForBuf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
char *md5HexForString(char *string) {
  return md5HexForBuf(string, strlen(string));
}


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

x86 assembly (clang, -O2):
<md5HexForString>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <md5HexForBuf@plt>

LLVM IR (-O0):
define i8* @md5HexForString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i8* @md5HexForBuf(i8* %3, i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @md5HexForString(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @md5HexForBuf(i8* %0, i32 %2)
ret i8* %3
}
int mangle_rotate_left(char arr[64], int arr_len) {
  int l;
  int r;
  for (l = 0, r = arr_len - 1; r > 0; r--) {
    {
      char c = (arr)[(r)];
      (arr)[(r)] = (arr)[(l)];
      (arr)[(l)] = c;
    };
  }
  return (arr_len);
}


x86 assembly (clang, -O0):
<mangle_rotate_left>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1165 <mangle_rotate_left+0x65>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x15(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x15(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    111b <mangle_rotate_left+0x1b>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mangle_rotate_left>:
mov    %esi,%eax
cmp    $0x2,%esi
jl     112b <mangle_rotate_left+0x2b>
mov    %eax,%ecx
mov    (%rdi),%dl
add    $0x1,%rcx
nop
lea    -0x2(%rcx),%esi
movzbl (%rdi,%rsi,1),%r8d
mov    %dl,(%rdi,%rsi,1)
mov    %r8b,(%rdi)
add    $0xffffffffffffffff,%rcx
mov    %r8d,%edx
cmp    $0x2,%rcx
ja     1110 <mangle_rotate_left+0x10>
ret

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

LLVM IR (-O2):
define i32 @mangle_rotate_left(i8* nocapture %0, i32 returned %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %1 to i64
%6 = load i8, i8* %0
br label %7
7: ; preds = %4, %7
%8 = phi i8 [ %6, %4 ], [ %13, %7 ]
%9 = phi i64 [ %5, %4 ], [ %10, %7 ]
%10 = add nsw i64 %9, -1
%11 = and i64 %10, 4294967295
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
store i8 %8, i8* %12
store i8 %13, i8* %0
%14 = icmp ugt i64 %9, 2
br i1 %14, label %7, label %15
15: ; preds = %7, %2
ret i32 %1
}
/* Variables and functions */
#define AF_INET 129
#define AF_INET6 128
char const *inet_ntop(int, void const *, char *, int);
const char *rt_addr_n2a(int af, int len, const void *addr, char *buf,
                        int buflen) {
  switch (af) {
  case AF_INET:
  case AF_INET6:
    return inet_ntop(af, addr, buf, buflen);
  default:
    return "???";
  }
}


x86 assembly (clang, -O0):
<rt_addr_n2a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffff80,%eax
sub    $0x1,%eax
ja     115a <rt_addr_n2a+0x4a>
jmp    113e <rt_addr_n2a+0x2e>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
call   1030 <inet_ntop@plt>
mov    %rax,-0x8(%rbp)
jmp    1165 <rt_addr_n2a+0x55>
lea    0xe9f(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rt_addr_n2a>:
mov    %edi,%eax
and    $0xfffffffe,%eax
cmp    $0x80,%eax
jne    112a <rt_addr_n2a+0x1a>
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8d,%ecx
jmp    1030 <inet_ntop@plt>
lea    0xecf(%rip),%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"???\00"
define i8* @rt_addr_n2a(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
%12 = load i32, i32* %7
switch i32 %12, label %19 [
i32 129, label %13
i32 128, label %13
]
13: ; preds = %5, %5
%14 = load i32, i32* %7
%15 = load i8*, i8** %9
%16 = load i8*, i8** %10
%17 = load i32, i32* %11
%18 = call i8* @inet_ntop(i32 %14, i8* %15, i8* %16, i32 %17)
store i8* %18, i8** %6
br label %20
19: ; preds = %5
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %6
br label %20
20: ; preds = %19, %13
%21 = load i8*, i8** %6
ret i8* %21
}

LLVM IR (-O2):
@.str = [4 x i8] c"???\00"
define i8* @rt_addr_n2a(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4) {
%6 = and i32 %0, -2
%7 = icmp eq i32 %6, 128
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i8* @inet_ntop(i32 %0, i8* %2, i8* %3, i32 %4)
br label %10
10: ; preds = %5, %8
%11 = phi i8* [ %9, %8 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %5 ]
ret i8* %11
}
void RTMemTmpAllocTag(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMemTmpAllocTag() {
ret void
}
int readint0(int *x) { return *x; }


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

x86 assembly (clang, -O2):
<readint0>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @readint0(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint64_t Read64(const uint8_t *src) {
  return (uint64_t)src[0] | ((uint64_t)src[1] << 8) | ((uint64_t)src[2] << 16) |
         ((uint64_t)src[3] << 24) | ((uint64_t)src[4] << 32) |
         ((uint64_t)src[5] << 40) | ((uint64_t)src[6] << 48) |
         ((uint64_t)src[7] << 56);
}


x86 assembly (clang, -O0):
<Read64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x18(%rcx),%rcx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x20(%rcx),%rcx
mov    %ecx,%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x28(%rcx),%rcx
mov    %ecx,%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x30(%rcx),%rcx
mov    %ecx,%edx
mov    $0x30,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x38(%rcx),%rcx
mov    %ecx,%edx
mov    $0x38,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @Read64(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 0
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = load i64*, i64** %2
%8 = getelementptr inbounds i64, i64* %7, i64 1
%9 = load i64, i64* %8
%10 = trunc i64 %9 to i32
%11 = shl i32 %10, 8
%12 = or i32 %6, %11
%13 = load i64*, i64** %2
%14 = getelementptr inbounds i64, i64* %13, i64 2
%15 = load i64, i64* %14
%16 = trunc i64 %15 to i32
%17 = shl i32 %16, 16
%18 = or i32 %12, %17
%19 = load i64*, i64** %2
%20 = getelementptr inbounds i64, i64* %19, i64 3
%21 = load i64, i64* %20
%22 = trunc i64 %21 to i32
%23 = shl i32 %22, 24
%24 = or i32 %18, %23
%25 = load i64*, i64** %2
%26 = getelementptr inbounds i64, i64* %25, i64 4
%27 = load i64, i64* %26
%28 = trunc i64 %27 to i32
%29 = shl i32 %28, 32
%30 = or i32 %24, %29
%31 = load i64*, i64** %2
%32 = getelementptr inbounds i64, i64* %31, i64 5
%33 = load i64, i64* %32
%34 = trunc i64 %33 to i32
%35 = shl i32 %34, 40
%36 = or i32 %30, %35
%37 = load i64*, i64** %2
%38 = getelementptr inbounds i64, i64* %37, i64 6
%39 = load i64, i64* %38
%40 = trunc i64 %39 to i32
%41 = shl i32 %40, 48
%42 = or i32 %36, %41
%43 = load i64*, i64** %2
%44 = getelementptr inbounds i64, i64* %43, i64 7
%45 = load i64, i64* %44
%46 = trunc i64 %45 to i32
%47 = shl i32 %46, 56
%48 = or i32 %42, %47
ret i32 %48
}

LLVM IR (-O2):
define i32 @Read64(i64* nocapture readnone %0) {
ret i32 poison
}