#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*/ _GetTranslation(void *, double, double *);
int GetTranslation(struct AnimationList *al, char *name, double time,
                   double Tout[3]) {
  void *a = FindAnimation(name, al);
  if (a) {
    _GetTranslation(a, time, Tout);
    return 1;
  }
  Tout[0] = Tout[1] = Tout[2] = 0.0;
  return 0;
}


x86 assembly (clang, -O0):
<GetTranslation>:
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   1040 <FindAnimation@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1173 <GetTranslation+0x53>
mov    -0x30(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
mov    -0x28(%rbp),%rsi
call   1030 <_GetTranslation@plt>
movl   $0x1,-0x4(%rbp)
jmp    119d <GetTranslation+0x7d>
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.AnimationList = type { i32 }
define i32 @GetTranslation(%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 @_GetTranslation(i8* %17, double %18, double* %19)
store i32 1, i32* %5
br label %28
21: ; preds = %4
%22 = load double*, double** %9
%23 = getelementptr inbounds double, double* %22, i64 2
store double 0.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 0
store double 0.000000e+00, double* %27
store i32 0, i32* %5
br label %28
28: ; preds = %21, %16
%29 = load i32, i32* %5
ret i32 %29
}

LLVM IR (-O2):
%struct.AnimationList = type { i32 }
define i32 @GetTranslation(%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 @_GetTranslation(i8* %5, double %2, double* %3)
br label %11
9: ; preds = %4
%10 = bitcast double* %3 to i8*
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ 1, %7 ], [ 0, %9 ]
ret i32 %12
}