#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, double const, double const,
                          double const, double const, double const,
                          double const, double const);
void tracker_callback(unsigned sensor, const double pos[3],
                      const double quat[4]) {
  printf(
      "Tracker sensor %d at (%lf,%lf,%lf) with orientation (%lf,%lf,%lf,%lf)\n",
      sensor, pos[0], pos[1], pos[2], quat[0], quat[1], quat[2], quat[3]);
}


x86 assembly (clang, -O0):
<tracker_callback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm3
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm4
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm5
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm6
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tracker_callback>:
mov    %edi,%eax
movsd  (%rsi),%xmm0
movsd  0x8(%rsi),%xmm1
movsd  0x10(%rsi),%xmm2
movsd  (%rdx),%xmm3
movsd  0x8(%rdx),%xmm4
movsd  0x10(%rdx),%xmm5
movsd  0x18(%rdx),%xmm6
lea    0xec6(%rip),%rdi
mov    %eax,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [71 x i8] c"Tracker sensor %d at (%lf,%lf,%lf) with orientation (%lf,%lf,%lf,%lf)\0A\00"
define void @tracker_callback(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load i32, i32* %4
%8 = load double*, double** %5
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %5
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %5
%15 = getelementptr inbounds double, double* %14, i64 2
%16 = load double, double* %15
%17 = load double*, double** %6
%18 = getelementptr inbounds double, double* %17, i64 0
%19 = load double, double* %18
%20 = load double*, double** %6
%21 = getelementptr inbounds double, double* %20, i64 1
%22 = load double, double* %21
%23 = load double*, double** %6
%24 = getelementptr inbounds double, double* %23, i64 2
%25 = load double, double* %24
%26 = load double*, double** %6
%27 = getelementptr inbounds double, double* %26, i64 3
%28 = load double, double* %27
%29 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %7, double %10, double %13, double %16, double %19, double %22, double %25, double %28)
ret void
}

LLVM IR (-O2):
@.str = [71 x i8] c"Tracker sensor %d at (%lf,%lf,%lf) with orientation (%lf,%lf,%lf,%lf)\0A\00"
define void @tracker_callback(i32 %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 2
%8 = load double, double* %7
%9 = load double, double* %2
%10 = getelementptr inbounds double, double* %2, i64 1
%11 = load double, double* %10
%12 = getelementptr inbounds double, double* %2, i64 2
%13 = load double, double* %12
%14 = getelementptr inbounds double, double* %2, i64 3
%15 = load double, double* %14
%16 = tail call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %0, double %4, double %6, double %8, double %9, double %11, double %13, double %15)
ret void
}