#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*/ sprintf(char *, char *, int, int, int, float, float, float,
                           float, float, float, float, float, float, float,
                           float, float, float, int, int, int);
char *generate_config_string(char *config_string, int bundle_max_size,
                             int bundle_max_iter, double approx_z_opt) {
  int inactive_delay = bundle_max_size;
  int bundle_size = bundle_max_size;
  float t_enlarge_factor = 10;
  float t_reduce_factor = 0.1;
  float serious_step_factor = 0.2;
  float medium_step_factor = 0.3;
  float null_step_factor = 2.9;
  float t_optimal = 50.0;
  float eps_lin = 0.02 / approx_z_opt;
  float t_max = 1e5;
  float t_min = 1e-5;
  float t_init = 0.1;
  float t_strategy_1 = 0.0;
  float t_strategy_2 = 0.0;
  float t_strategy_eps = 0.0;
  int pricing_warmup = 0;
  int pricing_period = 0;
  int pricing_max_age = 0;
  sprintf(config_string,
          "%i\n%i\n%i\n%f\n%f\n%f\n%f\n%f\n%f\n%f\n%f\n%f\n%f\n%f\n%f\n%f\n%"
          "i\n%i\n%i\n",
          bundle_max_iter, inactive_delay, bundle_size, t_enlarge_factor,
          t_reduce_factor, serious_step_factor, medium_step_factor,
          null_step_factor, t_optimal, eps_lin, t_max, t_min, t_init,
          t_strategy_1, t_strategy_2, t_strategy_eps, pricing_warmup,
          pricing_period, pricing_max_age);
  return config_string;
}


x86 assembly (clang, -O0):
<generate_config_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
movss  0xede(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  0xeb5(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  0xec0(%rip),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  0xeaf(%rip),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  0xe9e(%rip),%xmm0
movss  %xmm0,-0x34(%rbp)
movss  0xe8d(%rip),%xmm0
movss  %xmm0,-0x38(%rbp)
movsd  0xe94(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  0xe66(%rip),%xmm0
movss  %xmm0,-0x40(%rbp)
movss  0xe55(%rip),%xmm0
movss  %xmm0,-0x44(%rbp)
movss  0xe44(%rip),%xmm0
movss  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x60(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
movss  -0x24(%rbp),%xmm0
movss  -0x28(%rbp),%xmm1
movss  -0x2c(%rbp),%xmm2
movss  -0x30(%rbp),%xmm3
movss  -0x34(%rbp),%xmm4
movss  -0x38(%rbp),%xmm5
movss  -0x3c(%rbp),%xmm6
movss  -0x40(%rbp),%xmm7
movss  -0x44(%rbp),%xmm12
movss  -0x48(%rbp),%xmm11
movss  -0x4c(%rbp),%xmm10
movss  -0x50(%rbp),%xmm9
movss  -0x54(%rbp),%xmm8
mov    -0x58(%rbp),%r9d
mov    -0x5c(%rbp),%r10d
mov    -0x60(%rbp),%eax
lea    0xdd4(%rip),%rsi
movss  %xmm12,(%rsp)
movss  %xmm11,0x8(%rsp)
movss  %xmm10,0x10(%rsp)
movss  %xmm9,0x18(%rsp)
movss  %xmm8,0x20(%rsp)
mov    %r10d,0x28(%rsp)
mov    %eax,0x30(%rsp)
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generate_config_string>:
push   %rbx
mov    %esi,%ecx
mov    %rdi,%rbx
movsd  0xee2(%rip),%xmm1
divsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm6
sub    $0x8,%rsp
lea    0xef3(%rip),%rsi
movss  0xecf(%rip),%xmm0
movss  0xecb(%rip),%xmm1
movss  0xec7(%rip),%xmm2
movss  0xec3(%rip),%xmm3
movss  0xebf(%rip),%xmm4
movss  0xebb(%rip),%xmm5
movss  0xeb7(%rip),%xmm7
mov    %ecx,%r8d
mov    $0x0,%r9d
push   $0x0
push   $0x0
push   $0x0
push   $0x0
push   $0x0
push   $0x3dcccccd
push   $0x3727c5ac
call   1030 <sprintf@plt>
add    $0x40,%rsp
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [58 x i8] c"%i\0A%i\0A%i\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%i\0A%i\0A%i\0A\00"
define i8* @generate_config_string(i8* %0, i32 %1, i32 %2, double %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
%9 = alloca i32
%10 = alloca i32
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
%19 = alloca float
%20 = alloca float
%21 = alloca float
%22 = alloca float
%23 = alloca float
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store double %3, double* %8
%27 = load i32, i32* %6
store i32 %27, i32* %9
%28 = load i32, i32* %6
store i32 %28, i32* %10
store float 1.000000e+01, float* %11
store float 0x3FB99999A0000000, float* %12
store float 0x3FC99999A0000000, float* %13
store float 0x3FD3333340000000, float* %14
store float 0x4007333340000000, float* %15
store float 5.000000e+01, float* %16
%29 = load double, double* %8
%30 = fdiv double 2.000000e-02, %29
%31 = fptrunc double %30 to float
store float %31, float* %17
store float 1.000000e+05, float* %18
store float 0x3EE4F8B580000000, float* %19
store float 0x3FB99999A0000000, float* %20
store float 0.000000e+00, float* %21
store float 0.000000e+00, float* %22
store float 0.000000e+00, float* %23
store i32 0, i32* %24
store i32 0, i32* %25
store i32 0, i32* %26
%32 = load i8*, i8** %5
%33 = load i32, i32* %7
%34 = load i32, i32* %9
%35 = load i32, i32* %10
%36 = load float, float* %11
%37 = load float, float* %12
%38 = load float, float* %13
%39 = load float, float* %14
%40 = load float, float* %15
%41 = load float, float* %16
%42 = load float, float* %17
%43 = load float, float* %18
%44 = load float, float* %19
%45 = load float, float* %20
%46 = load float, float* %21
%47 = load float, float* %22
%48 = load float, float* %23
%49 = load i32, i32* %24
%50 = load i32, i32* %25
%51 = load i32, i32* %26
%52 = call i32 @sprintf(i8* %32, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i32 %33, i32 %34, i32 %35, float %36, float %37, float %38, float %39, float %40, float %41, float %42, float %43, float %44, float %45, float %46, float %47, float %48, i32 %49, i32 %50, i32 %51)
%53 = load i8*, i8** %5
ret i8* %53
}

LLVM IR (-O2):
@.str = [58 x i8] c"%i\0A%i\0A%i\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%f\0A%i\0A%i\0A%i\0A\00"
define i8* @generate_config_string(i8* returned writeonly %0, i32 %1, i32 %2, double %3) {
%5 = fdiv double 2.000000e-02, %3
%6 = fptrunc double %5 to float
%7 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %1, i32 %1, float 1.000000e+01, float 0x3FB99999A0000000, float 0x3FC99999A0000000, float 0x3FD3333340000000, float 0x4007333340000000, float 5.000000e+01, float %6, float 1.000000e+05, float 0x3EE4F8B580000000, float 0x3FB99999A0000000, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, i32 0, i32 0, i32 0)
ret i8* %0
}