#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*/ CG_Argv(int);
int /*<<< orphan*/ CG_Fade(int, int, int, int, float);
int atof(int /*<<< orphan*/);
int trap_Argc();
void CG_Fade_f(void) {
  int r, g, b, a;
  float time;
  if (trap_Argc() < 6) {
    return;
  }
  r = atof(CG_Argv(1));
  g = atof(CG_Argv(2));
  b = atof(CG_Argv(3));
  a = atof(CG_Argv(4));
  time = atof(CG_Argv(5)) * 1000;
  CG_Fade(r, g, b, a, time);
}


x86 assembly (clang, -O0):
<CG_Fade_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1050 <trap_Argc@plt>
cmp    $0x6,%eax
jge    115d <CG_Fade_f+0x1d>
jmp    11e3 <CG_Fade_f+0xa3>
mov    $0x1,%edi
call   1040 <CG_Argv@plt>
mov    %eax,%edi
call   1030 <atof@plt>
mov    %eax,-0x4(%rbp)
mov    $0x2,%edi
call   1040 <CG_Argv@plt>
mov    %eax,%edi
call   1030 <atof@plt>
mov    %eax,-0x8(%rbp)
mov    $0x3,%edi
call   1040 <CG_Argv@plt>
mov    %eax,%edi
call   1030 <atof@plt>
mov    %eax,-0xc(%rbp)
mov    $0x4,%edi
call   1040 <CG_Argv@plt>
mov    %eax,%edi
call   1030 <atof@plt>
mov    %eax,-0x10(%rbp)
mov    $0x5,%edi
call   1040 <CG_Argv@plt>
mov    %eax,%edi
call   1030 <atof@plt>
imul   $0x3e8,%eax,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
movss  -0x14(%rbp),%xmm0
call   1060 <CG_Fade@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_Fade_f>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <trap_Argc@plt>
cmp    $0x6,%eax
jge    115e <CG_Fade_f+0x1e>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%edi
call   1040 <CG_Argv@plt>
mov    %eax,%edi
call   1030 <atof@plt>
mov    %eax,%r14d
mov    $0x2,%edi
call   1040 <CG_Argv@plt>
mov    %eax,%edi
call   1030 <atof@plt>
mov    %eax,%r15d
mov    $0x3,%edi
call   1040 <CG_Argv@plt>
mov    %eax,%edi
call   1030 <atof@plt>
mov    %eax,%ebx
mov    $0x4,%edi
call   1040 <CG_Argv@plt>
mov    %eax,%edi
call   1030 <atof@plt>
mov    %eax,%ebp
mov    $0x5,%edi
call   1040 <CG_Argv@plt>
mov    %eax,%edi
call   1030 <atof@plt>
imul   $0x3e8,%eax,%eax
cvtsi2ss %eax,%xmm0
mov    %r14d,%edi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <CG_Fade@plt>

LLVM IR (-O0):
define void @CG_Fade_f() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = call i32 (...) @trap_Argc()
%7 = icmp slt i32 %6, 6
br i1 %7, label %8, label %9
8: ; preds = %0
br label %28
9: ; preds = %0
%10 = call i32 @CG_Argv(i32 1)
%11 = call i32 @atof(i32 %10)
store i32 %11, i32* %1
%12 = call i32 @CG_Argv(i32 2)
%13 = call i32 @atof(i32 %12)
store i32 %13, i32* %2
%14 = call i32 @CG_Argv(i32 3)
%15 = call i32 @atof(i32 %14)
store i32 %15, i32* %3
%16 = call i32 @CG_Argv(i32 4)
%17 = call i32 @atof(i32 %16)
store i32 %17, i32* %4
%18 = call i32 @CG_Argv(i32 5)
%19 = call i32 @atof(i32 %18)
%20 = mul nsw i32 %19, 1000
%21 = sitofp i32 %20 to float
store float %21, float* %5
%22 = load i32, i32* %1
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = load i32, i32* %4
%26 = load float, float* %5
%27 = call i32 @CG_Fade(i32 %22, i32 %23, i32 %24, i32 %25, float %26)
br label %28
28: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @CG_Fade_f() {
%1 = tail call i32 (...) @trap_Argc()
%2 = icmp slt i32 %1, 6
br i1 %2, label %17, label %3
3: ; preds = %0
%4 = tail call i32 @CG_Argv(i32 1)
%5 = tail call i32 @atof(i32 %4)
%6 = tail call i32 @CG_Argv(i32 2)
%7 = tail call i32 @atof(i32 %6)
%8 = tail call i32 @CG_Argv(i32 3)
%9 = tail call i32 @atof(i32 %8)
%10 = tail call i32 @CG_Argv(i32 4)
%11 = tail call i32 @atof(i32 %10)
%12 = tail call i32 @CG_Argv(i32 5)
%13 = tail call i32 @atof(i32 %12)
%14 = mul nsw i32 %13, 1000
%15 = sitofp i32 %14 to float
%16 = tail call i32 @CG_Fade(i32 %5, i32 %7, i32 %9, i32 %11, float %15)
br label %17
17: ; preds = %0, %3
ret void
}