#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*/ printf(char *, ...);
test_4() {
  float ans, ans1, ans2;
  ans = 1.0;
  ans1 = 0.3010;
  ans2 = -1.0;
  printf("These test only pass if the output matches:\nCorrect output is\n1.0 "
         "= 1.000000E+00, 0.3010 = 3.000000E-01, -1.0 = -1.000000E+0\n");
  printf("1.0 = %E, 0.3010 = %E, -1.0 = %E\n", 1.0, 0.3010, -1.0);
  printf("These test only pass if the outut matches:\nCorrect output is\nans = "
         "1.000000E+00, ans1 = 3.010000E-01, ans2 = -1.000000E+00\n");
  printf("ans = %E, ans1 = %E, ans2 = %E\n", ans, ans1, ans2);
}


x86 assembly (clang, -O0):
<test_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xf00(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeef(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xede(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf4e(%rip),%rdi
movsd  0xea4(%rip),%xmm0
movsd  0xea4(%rip),%xmm1
movsd  0xea4(%rip),%xmm2
mov    $0x3,%al
call   1030 <printf@plt>
lea    0xf4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x10(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xf9d(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_4>:
push   %rax
lea    0xf3a(%rip),%rdi
call   1030 <puts@plt>
lea    0xeec(%rip),%rdi
movsd  0xec4(%rip),%xmm0
movsd  0xec4(%rip),%xmm1
movsd  0xec4(%rip),%xmm2
mov    $0x3,%al
call   1040 <printf@plt>
lea    0xf85(%rip),%rdi
call   1030 <puts@plt>
lea    0xedc(%rip),%rdi
movsd  0xeaa(%rip),%xmm1
movsd  0xe8a(%rip),%xmm0
movsd  0xe92(%rip),%xmm2
mov    $0x3,%al
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [126 x i8] c"These test only pass if the output matches:\0ACorrect output is\0A1.0 = 1.000000E+00, 0.3010 = 3.000000E-01, -1.0 = -1.000000E+0\0A\00"
@.str.1 = [34 x i8] c"1.0 = %E, 0.3010 = %E, -1.0 = %E\0A\00"
@.str.2 = [124 x i8] c"These test only pass if the outut matches:\0ACorrect output is\0Aans = 1.000000E+00, ans1 = 3.010000E-01, ans2 = -1.000000E+00\0A\00"
@.str.3 = [32 x i8] c"ans = %E, ans1 = %E, ans2 = %E\0A\00"
define i32 @test_4() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float 1.000000e+00, float* %2
store float 0x3FD3439580000000, float* %3
store float -1.000000e+00, float* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([126 x i8], [126 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+00, double 3.010000e-01, double -1.000000e+00)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.2, i64 0, i64 0))
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = load float, float* %3
%11 = fpext float %10 to double
%12 = load float, float* %4
%13 = fpext float %12 to double
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), double %9, double %11, double %13)
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str.1 = [34 x i8] c"1.0 = %E, 0.3010 = %E, -1.0 = %E\0A\00"
@.str.3 = [32 x i8] c"ans = %E, ans1 = %E, ans2 = %E\0A\00"
@str = [125 x i8] c"These test only pass if the output matches:\0ACorrect output is\0A1.0 = 1.000000E+00, 0.3010 = 3.000000E-01, -1.0 = -1.000000E+0\00"
@str.4 = [123 x i8] c"These test only pass if the outut matches:\0ACorrect output is\0Aans = 1.000000E+00, ans1 = 3.010000E-01, ans2 = -1.000000E+00\00"
define i32 @test_4() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([125 x i8], [125 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+00, double 3.010000e-01, double -1.000000e+00)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([123 x i8], [123 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), double 1.000000e+00, double 0x3FD3439580000000, double -1.000000e+00)
ret i32 undef
}