#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*/ memcpy(unsigned int *, unsigned int *, int);
void Calculate_Timer_Interval(float fARGIN_PWM_Freq_InHz,
                              float fARGIN_PWM_DutyCycle_InPercentage,
                              unsigned int *uiARGOUT_pCycleCnt_For_PwmHigh,
                              unsigned int *uiARGOUT_pCycleCnt_For_PwmLow) {
  unsigned int uiCycleCnt4PwmHigh = 0, uiCycleCnt4PwmLow = 0;
  uiCycleCnt4PwmHigh =
      (unsigned int)(1000 * (fARGIN_PWM_DutyCycle_InPercentage /
                             fARGIN_PWM_Freq_InHz));
  uiCycleCnt4PwmLow =
      (unsigned int)(1000 * ((100 - fARGIN_PWM_DutyCycle_InPercentage) /
                             fARGIN_PWM_Freq_InHz));
  memcpy(uiARGOUT_pCycleCnt_For_PwmHigh, &uiCycleCnt4PwmHigh,
         sizeof(unsigned int));
  memcpy(uiARGOUT_pCycleCnt_For_PwmLow, &uiCycleCnt4PwmLow,
         sizeof(unsigned int));
  return;
}


x86 assembly (clang, -O0):
<Calculate_Timer_Interval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  0xeb2(%rip),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%rax
mov    %eax,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm2
movss  0xe9d(%rip),%xmm0
subss  %xmm2,%xmm0
movss  -0x4(%rbp),%xmm2
divss  %xmm2,%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%rax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Calculate_Timer_Interval>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
movss  0xee4(%rip),%xmm2
subss  %xmm1,%xmm2
divss  %xmm0,%xmm1
movss  0xed0(%rip),%xmm3
mulss  %xmm3,%xmm1
cvttss2si %xmm1,%rax
mov    %eax,0xc(%rsp)
divss  %xmm0,%xmm2
mulss  %xmm3,%xmm2
cvttss2si %xmm2,%rax
mov    %eax,0x8(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @Calculate_Timer_Interval(float %0, float %1, i32* %2, i32* %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store float %0, float* %5
store float %1, float* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
store i32 0, i32* %9
store i32 0, i32* %10
%11 = load float, float* %6
%12 = load float, float* %5
%13 = fdiv float %11, %12
%14 = fmul float 1.000000e+03, %13
%15 = fptoui float %14 to i32
store i32 %15, i32* %9
%16 = load float, float* %6
%17 = fsub float 1.000000e+02, %16
%18 = load float, float* %5
%19 = fdiv float %17, %18
%20 = fmul float 1.000000e+03, %19
%21 = fptoui float %20 to i32
store i32 %21, i32* %10
%22 = load i32*, i32** %7
%23 = call i32 @memcpy(i32* %22, i32* %9, i32 4)
%24 = load i32*, i32** %8
%25 = call i32 @memcpy(i32* %24, i32* %10, i32 4)
ret void
}

LLVM IR (-O2):
define void @Calculate_Timer_Interval(float %0, float %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i32* %5 to i8*
%8 = bitcast i32* %6 to i8*
%9 = fdiv float %1, %0
%10 = fmul float %9, 1.000000e+03
%11 = fptoui float %10 to i32
store i32 %11, i32* %5
%12 = fsub float 1.000000e+02, %1
%13 = fdiv float %12, %0
%14 = fmul float %13, 1.000000e+03
%15 = fptoui float %14 to i32
store i32 %15, i32* %6
%16 = call i32 @memcpy(i32* %2, i32* %5, i32 4)
%17 = call i32 @memcpy(i32* %3, i32* %6, i32 4)
ret void
}