#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 */
struct AnimationList {
  int dummy;
};

/* Variables and functions */
void *FindAnimation(char *, struct AnimationList *);
int /*<<< orphan*/ _GetRotation(void *, double, double *);
int GetRotation(struct AnimationList *al, char *name, double time,
                double Rout[4]) {
  void *a = FindAnimation(name, al);
  if (a) {
    _GetRotation(a, time, Rout);
    return 1;
  }
  Rout[0] = 1.0;
  Rout[1] = 0.0;
  Rout[2] = 0.0;
  Rout[3] = 0.0;
  return 0;
}


x86 assembly (clang, -O0):
<GetRotation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <FindAnimation@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1173 <GetRotation+0x53>
mov    -0x30(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
mov    -0x28(%rbp),%rsi
call   1040 <_GetRotation@plt>
movl   $0x1,-0x4(%rbp)
jmp    11ae <GetRotation+0x8e>
mov    -0x28(%rbp),%rax
movsd  0xe81(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetRotation>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
movsd  %xmm0,0x8(%rsp)
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <FindAnimation@plt>
test   %rax,%rax
je     1159 <GetRotation+0x39>
mov    %rax,%rdi
movsd  0x8(%rsp),%xmm0
mov    %rbx,%rsi
call   1040 <_GetRotation@plt>
mov    $0x1,%eax
jmp    1177 <GetRotation+0x57>
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rbx)
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rbx)
movq   $0x0,0x18(%rbx)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.AnimationList = type { i32 }
define i32 @GetRotation(%struct.AnimationList* %0, i8* %1, double %2, double* %3) {
%5 = alloca i32
%6 = alloca %struct.AnimationList*
%7 = alloca i8*
%8 = alloca double
%9 = alloca double*
%10 = alloca i8*
store %struct.AnimationList* %0, %struct.AnimationList** %6
store i8* %1, i8** %7
store double %2, double* %8
store double* %3, double** %9
%11 = load i8*, i8** %7
%12 = load %struct.AnimationList*, %struct.AnimationList** %6
%13 = call i8* @FindAnimation(i8* %11, %struct.AnimationList* %12)
store i8* %13, i8** %10
%14 = load i8*, i8** %10
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %21
16: ; preds = %4
%17 = load i8*, i8** %10
%18 = load double, double* %8
%19 = load double*, double** %9
%20 = call i32 @_GetRotation(i8* %17, double %18, double* %19)
store i32 1, i32* %5
br label %30
21: ; preds = %4
%22 = load double*, double** %9
%23 = getelementptr inbounds double, double* %22, i64 0
store double 1.000000e+00, double* %23
%24 = load double*, double** %9
%25 = getelementptr inbounds double, double* %24, i64 1
store double 0.000000e+00, double* %25
%26 = load double*, double** %9
%27 = getelementptr inbounds double, double* %26, i64 2
store double 0.000000e+00, double* %27
%28 = load double*, double** %9
%29 = getelementptr inbounds double, double* %28, i64 3
store double 0.000000e+00, double* %29
store i32 0, i32* %5
br label %30
30: ; preds = %21, %16
%31 = load i32, i32* %5
ret i32 %31
}

LLVM IR (-O2):
%struct.AnimationList = type { i32 }
define i32 @GetRotation(%struct.AnimationList* %0, i8* %1, double %2, double* %3) {
%5 = tail call i8* @FindAnimation(i8* %1, %struct.AnimationList* %0)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @_GetRotation(i8* %5, double %2, double* %3)
br label %12
9: ; preds = %4
store double 1.000000e+00, double* %3
%10 = getelementptr inbounds double, double* %3, i64 1
%11 = bitcast double* %10 to i8*
br label %12
12: ; preds = %9, %7
%13 = phi i32 [ 1, %7 ], [ 0, %9 ]
ret i32 %13
}