#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*/ 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 < 1.0e-10)
      x = 1.0e-10;
    if (y < 1.0e-10)
      y = 1.0e-10;
    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    0xec2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    11d3 <main+0xa3>
movsd  0xe9c(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    117c <main+0x4c>
movsd  0xe89(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe7c(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    119c <main+0x6c>
movsd  0xe69(%rip),%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    0xe46(%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    0xec3(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
cmp    $0x2,%eax
jne    11f9 <main+0xc9>
movsd  0xe9b(%rip),%xmm1
movabs $0x3ddb7cdfd9d7bdbb,%r13
7c db 3d
lea    0xe99(%rip),%r14
lea    0xe8b(%rip),%r15
lea    0x10(%rsp),%r12
lea    0x8(%rsp),%rbx
jmp    11d5 <main+0xa5>
nopl   0x0(%rax)
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
movsd  0xe2d(%rip),%xmm1
jne    11f9 <main+0xc9>
movsd  0x10(%rsp),%xmm0
ucomisd %xmm0,%xmm1
jbe    11ea <main+0xba>
mov    %r13,0x10(%rsp)
movapd %xmm1,%xmm0
ucomisd 0x8(%rsp),%xmm1
jbe    1190 <main+0x60>
mov    %r13,0x8(%rsp)
jmp    1190 <main+0x60>
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"
@.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 = %15, %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 %23
7: ; preds = %4
%8 = load double, double* %2
%9 = fcmp olt double %8, 1.000000e-10
br i1 %9, label %10, label %11
10: ; preds = %7
store double 1.000000e-10, double* %2
br label %11
11: ; preds = %10, %7
%12 = load double, double* %3
%13 = fcmp olt double %12, 1.000000e-10
br i1 %13, label %14, label %15
14: ; preds = %11
store double 1.000000e-10, double* %3
br label %15
15: ; preds = %14, %11
%16 = load double, double* %2
%17 = call i32 @log10(double %16)
%18 = load double, double* %3
%19 = call i32 @log10(double %18)
%20 = load double, double* %2
%21 = load double, double* %3
%22 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32 %19, double %20, double %21)
br label %4
23: ; preds = %4
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@.str = [7 x i8] c"%lf%lf\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 %25
7: ; preds = %0, %16
%8 = load double, double* %1
%9 = fcmp olt double %8, 1.000000e-10
br i1 %9, label %10, label %11
10: ; preds = %7
store double 1.000000e-10, double* %1
br label %11
11: ; preds = %10, %7
%12 = phi double [ 1.000000e-10, %10 ], [ %8, %7 ]
%13 = load double, double* %2
%14 = fcmp olt double %13, 1.000000e-10
br i1 %14, label %15, label %16
15: ; preds = %11
store double 1.000000e-10, double* %2
br label %16
16: ; preds = %15, %11
%17 = call i32 @log10(double %12)
%18 = load double, double* %2
%19 = call i32 @log10(double %18)
%20 = load double, double* %1
%21 = load double, double* %2
%22 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32 %19, double %20, double %21)
%23 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%24 = icmp eq i32 %23, 2
br i1 %24, label %7, label %25
25: ; preds = %16, %0
ret i32 0
}