#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 *, int, double);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int a, c;
  double b, d;
  scanf("%d", &a);
  scanf("%lf", &b);
  c = a > 0 ? a : 0 - a;
  d = b > 0 ? b : 0 - b;
  printf("%d\n%g", c, d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xebb(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jle    1168 <main+0x48>
mov    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1170 <main+0x50>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0xc(%rbp)
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1197 <main+0x77>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    11a4 <main+0x84>
xorps  %xmm0,%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0xc(%rbp),%esi
movsd  -0x20(%rbp),%xmm0
lea    0xe4a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    %eax,%esi
neg    %esi
cmovs  %eax,%esi
movsd  0x10(%rsp),%xmm0
andps  0xe9e(%rip),%xmm0
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [6 x i8] c"%d\0A%g\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = bitcast i32* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%7 = load i32, i32* %1
%8 = call i32 @llvm.abs.i32(i32 %7, i1 true)
%9 = load double, double* %2
%10 = call double @llvm.fabs.f64(double %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %8, double %10)
ret i32 0
}