#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*/ rotate_point_backward(double *, double, double, double);
void rotate_tri(double tri[9], double rotx, double roty, double rotz) {
  rotate_point_backward(&tri[0], rotx, roty, rotz);
  rotate_point_backward(&tri[3], rotx, roty, rotz);
  rotate_point_backward(&tri[6], rotx, roty, rotz);
}


x86 assembly (clang, -O0):
<rotate_tri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1030 <rotate_point_backward@plt>
mov    -0x8(%rbp),%rdi
add    $0x18,%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1030 <rotate_point_backward@plt>
mov    -0x8(%rbp),%rdi
add    $0x30,%rdi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1030 <rotate_point_backward@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate_tri>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %rdi,%rbx
call   1030 <rotate_point_backward@plt>
lea    0x18(%rbx),%rdi
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
call   1030 <rotate_point_backward@plt>
add    $0x30,%rbx
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
add    $0x20,%rsp
pop    %rbx
jmp    1030 <rotate_point_backward@plt>

LLVM IR (-O0):
define void @rotate_tri(double* %0, double %1, double %2, double %3) {
%5 = alloca double*
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double* %0, double** %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double*, double** %5
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %6
%12 = load double, double* %7
%13 = load double, double* %8
%14 = call i32 @rotate_point_backward(double* %10, double %11, double %12, double %13)
%15 = load double*, double** %5
%16 = getelementptr inbounds double, double* %15, i64 3
%17 = load double, double* %6
%18 = load double, double* %7
%19 = load double, double* %8
%20 = call i32 @rotate_point_backward(double* %16, double %17, double %18, double %19)
%21 = load double*, double** %5
%22 = getelementptr inbounds double, double* %21, i64 6
%23 = load double, double* %6
%24 = load double, double* %7
%25 = load double, double* %8
%26 = call i32 @rotate_point_backward(double* %22, double %23, double %24, double %25)
ret void
}

LLVM IR (-O2):
define void @rotate_tri(double* %0, double %1, double %2, double %3) {
%5 = tail call i32 @rotate_point_backward(double* %0, double %1, double %2, double %3)
%6 = getelementptr inbounds double, double* %0, i64 3
%7 = tail call i32 @rotate_point_backward(double* %6, double %1, double %2, double %3)
%8 = getelementptr inbounds double, double* %0, i64 6
%9 = tail call i32 @rotate_point_backward(double* %8, double %1, double %2, double %3)
ret void
}