#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 */
scalar_t__ cos(float const);
scalar_t__ sin(float const);
void floats_xyt_inv(const float xyta[3], float xytr[3]) {
  float s = (float)sin(xyta[2]), c = (float)cos(xyta[2]);
  xytr[0] = -s * xyta[1] - c * xyta[0];
  xytr[1] = -c * xyta[1] + s * xyta[0];
  xytr[2] = -xyta[2];
}


x86 assembly (clang, -O0):
<floats_xyt_inv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
call   1030 <sin@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
call   1040 <cos@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm2
movss  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mulss  (%rax),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm2
movss  -0x14(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mulss  (%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floats_xyt_inv>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movss  0x8(%rdi),%xmm0
call   1030 <sin@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movaps %xmm0,(%rsp)
movss  0x8(%rbx),%xmm0
call   1040 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movaps 0xea4(%rip),%xmm1
movaps (%rsp),%xmm4
movaps %xmm4,%xmm2
xorps  %xmm1,%xmm2
movss  (%rbx),%xmm3
mulss  %xmm0,%xmm3
mulss  0x4(%rbx),%xmm2
subss  %xmm3,%xmm2
movss  %xmm2,(%r14)
movaps %xmm4,%xmm2
mulss  (%rbx),%xmm2
mulss  0x4(%rbx),%xmm0
subss  %xmm0,%xmm2
movss  %xmm2,0x4(%r14)
movss  0x8(%rbx),%xmm0
xorps  %xmm1,%xmm0
movss  %xmm0,0x8(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @floats_xyt_inv(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca float
%6 = alloca float
store float* %0, float** %3
store float* %1, float** %4
%7 = load float*, float** %3
%8 = getelementptr inbounds float, float* %7, i64 2
%9 = load float, float* %8
%10 = call i64 @sin(float %9)
%11 = sitofp i64 %10 to float
store float %11, float* %5
%12 = load float*, float** %3
%13 = getelementptr inbounds float, float* %12, i64 2
%14 = load float, float* %13
%15 = call i64 @cos(float %14)
%16 = sitofp i64 %15 to float
store float %16, float* %6
%17 = load float, float* %5
%18 = fneg float %17
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 1
%21 = load float, float* %20
%22 = load float, float* %6
%23 = load float*, float** %3
%24 = getelementptr inbounds float, float* %23, i64 0
%25 = load float, float* %24
%26 = fmul float %22, %25
%27 = fneg float %26
%28 = call float @llvm.fmuladd.f32(float %18, float %21, float %27)
%29 = load float*, float** %4
%30 = getelementptr inbounds float, float* %29, i64 0
store float %28, float* %30
%31 = load float, float* %6
%32 = fneg float %31
%33 = load float*, float** %3
%34 = getelementptr inbounds float, float* %33, i64 1
%35 = load float, float* %34
%36 = load float, float* %5
%37 = load float*, float** %3
%38 = getelementptr inbounds float, float* %37, i64 0
%39 = load float, float* %38
%40 = fmul float %36, %39
%41 = call float @llvm.fmuladd.f32(float %32, float %35, float %40)
%42 = load float*, float** %4
%43 = getelementptr inbounds float, float* %42, i64 1
store float %41, float* %43
%44 = load float*, float** %3
%45 = getelementptr inbounds float, float* %44, i64 2
%46 = load float, float* %45
%47 = fneg float %46
%48 = load float*, float** %4
%49 = getelementptr inbounds float, float* %48, i64 2
store float %47, float* %49
ret void
}

LLVM IR (-O2):
define void @floats_xyt_inv(float* nocapture %0, float* nocapture writeonly %1) {
%3 = getelementptr inbounds float, float* %0, i64 2
%4 = load float, float* %3
%5 = tail call i64 @sin(float %4)
%6 = sitofp i64 %5 to float
%7 = load float, float* %3
%8 = tail call i64 @cos(float %7)
%9 = sitofp i64 %8 to float
%10 = fneg float %6
%11 = getelementptr inbounds float, float* %0, i64 1
%12 = load float, float* %11
%13 = load float, float* %0
%14 = fneg float %13
%15 = fmul float %9, %14
%16 = tail call float @llvm.fmuladd.f32(float %10, float %12, float %15)
store float %16, float* %1
%17 = fneg float %9
%18 = load float, float* %11
%19 = load float, float* %0
%20 = fmul float %19, %6
%21 = tail call float @llvm.fmuladd.f32(float %17, float %18, float %20)
%22 = getelementptr inbounds float, float* %1, i64 1
store float %21, float* %22
%23 = load float, float* %3
%24 = fneg float %23
%25 = getelementptr inbounds float, float* %1, i64 2
store float %24, float* %25
ret void
}