#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*/ fprintf(int /*<<< orphan*/, char *, float, float);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main() {
  signed short int aa = 0;
  signed short int bb = 0;
  float xx = 0.0f;
  float yy = 0.0f;
  fscanf(stdin, "%d %d", &aa, &bb);
  fscanf(stdin, "%f %f", &xx, &yy);
  fprintf(stdout, "%d %d\n", aa + bb, aa - bb);
  fprintf(stdout, "%.1f %.1f\n", xx + yy, xx - yy);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0x0,-0x6(%rbp)
movw   $0x0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
lea    -0x6(%rbp),%rdx
lea    -0x8(%rbp),%rcx
mov    $0x0,%al
call   1030 <fscanf@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
lea    0xe8c(%rip),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
mov    $0x0,%al
call   1030 <fscanf@plt>
mov    0x2e48(%rip),%rax
mov    (%rax),%edi
movswl -0x6(%rbp),%eax
movswl -0x8(%rbp),%ecx
add    %ecx,%eax
cvtsi2ss %eax,%xmm0
movswl -0x6(%rbp),%eax
movswl -0x8(%rbp),%ecx
sub    %ecx,%eax
cvtsi2ss %eax,%xmm1
lea    0xe57(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e17(%rip),%rax
mov    (%rax),%edi
movss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
subss  -0x10(%rbp),%xmm1
lea    0xe35(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movw   $0x0,0x6(%rsp)
movw   $0x0,0x4(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
mov    0x2e9e(%rip),%rbx
mov    (%rbx),%edi
lea    0xead(%rip),%rsi
lea    0x6(%rsp),%rdx
lea    0x4(%rsp),%rcx
xor    %eax,%eax
call   1030 <fscanf@plt>
mov    (%rbx),%edi
lea    0xe99(%rip),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
xor    %eax,%eax
call   1030 <fscanf@plt>
mov    0x2e53(%rip),%rbx
mov    (%rbx),%edi
movswl 0x6(%rsp),%eax
movswl 0x4(%rsp),%ecx
lea    (%rcx,%rax,1),%edx
cvtsi2ss %edx,%xmm0
sub    %ecx,%eax
cvtsi2ss %eax,%xmm1
lea    0xe67(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
movss  0xc(%rsp),%xmm1
movss  0x8(%rsp),%xmm2
movaps %xmm1,%xmm0
addss  %xmm2,%xmm0
subss  %xmm2,%xmm1
lea    0xe49(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [6 x i8] c"%f %f\00"
@stdout = global i32 0
@.str.2 = [7 x i8] c"%d %d\0A\00"
@.str.3 = [11 x i8] c"%.1f %.1f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i16
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
store i16 0, i16* %2
store i16 0, i16* %3
store float 0.000000e+00, float* %4
store float 0.000000e+00, float* %5
%6 = load i32, i32* @stdin
%7 = call i32 (i32, i8*, ...) @fscanf(i32 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i16* %2, i16* %3)
%8 = load i32, i32* @stdin
%9 = call i32 (i32, i8*, ...) @fscanf(i32 %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %4, float* %5)
%10 = load i32, i32* @stdout
%11 = load i16, i16* %2
%12 = sext i16 %11 to i32
%13 = load i16, i16* %3
%14 = sext i16 %13 to i32
%15 = add nsw i32 %12, %14
%16 = sitofp i32 %15 to float
%17 = load i16, i16* %2
%18 = sext i16 %17 to i32
%19 = load i16, i16* %3
%20 = sext i16 %19 to i32
%21 = sub nsw i32 %18, %20
%22 = sitofp i32 %21 to float
%23 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), float %16, float %22)
%24 = load i32, i32* @stdout
%25 = load float, float* %4
%26 = load float, float* %5
%27 = fadd float %25, %26
%28 = load float, float* %4
%29 = load float, float* %5
%30 = fsub float %28, %29
%31 = call i32 @fprintf(i32 %24, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), float %27, float %30)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [6 x i8] c"%f %f\00"
@stdout = global i32 0
@.str.2 = [7 x i8] c"%d %d\0A\00"
@.str.3 = [11 x i8] c"%.1f %.1f\0A\00"
define i32 @main() {
%1 = alloca i16
%2 = alloca i16
%3 = alloca float
%4 = alloca float
%5 = bitcast i16* %1 to i8*
store i16 0, i16* %1
%6 = bitcast i16* %2 to i8*
store i16 0, i16* %2
%7 = bitcast float* %3 to i8*
store float 0.000000e+00, float* %3
%8 = bitcast float* %4 to i8*
store float 0.000000e+00, float* %4
%9 = load i32, i32* @stdin
%10 = call i32 (i32, i8*, ...) @fscanf(i32 %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i16* %1, i16* %2)
%11 = load i32, i32* @stdin
%12 = call i32 (i32, i8*, ...) @fscanf(i32 %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %3, float* %4)
%13 = load i32, i32* @stdout
%14 = load i16, i16* %1
%15 = sext i16 %14 to i32
%16 = load i16, i16* %2
%17 = sext i16 %16 to i32
%18 = add nsw i32 %17, %15
%19 = sitofp i32 %18 to float
%20 = sub nsw i32 %15, %17
%21 = sitofp i32 %20 to float
%22 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), float %19, float %21)
%23 = load i32, i32* @stdout
%24 = load float, float* %3
%25 = load float, float* %4
%26 = fadd float %24, %25
%27 = fsub float %24, %25
%28 = call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), float %26, float %27)
ret i32 0
}