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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
cvtsi2sd %eax,%xmm1
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
lea    (%rcx,%rax,1),%edx
cvtsi2sd %edx,%xmm0
sub    %ecx,%eax
cvtsi2sd %eax,%xmm1
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movapd %xmm1,%xmm0
addsd  %xmm2,%xmm0
subsd  %xmm2,%xmm1
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [8 x i8] c"%lf %lf\00"
@.str.2 = [7 x i8] c"%d %d\0A\00"
@.str.3 = [15 x i8] c"%0.1lf %0.1lf\0A\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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %4, double* %5)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = sitofp i32 %10 to double
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = sub nsw i32 %12, %13
%15 = sitofp i32 %14 to double
%16 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %11, double %15)
%17 = load double, double* %4
%18 = load double, double* %5
%19 = fadd double %17, %18
%20 = load double, double* %4
%21 = load double, double* %5
%22 = fsub double %20, %21
%23 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %19, double %22)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [8 x i8] c"%lf %lf\00"
@.str.2 = [7 x i8] c"%d %d\0A\00"
@.str.3 = [15 x i8] c"%0.1lf %0.1lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%8 = bitcast double* %3 to i8*
%9 = bitcast double* %4 to i8*
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double* %3, double* %4)
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = add nsw i32 %12, %11
%14 = sitofp i32 %13 to double
%15 = sub nsw i32 %11, %12
%16 = sitofp i32 %15 to double
%17 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %14, double %16)
%18 = load double, double* %3
%19 = load double, double* %4
%20 = fadd double %18, %19
%21 = fsub double %18, %19
%22 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), double %20, double %21)
ret i32 0
}