#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 */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void output_parameter(FILE *fp, char *inputfile, double epsinv, double tend) {
  fprintf(fp, "initial: %s\n", inputfile);
  if (epsinv == 0.0)
    fprintf(fp, "eps: %e\n", 0.0);
  else
    fprintf(fp, "eps: %e\n", 1.0 / epsinv);
  fprintf(fp, "tend: %.f\n", tend);
  fprintf(fp, "\n");
  return;
}


x86 assembly (clang, -O0):
<output_parameter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xecf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1172 <output_parameter+0x62>
jp     1172 <output_parameter+0x62>
mov    -0x8(%rbp),%rdi
lea    0xeb2(%rip),%rsi
xorps  %xmm0,%xmm0
mov    $0x1,%al
call   1030 <fprintf@plt>
jmp    1191 <output_parameter+0x81>
mov    -0x8(%rbp),%rdi
movsd  0xe82(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
lea    0xe8b(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
movsd  -0x20(%rbp),%xmm0
lea    0xe7d(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe69(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_parameter>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xecb(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
movsd  (%rsp),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    1155 <output_parameter+0x35>
jnp    1161 <output_parameter+0x41>
movsd  0xea3(%rip),%xmm0
divsd  %xmm1,%xmm0
lea    0xead(%rip),%rsi
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <fprintf@plt>
lea    0xea5(%rip),%rsi
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
mov    $0x1,%al
call   1040 <fprintf@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <fputc@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"initial: %s\0A\00"
@.str.1 = [9 x i8] c"eps: %e\0A\00"
@.str.2 = [11 x i8] c"tend: %.f\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @output_parameter(i32* %0, i8* %1, double %2, double %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca double
%8 = alloca double
store i32* %0, i32** %5
store i8* %1, i8** %6
store double %2, double* %7
store double %3, double* %8
%9 = load i32*, i32** %5
%10 = load i8*, i8** %6
%11 = call i32 (i32*, i8*, ...) @fprintf(i32* %9, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load double, double* %7
%13 = fcmp oeq double %12, 0.000000e+00
br i1 %13, label %14, label %17
14: ; preds = %4
%15 = load i32*, i32** %5
%16 = call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double 0.000000e+00)
br label %22
17: ; preds = %4
%18 = load i32*, i32** %5
%19 = load double, double* %7
%20 = fdiv double 1.000000e+00, %19
%21 = call i32 (i32*, i8*, ...) @fprintf(i32* %18, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %20)
br label %22
22: ; preds = %17, %14
%23 = load i32*, i32** %5
%24 = load double, double* %8
%25 = call i32 (i32*, i8*, ...) @fprintf(i32* %23, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double %24)
%26 = load i32*, i32** %5
%27 = call i32 (i32*, i8*, ...) @fprintf(i32* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"initial: %s\0A\00"
@.str.1 = [9 x i8] c"eps: %e\0A\00"
@.str.2 = [11 x i8] c"tend: %.f\0A\00"
define void @output_parameter(i32* nocapture %0, i8* %1, double %2, double %3) {
%5 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = fcmp oeq double %2, 0.000000e+00
%7 = fdiv double 1.000000e+00, %2
%8 = select i1 %6, double 0.000000e+00, double %7
%9 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %8)
%10 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), double %3)
%11 = tail call i32 @fputc(i32 10, i32* %0)
ret void
}