#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 */
double DBL_MIN;
int /*<<< orphan*/ log10(double);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int /*<<< orphan*/,
                          double, double);
int scanf(char *, double *, double *);
main() {
  double x, y;
  while (scanf("%lf%lf", &x, &y) == 2) {
    if (x < DBL_MIN)
      x = DBL_MIN;
    if (y < DBL_MIN)
      y = DBL_MIN;
    printf("%lf %lf %lf %lf\n", log10(x), log10(y), x, y);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    11e7 <main+0xb7>
movsd  -0x10(%rbp),%xmm1
mov    0x2e78(%rip),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1186 <main+0x56>
mov    0x2e63(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm1
mov    0x2e4e(%rip),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    11b0 <main+0x80>
mov    0x2e39(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <log10@plt>
mov    %eax,-0x1c(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1050 <log10@plt>
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe2a(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebb(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    11e9 <main+0xb9>
mov    0x2e7c(%rip),%r13
lea    0xe9c(%rip),%r14
lea    0xe8e(%rip),%r15
lea    0x10(%rsp),%r12
lea    0x8(%rsp),%rbx
jmp    11bd <main+0x8d>
xchg   %ax,%ax
call   1050 <log10@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
call   1050 <log10@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    11e9 <main+0xb9>
movsd  0x10(%rsp),%xmm0
movsd  0x0(%r13),%xmm1
ucomisd %xmm0,%xmm1
jbe    11d9 <main+0xa9>
movsd  %xmm1,0x10(%rsp)
movapd %xmm1,%xmm0
ucomisd 0x8(%rsp),%xmm1
jbe    1180 <main+0x50>
movsd  %xmm1,0x8(%rsp)
jmp    1180 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%lf%lf\00"
@DBL_MIN = global double 0.000000e+00
@.str.1 = [17 x i8] c"%lf %lf %lf %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
br label %4
4: ; preds = %19, %0
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %27
7: ; preds = %4
%8 = load double, double* %2
%9 = load double, double* @DBL_MIN
%10 = fcmp olt double %8, %9
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = load double, double* @DBL_MIN
store double %12, double* %2
br label %13
13: ; preds = %11, %7
%14 = load double, double* %3
%15 = load double, double* @DBL_MIN
%16 = fcmp olt double %14, %15
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load double, double* @DBL_MIN
store double %18, double* %3
br label %19
19: ; preds = %17, %13
%20 = load double, double* %2
%21 = call i32 @log10(double %20)
%22 = load double, double* %3
%23 = call i32 @log10(double %22)
%24 = load double, double* %2
%25 = load double, double* %3
%26 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %21, i32 %23, double %24, double %25)
br label %4
27: ; preds = %4
%28 = load i32, i32* %1
ret i32 %28
}

LLVM IR (-O2):
@.str = [7 x i8] c"%lf%lf\00"
@DBL_MIN = global double 0.000000e+00
@.str.1 = [17 x i8] c"%lf %lf %lf %lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %26
7: ; preds = %0, %17
%8 = load double, double* %1
%9 = load double, double* @DBL_MIN
%10 = fcmp olt double %8, %9
br i1 %10, label %11, label %12
11: ; preds = %7
store double %9, double* %1
br label %12
12: ; preds = %11, %7
%13 = phi double [ %9, %11 ], [ %8, %7 ]
%14 = load double, double* %2
%15 = fcmp olt double %14, %9
br i1 %15, label %16, label %17
16: ; preds = %12
store double %9, double* %2
br label %17
17: ; preds = %16, %12
%18 = call i32 @log10(double %13)
%19 = load double, double* %2
%20 = call i32 @log10(double %19)
%21 = load double, double* %1
%22 = load double, double* %2
%23 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %18, i32 %20, double %21, double %22)
%24 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%25 = icmp eq i32 %24, 2
br i1 %25, label %7, label %26
26: ; preds = %17, %0
ret i32 0
}