#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
float expf(float const);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *, float,
                           float, float, float, float, float, float);
float logit_1_clamped(float const, float, int);
void print_params(const float params[], const char *prefix, FILE *ofs) {
  float l_viga, p_0, p_1, p_2, lambda, size, size2;
  l_viga = logit_1_clamped(params[0], (1.0f / 8192), 0.25f);
  p_0 = logit_1_clamped(params[1], (1.0f / 8192), 1 - (1.0f / 8192));
  p_1 = logit_1_clamped(params[2], (1.0f / 8192), 1 - (1.0f / 8192));
  p_2 = logit_1_clamped(params[3], (1.0f / 8192), 1 - (1.0f / 8192));
  lambda = expf(params[4]);
  size = params[5];
  size2 = -expf(params[6]);
  fprintf(ofs, "%s %g %g %g %g %g %g %g\n", prefix, l_viga, p_0, p_1, p_2,
          lambda, size, size2);
}


x86 assembly (clang, -O0):
<print_params>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  0xeac(%rip),%xmm1
xor    %edi,%edi
call   1050 <logit_1_clamped@plt>
movss  %xmm0,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  0xe8f(%rip),%xmm1
xor    %edi,%edi
call   1050 <logit_1_clamped@plt>
movss  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  0xe72(%rip),%xmm1
xor    %edi,%edi
call   1050 <logit_1_clamped@plt>
movss  %xmm0,-0x24(%rbp)
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  0xe55(%rip),%xmm1
xor    %edi,%edi
call   1050 <logit_1_clamped@plt>
movss  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movss  0x10(%rax),%xmm0
call   1030 <expf@plt>
movss  %xmm0,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
movss  0x14(%rax),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movss  0x18(%rax),%xmm0
call   1030 <expf@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
movss  -0x1c(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
movss  -0x24(%rbp),%xmm2
movss  -0x28(%rbp),%xmm3
movss  -0x2c(%rbp),%xmm4
movss  -0x30(%rbp),%xmm5
movss  -0x34(%rbp),%xmm6
lea    0xdda(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_params>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
movss  (%rdi),%xmm0
movss  0xeb2(%rip),%xmm1
xor    %edi,%edi
call   1050 <logit_1_clamped@plt>
movss  %xmm0,0x1c(%rsp)
movss  0x4(%rbx),%xmm0
movss  0xe98(%rip),%xmm1
xor    %edi,%edi
call   1050 <logit_1_clamped@plt>
movss  %xmm0,0x18(%rsp)
movss  0x8(%rbx),%xmm0
movss  0xe7e(%rip),%xmm1
xor    %edi,%edi
call   1050 <logit_1_clamped@plt>
movss  %xmm0,0x14(%rsp)
movss  0xc(%rbx),%xmm0
movss  0xe64(%rip),%xmm1
xor    %edi,%edi
call   1050 <logit_1_clamped@plt>
movss  %xmm0,0x10(%rsp)
movss  0x10(%rbx),%xmm0
call   1030 <expf@plt>
movss  %xmm0,0xc(%rsp)
movss  0x14(%rbx),%xmm0
movss  %xmm0,0x8(%rsp)
movss  0x18(%rbx),%xmm0
call   1030 <expf@plt>
movaps %xmm0,%xmm6
xorps  0xe38(%rip),%xmm6
lea    0xe41(%rip),%rsi
mov    %r15,%rdi
mov    %r14,%rdx
movss  0x1c(%rsp),%xmm0
movss  0x18(%rsp),%xmm1
movss  0x14(%rsp),%xmm2
movss  0x10(%rsp),%xmm3
movss  0xc(%rsp),%xmm4
movss  0x8(%rsp),%xmm5
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"%s %g %g %g %g %g %g %g\0A\00"
define void @print_params(float* %0, i8* %1, i32* %2) {
%4 = alloca float*
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
store float* %0, float** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
%16 = load float, float* %15
%17 = call float @logit_1_clamped(float %16, float 0x3F20000000000000, i32 0)
store float %17, float* %7
%18 = load float*, float** %4
%19 = getelementptr inbounds float, float* %18, i64 1
%20 = load float, float* %19
%21 = call float @logit_1_clamped(float %20, float 0x3F20000000000000, i32 0)
store float %21, float* %8
%22 = load float*, float** %4
%23 = getelementptr inbounds float, float* %22, i64 2
%24 = load float, float* %23
%25 = call float @logit_1_clamped(float %24, float 0x3F20000000000000, i32 0)
store float %25, float* %9
%26 = load float*, float** %4
%27 = getelementptr inbounds float, float* %26, i64 3
%28 = load float, float* %27
%29 = call float @logit_1_clamped(float %28, float 0x3F20000000000000, i32 0)
store float %29, float* %10
%30 = load float*, float** %4
%31 = getelementptr inbounds float, float* %30, i64 4
%32 = load float, float* %31
%33 = call float @expf(float %32)
store float %33, float* %11
%34 = load float*, float** %4
%35 = getelementptr inbounds float, float* %34, i64 5
%36 = load float, float* %35
store float %36, float* %12
%37 = load float*, float** %4
%38 = getelementptr inbounds float, float* %37, i64 6
%39 = load float, float* %38
%40 = call float @expf(float %39)
%41 = fneg float %40
store float %41, float* %13
%42 = load i32*, i32** %6
%43 = load i8*, i8** %5
%44 = load float, float* %7
%45 = load float, float* %8
%46 = load float, float* %9
%47 = load float, float* %10
%48 = load float, float* %11
%49 = load float, float* %12
%50 = load float, float* %13
%51 = call i32 @fprintf(i32* %42, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %43, float %44, float %45, float %46, float %47, float %48, float %49, float %50)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"%s %g %g %g %g %g %g %g\0A\00"
define void @print_params(float* nocapture %0, i8* %1, i32* nocapture %2) {
%4 = load float, float* %0
%5 = tail call float @logit_1_clamped(float %4, float 0x3F20000000000000, i32 0)
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = tail call float @logit_1_clamped(float %7, float 0x3F20000000000000, i32 0)
%9 = getelementptr inbounds float, float* %0, i64 2
%10 = load float, float* %9
%11 = tail call float @logit_1_clamped(float %10, float 0x3F20000000000000, i32 0)
%12 = getelementptr inbounds float, float* %0, i64 3
%13 = load float, float* %12
%14 = tail call float @logit_1_clamped(float %13, float 0x3F20000000000000, i32 0)
%15 = getelementptr inbounds float, float* %0, i64 4
%16 = load float, float* %15
%17 = tail call float @expf(float %16)
%18 = getelementptr inbounds float, float* %0, i64 5
%19 = load float, float* %18
%20 = getelementptr inbounds float, float* %0, i64 6
%21 = load float, float* %20
%22 = tail call float @expf(float %21)
%23 = fneg float %22
%24 = tail call i32 @fprintf(i32* %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %1, float %5, float %8, float %11, float %14, float %17, float %19, float %23)
ret void
}