#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 */
scalar_t__ M_PI;
scalar_t__ M_PI_2;
float exp(int /*<<< orphan*/);
int /*<<< orphan*/ sinf(float);
float exp_sin_custom_io(float step, float max_steps, float max_val) {
  float mplier = max_val / 2.35040238729f;
  float pi_d_maxs = (float)M_PI / max_steps;
  step += max_steps;
  return (exp(sinf((step * pi_d_maxs) + (float)M_PI_2)) - 0.36787944117f) *
         mplier;
}


x86 assembly (clang, -O0):
<exp_sin_custom_io>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xec0(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    0x2e94(%rip),%rax
cvtsi2ssq (%rax),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
mov    0x2e5d(%rip),%rax
cvtsi2ssq (%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sinf@plt>
mov    %eax,%edi
call   1040 <exp@plt>
movss  0xe5c(%rip),%xmm1
subss  %xmm1,%xmm0
mulss  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp_sin_custom_io>:
push   %rax
divss  0xed7(%rip),%xmm2
movss  %xmm2,0x4(%rsp)
mov    0x2eb2(%rip),%rax
xorps  %xmm2,%xmm2
cvtsi2ssq (%rax),%xmm2
divss  %xmm1,%xmm2
addss  %xmm1,%xmm0
mulss  %xmm2,%xmm0
mov    0x2e8f(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2ssq (%rax),%xmm1
addss  %xmm1,%xmm0
call   1030 <sinf@plt>
mov    %eax,%edi
call   1040 <exp@plt>
addss  0xe93(%rip),%xmm0
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global i64 0
@M_PI_2 = global i64 0
define float @exp_sin_custom_io(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%9 = load float, float* %6
%10 = fdiv float %9, 0x4002CD9FC0000000
store float %10, float* %7
%11 = load i64, i64* @M_PI
%12 = sitofp i64 %11 to float
%13 = load float, float* %5
%14 = fdiv float %12, %13
store float %14, float* %8
%15 = load float, float* %5
%16 = load float, float* %4
%17 = fadd float %16, %15
store float %17, float* %4
%18 = load float, float* %4
%19 = load float, float* %8
%20 = load i64, i64* @M_PI_2
%21 = sitofp i64 %20 to float
%22 = call float @llvm.fmuladd.f32(float %18, float %19, float %21)
%23 = call i32 @sinf(float %22)
%24 = call float @exp(i32 %23)
%25 = fsub float %24, 0x3FD78B5640000000
%26 = load float, float* %7
%27 = fmul float %25, %26
ret float %27
}

LLVM IR (-O2):
@M_PI = global i64 0
@M_PI_2 = global i64 0
define float @exp_sin_custom_io(float %0, float %1, float %2) {
%4 = fdiv float %2, 0x4002CD9FC0000000
%5 = load i64, i64* @M_PI
%6 = sitofp i64 %5 to float
%7 = fdiv float %6, %1
%8 = fadd float %0, %1
%9 = load i64, i64* @M_PI_2
%10 = sitofp i64 %9 to float
%11 = tail call float @llvm.fmuladd.f32(float %8, float %7, float %10)
%12 = tail call i32 @sinf(float %11)
%13 = tail call float @exp(i32 %12)
%14 = fadd float %13, 0xBFD78B5640000000
%15 = fmul float %4, %14
ret float %15
}