#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 */
float M_PI;
scalar_t__ M_PI_2;
float exp(int /*<<< orphan*/);
int /*<<< orphan*/ sin(scalar_t__);
float exp_sin_custom_io(float step, float max_steps, float max_val) {
  float mplier = max_val / 2.35040238729f;
  float pi_d_maxs = M_PI / max_steps;
  step += max_steps;
  return (exp(sin((step * pi_d_maxs) + 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
movss  (%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    0x2e5e(%rip),%rax
cvtsi2ssq (%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
cvttss2si %xmm0,%rdi
call   1030 <sin@plt>
mov    %eax,%edi
call   1040 <exp@plt>
movss  0xe58(%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
movss  (%rax),%xmm2
divss  %xmm1,%xmm2
addss  %xmm1,%xmm0
mov    0x2e97(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2ssq (%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm0,%xmm1
cvttss2si %xmm1,%rdi
call   1030 <sin@plt>
mov    %eax,%edi
call   1040 <exp@plt>
addss  0xe92(%rip),%xmm0
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
@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 float, float* @M_PI
%12 = load float, float* %5
%13 = fdiv float %11, %12
store float %13, float* %8
%14 = load float, float* %5
%15 = load float, float* %4
%16 = fadd float %15, %14
store float %16, float* %4
%17 = load float, float* %4
%18 = load float, float* %8
%19 = load i64, i64* @M_PI_2
%20 = sitofp i64 %19 to float
%21 = call float @llvm.fmuladd.f32(float %17, float %18, float %20)
%22 = fptosi float %21 to i64
%23 = call i32 @sin(i64 %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 float 0.000000e+00
@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 float, float* @M_PI
%6 = fdiv float %5, %1
%7 = fadd float %0, %1
%8 = load i64, i64* @M_PI_2
%9 = sitofp i64 %8 to float
%10 = tail call float @llvm.fmuladd.f32(float %7, float %6, float %9)
%11 = fptosi float %10 to i64
%12 = tail call i32 @sin(i64 %11)
%13 = tail call float @exp(i32 %12)
%14 = fadd float %13, 0xBFD78B5640000000
%15 = fmul float %4, %14
ret float %15
}