xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void endTest(void) { printf("\n"); }


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

x86 assembly (clang, -O2):
<endTest>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @endTest() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void signal_handler(int _) { exit(EXIT_FAILURE); }


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<signal_handler>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @signal_handler(i32 %0) {
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_retrieve_dobldobl_Laurent_term(int i, int j, int n, int *exp,
                                          double *c) {
  int a[3], fail;
  a[0] = n;
  a[1] = i;
  a[2] = j;
  fail = _ada_use_c2phc4c(555, a, exp, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_retrieve_dobldobl_Laurent_term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
lea    -0x2c(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x22b,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_retrieve_dobldobl_Laurent_term>:
sub    $0x18,%rsp
mov    %edx,0xc(%rsp)
mov    %edi,0x10(%rsp)
mov    %esi,0x14(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x22b,%edi
mov    %rcx,%rdx
mov    %r8,%rcx
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @syscon_retrieve_dobldobl_Laurent_term(i32 %0, i32 %1, i32 %2, i32* %3, double* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca double*
%11 = alloca [3 x i32]
%12 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store double* %4, double** %10
%13 = load i32, i32* %8
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
store i32 %13, i32* %14
%15 = load i32, i32* %6
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 1
store i32 %15, i32* %16
%17 = load i32, i32* %7
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 2
store i32 %17, i32* %18
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
%20 = load i32*, i32** %9
%21 = load double*, double** %10
%22 = call i32 @_ada_use_c2phc4c(i32 555, i32* %19, i32* %20, double* %21, i32 0)
store i32 %22, i32* %12
%23 = load i32, i32* %12
ret i32 %23
}

LLVM IR (-O2):
define i32 @syscon_retrieve_dobldobl_Laurent_term(i32 %0, i32 %1, i32 %2, i32* %3, double* %4) {
%6 = alloca [3 x i32]
%7 = bitcast [3 x i32]* %6 to i8*
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 %2, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
store i32 %0, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
store i32 %1, i32* %10
%11 = call i32 @_ada_use_c2phc4c(i32 555, i32* %8, i32* %3, double* %4, i32 0)
ret i32 %11
}
/* Variables and functions */
double drand48();
double mydrand(void) { return drand48() - 0.5; }


x86 assembly (clang, -O0):
<mydrand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <drand48@plt>
movsd  0xedd(%rip),%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mydrand>:
push   %rax
xor    %eax,%eax
call   1030 <drand48@plt>
addsd  0xee0(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @mydrand() {
%1 = call double (...) @drand48()
%2 = fsub double %1, 5.000000e-01
ret double %2
}

LLVM IR (-O2):
define double @mydrand() {
%1 = tail call double (...) @drand48()
%2 = fadd double %1, -5.000000e-01
ret double %2
}
const char *getCharacter() { return "C_native"; }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"C_native\00"
define i8* @getCharacter() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"C_native\00"
define i8* @getCharacter() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
int char_to_int(const char c) { return c - '0'; }


x86 assembly (clang, -O0):
<char_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @char_to_int(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 48
ret i32 %5
}

LLVM IR (-O2):
define i32 @char_to_int(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -48
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ foo(int /*<<< orphan*/);
__attribute__((no, noclone)) unsigned int f1(unsigned int x, unsigned int y) {
  unsigned int r = x - y;
  if (r > x)
    foo(0);
  return r;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jbe    113a <f1+0x2a>
xor    %edi,%edi
call   1030 <foo@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbx
mov    %edi,%ebx
sub    %esi,%ebx
jae    111e <f1+0xe>
xor    %edi,%edi
call   1030 <foo@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sub i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %3
%11 = icmp ugt i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @foo(i32 0)
br label %14
14: ; preds = %12, %2
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @f1(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @foo(i32 0)
br label %6
6: ; preds = %4, %2
%7 = sub i32 %0, %1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ gmx_mdmat(int, char **);
int main(int argc, char *argv[]) {
  gmx_mdmat(argc, argv);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <gmx_mdmat@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_mdmat(i32 %0, i8** %1)
ret i32 0
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll40(struct __test_metadata *);
void wrapper_epoll40(struct __test_metadata *_metadata,
                     struct __fixture_variant_metadata *variant) {
  epoll40(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll40>:
jmp    1030 <epoll40@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll40(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll40(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll40(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll40(%struct.__test_metadata* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
void lf_printnum(uint32_t num) { printf("%ld", (long)num); }


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

x86 assembly (clang, -O2):
<lf_printnum>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define void @lf_printnum(i64 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
ret void
}
unsigned long IWDGTimerStatusGet(void) {
  return (*((volatile unsigned long *)(0x4000300C)));
}


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

x86 assembly (clang, -O2):
<IWDGTimerStatusGet>:
mov    0x4000300c,%rax
40
ret

LLVM IR (-O0):
define i64 @IWDGTimerStatusGet() {
%1 = load volatile i64, i64* inttoptr (i64 1073754124 to i64*)
ret i64 %1
}

LLVM IR (-O2):
define i64 @IWDGTimerStatusGet() {
%1 = load volatile i64, i64* inttoptr (i64 1073754124 to i64*)
ret i64 %1
}
long long llf(long long llx, long lx, long double lld) {
  int m = llx;
  m = 243LL;
  lld = 3.542L;
  lx = 5234LL;
  lx = 5342L;
  llx = lx;
  lx = llx;
  llx = m;
  return lx;
}


x86 assembly (clang, -O0):
<llf>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
fstpt  -0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
movl   $0xf3,-0x24(%rbp)
fldt   0xedb(%rip)
fstpt  -0x20(%rbp)
movq   $0x1472,-0x10(%rbp)
movq   $0x14de,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movslq -0x24(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @llf(i64 %0, i64 %1, x86_fp80 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca x86_fp80
%7 = alloca i32
store i64 %0, i64* %4
store i64 %1, i64* %5
store x86_fp80 %2, x86_fp80* %6
%8 = load i64, i64* %4
%9 = trunc i64 %8 to i32
store i32 %9, i32* %7
store i32 243, i32* %7
store x86_fp80 0xK4000E2B020C49BA5E354, x86_fp80* %6
store i64 5234, i64* %5
store i64 5342, i64* %5
%10 = load i64, i64* %5
store i64 %10, i64* %4
%11 = load i64, i64* %4
store i64 %11, i64* %5
%12 = load i32, i32* %7
%13 = sext i32 %12 to i64
store i64 %13, i64* %4
%14 = load i64, i64* %5
ret i64 %14
}

LLVM IR (-O2):
define i64 @llf(i64 %0, i64 %1, x86_fp80 %2) {
ret i64 5342
}
/* Variables and functions */
int runcmdline(char *);
int /*<<< orphan*/ sputargv(char *, char **, char);
int b_eval(int argc, char *argv[]) {
  char line[255 + 1];
  sputargv(line, argv + 1, ' ');
  return runcmdline(line);
  argc = argc;
}


x86 assembly (clang, -O0):
<b_eval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x8,%rsi
mov    $0x20,%edx
call   1030 <sputargv@plt>
lea    -0x110(%rbp),%rdi
call   1040 <runcmdline@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_eval>:
push   %rbx
sub    $0x100,%rsp
add    $0x8,%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x20,%edx
call   1030 <sputargv@plt>
mov    %rbx,%rdi
call   1040 <runcmdline@plt>
add    $0x100,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @b_eval(i32 %0, i8** %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = call i32 @sputargv(i8* %4, i8** %5, i8 signext 32)
%7 = call i32 @runcmdline(i8* %4)
ret i32 %7
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void delay(void) {
  struct timespec ts;
  ts.tv_sec = 0;
  ts.tv_nsec = 1000000;
  assert(!nanosleep(&ts, NULL));
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
movl   $0xf4240,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
sub    $0x18,%rsp
movq   $0x0,0x10(%rsp)
movl   $0xf4240,0x8(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
define void @delay() {
%1 = alloca %struct.timespec
%2 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
store i64 0, i64* %2
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
store i32 1000000, i32* %3
%4 = call i32 @nanosleep(%struct.timespec* %1, i32* null)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define void @delay() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
store i64 0, i64* %3
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
store i32 1000000, i32* %4
%5 = call i32 @nanosleep(%struct.timespec* %1, i32* null)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned long, unsigned long,
                           unsigned long, unsigned long);
short int ipv4_integer2ip(unsigned long ip_int, char *ip) {
  sprintf(ip, "%i.%i.%i.%i", ((ip_int >> 24) & 0x000000FF),
          ((ip_int >> 16) & 0x000000FF), ((ip_int >> 8) & 0x000000FF),
          (ip_int & 0x000000FF));
  return 0;
}


x86 assembly (clang, -O0):
<ipv4_integer2ip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
shr    $0x18,%rdx
and    $0xff,%rdx
mov    -0x8(%rbp),%rcx
shr    $0x10,%rcx
and    $0xff,%rcx
mov    -0x8(%rbp),%r8
shr    $0x8,%r8
and    $0xff,%r8
mov    -0x8(%rbp),%r9
and    $0xff,%r9
lea    0xe9d(%rip),%rsi
call   1030 <sprintf@plt>
xor    %eax,%eax
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv4_integer2ip>:
push   %rbx
mov    %rsi,%rax
mov    %rdi,%rdx
mov    %edx,%ecx
movzbl %dh,%ebx
movzbl %dl,%r9d
shr    $0x18,%edx
shr    $0x10,%ecx
movzbl %cl,%ecx
lea    0xed0(%rip),%rsi
mov    %rax,%rdi
mov    %rbx,%r8
call   1030 <sprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%i.%i.%i.%i\00"
define signext i16 @ipv4_integer2ip(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i64, i64* %3
%7 = lshr i64 %6, 24
%8 = and i64 %7, 255
%9 = load i64, i64* %3
%10 = lshr i64 %9, 16
%11 = and i64 %10, 255
%12 = load i64, i64* %3
%13 = lshr i64 %12, 8
%14 = and i64 %13, 255
%15 = load i64, i64* %3
%16 = and i64 %15, 255
%17 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %8, i64 %11, i64 %14, i64 %16)
ret i16 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%i.%i.%i.%i\00"
define signext i16 @ipv4_integer2ip(i64 %0, i8* nocapture writeonly %1) {
%3 = lshr i64 %0, 24
%4 = and i64 %3, 255
%5 = lshr i64 %0, 16
%6 = and i64 %5, 255
%7 = lshr i64 %0, 8
%8 = and i64 %7, 255
%9 = and i64 %0, 255
%10 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %4, i64 %6, i64 %8, i64 %9)
ret i16 0
}
/* Type definitions */
struct timeval {
  long long tv_sec;
  long long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
long long get_timebase() {
  struct timeval tm;
  gettimeofday(&tm, 0);
  return tm.tv_sec * 1000000LL + (tm.tv_usec);
}


x86 assembly (clang, -O0):
<get_timebase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x10(%rbp),%rax
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_timebase>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x8(%rsp),%rax
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @get_timebase() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i64, i64* %3
%5 = mul nsw i64 %4, 1000000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i64, i64* %6
%8 = add nsw i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @get_timebase() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
ret i64 %9
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRCD_get(void) { return U_WMRCORENONE_get("U_WMRCD"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRCD\00"
define i32 @U_WMRCD_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRCD\00"
define i32 @U_WMRCD_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void intel_crtc_disable_pipe_crc(struct intel_crtc *crtc) {}


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

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

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

LLVM IR (-O2):
%struct.intel_crtc = type opaque
define void @intel_crtc_disable_pipe_crc(%struct.intel_crtc* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ C67_asm(char *, int, int /*<<< orphan*/, int /*<<< orphan*/);
void C67_LDH_SP_A0(int r) { C67_asm("LDH.D *+SP[A0]", r, 0, 0); }


x86 assembly (clang, -O0):
<C67_LDH_SP_A0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <C67_asm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C67_LDH_SP_A0>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <C67_asm@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"LDH.D *+SP[A0]\00"
define void @C67_LDH_SP_A0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @C67_asm(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"LDH.D *+SP[A0]\00"
define void @C67_LDH_SP_A0(i32 %0) {
%2 = tail call i32 @C67_asm(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0, i32 0, i32 0)
ret void
}
void g_main_loop_get_context() {}


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

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

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

LLVM IR (-O2):
define void @g_main_loop_get_context() {
ret void
}
void gtk_container_child_get_valist() {}


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

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

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

LLVM IR (-O2):
define void @gtk_container_child_get_valist() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, unsigned long);
char *strndup(char const *, size_t);
char *xstrndup(const char *s, size_t n) {
  char *ret;
  if (!s)
    return NULL;
  ret = strndup(s, n);
  if (!ret)
    die("Can't strndup %lu bytes\n", (unsigned long)n + 1);
  return ret;
}


x86 assembly (clang, -O0):
<xstrndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1148 <xstrndup+0x28>
movq   $0x0,-0x8(%rbp)
jmp    1180 <xstrndup+0x60>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strndup@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1178 <xstrndup+0x58>
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
lea    0xe8d(%rip),%rdi
call   1040 <die@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrndup>:
push   %rbx
test   %rdi,%rdi
je     1148 <xstrndup+0x28>
mov    %rsi,%rbx
call   1030 <strndup@plt>
test   %rax,%rax
je     1135 <xstrndup+0x15>
pop    %rbx
ret
add    $0x1,%rbx
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
call   1040 <die@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Can't strndup %lu bytes\0A\00"
define i8* @xstrndup(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %10, label %9
9: ; preds = %2
store i8* null, i8** %3
br label %22
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = load i64, i64* %5
%13 = call i8* @strndup(i8* %11, i64 %12)
store i8* %13, i8** %6
%14 = load i8*, i8** %6
%15 = icmp ne i8* %14, null
br i1 %15, label %20, label %16
16: ; preds = %10
%17 = load i64, i64* %5
%18 = add i64 %17, 1
%19 = call i32 @die(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 %18)
br label %20
20: ; preds = %16, %10
%21 = load i8*, i8** %6
store i8* %21, i8** %3
br label %22
22: ; preds = %20, %9
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
@.str = [25 x i8] c"Can't strndup %lu bytes\0A\00"
define noalias i8* @xstrndup(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = tail call i8* @strndup(i8* %0, i64 %1)
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = add i64 %1, 1
%9 = tail call i32 @die(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 %8)
br label %10
10: ; preds = %4, %7, %2
%11 = phi i8* [ null, %2 ], [ null, %7 ], [ %5, %4 ]
ret i8* %11
}
/* Variables and functions */
int fact(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int n = 4;
  printf("%d\n", fact(n));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <fact@plt>
mov    %eax,%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1040 <fact@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 4, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @fact(i32 %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @fact(i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
unsigned int hx(unsigned int);
unsigned int hex_linearCoord(unsigned int r, unsigned int k, unsigned int i) {
  return (r == 0 && k == 0 && i == 0) ? 0 : hx(r) + (k * r) + i;
}


x86 assembly (clang, -O0):
<hex_linearCoord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1149 <hex_linearCoord+0x39>
cmpl   $0x0,-0x8(%rbp)
jne    1149 <hex_linearCoord+0x39>
cmpl   $0x0,-0xc(%rbp)
jne    1149 <hex_linearCoord+0x39>
xor    %eax,%eax
mov    %eax,-0x10(%rbp)
jmp    1160 <hex_linearCoord+0x50>
mov    -0x4(%rbp),%edi
call   1030 <hx@plt>
mov    -0x8(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    %ecx,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_linearCoord>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%eax
or     %edi,%eax
or     %edx,%eax
je     1132 <hex_linearCoord+0x22>
mov    %edx,%r14d
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <hx@plt>
imul   %ebp,%ebx
add    %r14d,%ebx
add    %eax,%ebx
jmp    1134 <hex_linearCoord+0x24>
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @hex_linearCoord(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %3
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %6
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %12
br label %25
16: ; preds = %12, %9, %3
%17 = load i32, i32* %4
%18 = call i32 @hx(i32 %17)
%19 = load i32, i32* %5
%20 = load i32, i32* %4
%21 = mul i32 %19, %20
%22 = add i32 %18, %21
%23 = load i32, i32* %6
%24 = add i32 %22, %23
br label %25
25: ; preds = %16, %15
%26 = phi i32 [ 0, %15 ], [ %24, %16 ]
ret i32 %26
}

LLVM IR (-O2):
define i32 @hex_linearCoord(i32 %0, i32 %1, i32 %2) {
%4 = or i32 %1, %0
%5 = or i32 %4, %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = tail call i32 @hx(i32 %0)
%9 = mul i32 %1, %0
%10 = add i32 %9, %2
%11 = add i32 %10, %8
br label %12
12: ; preds = %3, %7
%13 = phi i32 [ %11, %7 ], [ 0, %3 ]
ret i32 %13
}
imm0indreg1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if (22 <= (*p1))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<imm0indreg1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x16,%eax
cmp    %ecx,%eax
jg     113e <imm0indreg1+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <imm0indreg1+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imm0indreg1>:
xor    %eax,%eax
cmpb   $0x16,(%r9)
setge  %al
ret

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

LLVM IR (-O2):
define i32 @imm0indreg1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture %5) {
%7 = load i8, i8* %5
%8 = icmp sgt i8 %7, 21
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int ParEndSolve(unsigned char *, int, int, int, int, int, int);
int EndSolve(unsigned char *board, int alpha, int beta, int color, int empties,
             int discdiff, int prevmove) {
  return ParEndSolve(board, alpha, beta, color, empties, discdiff, prevmove);
}


x86 assembly (clang, -O0):
<EndSolve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <ParEndSolve@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EndSolve>:
jmp    1030 <ParEndSolve@plt>

LLVM IR (-O0):
define i32 @EndSolve(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i8*, i8** %8
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = load i32, i32* %13
%21 = load i32, i32* %14
%22 = call i32 @ParEndSolve(i8* %15, i32 %16, i32 %17, i32 %18, i32 %19, i32 %20, i32 %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @EndSolve(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 @ParEndSolve(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
ret i32 %8
}
float f(float x) {
  float y;
  y = ((x - 5.0) * x + 16.0) * x - 80.0;
  return (y);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xef6(%rip),%xmm1
subsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb4(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
addsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeec(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee8(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @f(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fsub double %5, 5.000000e+00
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = call double @llvm.fmuladd.f64(double %6, double %8, double 1.600000e+01)
%10 = load float, float* %2
%11 = fpext float %10 to double
%12 = call double @llvm.fmuladd.f64(double %9, double %11, double -8.000000e+01)
%13 = fptrunc double %12 to float
store float %13, float* %3
%14 = load float, float* %3
ret float %14
}

LLVM IR (-O2):
define float @f(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, -5.000000e+00
%4 = tail call double @llvm.fmuladd.f64(double %3, double %2, double 1.600000e+01)
%5 = tail call double @llvm.fmuladd.f64(double %4, double %2, double -8.000000e+01)
%6 = fptrunc double %5 to float
ret float %6
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_gettid;
int /*<<< orphan*/ syscall(int /*<<< orphan*/);
pid_t gettid_() { return syscall(SYS_gettid); }


x86 assembly (clang, -O0):
<gettid_>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettid_>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_gettid = global i32 0
define i32 @gettid_() {
%1 = load i32, i32* @SYS_gettid
%2 = call i32 @syscall(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@SYS_gettid = global i32 0
define i32 @gettid_() {
%1 = load i32, i32* @SYS_gettid
%2 = tail call i32 @syscall(i32 %1)
ret i32 %2
}
unsigned xrop3_110_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  unsigned stk4;
  stk4 = ~S;
  stk3 = T | stk4;
  stk2 = D & stk3;
  stk1 = S ^ stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_110_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_110_0_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
xor    $0xff,%edi
or     %esi,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_110_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %6
%25 = xor i32 %24, -1
store i32 %25, i32* %11
%26 = load i32, i32* %7
%27 = load i32, i32* %11
%28 = or i32 %26, %27
store i32 %28, i32* %10
%29 = load i32, i32* %5
%30 = load i32, i32* %10
%31 = and i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %6
%33 = load i32, i32* %9
%34 = xor i32 %32, %33
store i32 %34, i32* %8
%35 = load i32, i32* %8
ret i32 %35
}

LLVM IR (-O2):
define i32 @xrop3_110_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = xor i32 %3, 255
%7 = or i32 %6, %5
%8 = xor i32 %4, %7
ret i32 %8
}
/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ erasechar();
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_int(int /*<<< orphan*/);
void cmd_erasechar(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_int(erasechar());
}


x86 assembly (clang, -O0):
<cmd_erasechar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1167 <cmd_erasechar+0x27>
jmp    117f <cmd_erasechar+0x3f>
mov    $0x1,%edi
call   1040 <report_count@plt>
mov    $0x0,%al
call   1060 <erasechar@plt>
mov    %eax,%edi
call   1050 <report_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_erasechar>:
push   %rax
xor    %esi,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    114f <cmd_erasechar+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
xor    %eax,%eax
call   1060 <erasechar@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <report_int@plt>

LLVM IR (-O0):
define void @cmd_erasechar(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 0)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %13
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 (...) @erasechar()
%12 = call i32 @report_int(i32 %11)
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @cmd_erasechar(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @erasechar()
%8 = tail call i32 @report_int(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
void *memmove(void *d_vp, void *s_vp, unsigned long n) {
  unsigned i;
  char *d = d_vp, *s = s_vp;
  for (i = 0; i < n; ++i)
    d[n - i - 1] = s[n - i - 1];
  return d_vp;
}


x86 assembly (clang, -O0):
<memmove>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%rax
jae    116c <memmove+0x6c>
mov    -0x30(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%edx
sub    %rdx,%rcx
sub    $0x1,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x28(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%esi
sub    %rsi,%rcx
sub    $0x1,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1127 <memmove+0x27>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memmove>:
mov    %rdi,%rax
test   %rdx,%rdx
je     1129 <memmove+0x29>
xor    %r8d,%r8d
nopl   0x0(%rax,%rax,1)
mov    %r8,%rdi
not    %rdi
add    %rdx,%rdi
movzbl (%rsi,%rdi,1),%ecx
mov    %cl,(%rax,%rdi,1)
add    $0x1,%r8d
cmp    %rdx,%r8
jb     1110 <memmove+0x10>
ret

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

LLVM IR (-O2):
define i8* @memmove(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %15, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %13, %5 ], [ 0, %3 ]
%7 = xor i64 %6, -1
%8 = add i64 %7, %2
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = load i8, i8* %9
%11 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 %10, i8* %11
%12 = add nuw nsw i64 %6, 1
%13 = and i64 %12, 4294967295
%14 = icmp ult i64 %13, %2
br i1 %14, label %5, label %15
15: ; preds = %5, %3
ret i8* %0
}
double solar_perigee_dot(double tdt) {
  double T;
  double ldot;
  T = (tdt - (2433282.42345905)) / (36525.0);
  ldot = 6190.67 + 2 * (T * (1.65 + 3 * (T * 0.012)));
  ldot = (((((ldot) / 3600.0)) * ((3.14159265358979323846) / 180.0)));
  return (ldot);
}


x86 assembly (clang, -O0):
<solar_perigee_dot>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xf22(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xf0e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xef0(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xed3(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xecf(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
movsd  0xeab(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xe8d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe79(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<solar_perigee_dot>:
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xef4(%rip),%xmm1
addsd  0xef4(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm0,%xmm0
addsd  0xeec(%rip),%xmm0
divsd  0xeec(%rip),%xmm0
mulsd  0xeec(%rip),%xmm0
ret

LLVM IR (-O0):
define double @solar_perigee_dot(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = fsub double %5, 0x414290813633E7F9
%7 = fdiv double %6, 3.652500e+04
store double %7, double* %3
%8 = load double, double* %3
%9 = load double, double* %3
%10 = fmul double %9, 1.200000e-02
%11 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %10, double 1.650000e+00)
%12 = fmul double %8, %11
%13 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %12, double 6.190670e+03)
store double %13, double* %4
%14 = load double, double* %4
%15 = fdiv double %14, 3.600000e+03
%16 = fmul double %15, 0x3F91DF46A2529D39
store double %16, double* %4
%17 = load double, double* %4
ret double %17
}

LLVM IR (-O2):
define double @solar_perigee_dot(double %0) {
%2 = fadd double %0, 0xC14290813633E7F9
%3 = fdiv double %2, 3.652500e+04
%4 = fmul double %3, 1.200000e-02
%5 = tail call double @llvm.fmuladd.f64(double %4, double 3.000000e+00, double 1.650000e+00)
%6 = fmul double %3, %5
%7 = tail call double @llvm.fmuladd.f64(double %6, double 2.000000e+00, double 6.190670e+03)
%8 = fdiv double %7, 3.600000e+03
%9 = fmul double %8, 0x3F91DF46A2529D39
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int print_msg_to_dump(char *msg, FILE *dump_file) {
  fprintf(dump_file, "<div class=msg>%s</div><br/>", msg);
  return 0;
}


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

x86 assembly (clang, -O2):
<print_msg_to_dump>:
push   %rax
mov    %rsi,%rax
mov    %rdi,%rdx
lea    0xee2(%rip),%rsi
mov    %rax,%rdi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"<div class=msg>%s</div><br/>\00"
define i32 @print_msg_to_dump(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"<div class=msg>%s</div><br/>\00"
define i32 @print_msg_to_dump(i8* %0, i32* nocapture %1) {
%3 = tail call i32 @fprintf(i32* %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int serial_terminal(char *, int, int /*<<< orphan*/, int /*<<< orphan*/,
                    int /*<<< orphan*/);
int fancy_cui_main(char *dev_path, int rate) {
  int ret;
  ret = serial_terminal(dev_path, rate, 0, 0, 0);
  return ret;
}


x86 assembly (clang, -O0):
<fancy_cui_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1030 <serial_terminal@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fancy_cui_main>:
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <serial_terminal@plt>

LLVM IR (-O0):
define i32 @fancy_cui_main(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 @serial_terminal(i8* %6, i32 %7, i32 0, i32 0, i32 0)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @fancy_cui_main(i8* %0, i32 %1) {
%3 = tail call i32 @serial_terminal(i8* %0, i32 %1, i32 0, i32 0, i32 0)
ret i32 %3
}