#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 *, float, float);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int a, b;
  float c, d;
  scanf("%d %d", &a, &b);
  scanf("%f %f", &c, &d);
  printf("%d %d\n", a + b, a - b);
  printf("%.1f %.1f\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    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cvtsi2ss %eax,%xmm0
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
cvtsi2ss %eax,%xmm1
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
subss  -0x14(%rbp),%xmm1
lea    0xe7d(%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    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec3(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x14(%rsp),%eax
mov    0x10(%rsp),%ecx
lea    (%rcx,%rax,1),%edx
cvtsi2ss %edx,%xmm0
sub    %ecx,%eax
cvtsi2ss %eax,%xmm1
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm1
movss  0x8(%rsp),%xmm2
movaps %xmm1,%xmm0
addss  %xmm2,%xmm0
subss  %xmm2,%xmm1
lea    0xe80(%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 = [6 x i8] c"%f %f\00"
@.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 i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
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 ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %4, float* %5)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = sitofp i32 %10 to float
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = sub nsw i32 %12, %13
%15 = sitofp i32 %14 to float
%16 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), float %11, float %15)
%17 = load float, float* %4
%18 = load float, float* %5
%19 = fadd float %17, %18
%20 = load float, float* %4
%21 = load float, float* %5
%22 = fsub float %20, %21
%23 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), float %19, float %22)
ret i32 0
}

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