#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*/ dbl_swap(double *, double *);
int /*<<< orphan*/ int_swap(int *, int *);
int /*<<< orphan*/ printf(char *, double, double);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int x1, y1, t1;
  double x2, y2, t2;
  scanf("%d %d", &x1, &y1);
  int_swap(&x1, &y1);
  printf("%d %d\n", x1, y1);
  scanf("%d %d", &x1, &y1);
  {
    t1 = x1;
    x1 = y1;
    y1 = t1;
  };
  printf("%d %d\n", x1, y1);
  scanf("%lf %lf", &x2, &y2);
  dbl_swap(&x2, &y2);
  printf("%lg %lg\n", x2, y2);
  scanf("%lf %lf", &x2, &y2);
  {
    t2 = x2;
    x2 = y2;
    y2 = t2;
  };
  printf("%lg %lg\n", x2, y2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xeb1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <int_swap@plt>
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
lea    0xe78(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
lea    0xe4c(%rip),%rdi
call   1030 <printf@plt>
lea    0xe47(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1050 <dbl_swap@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xe22(%rip),%rdi
call   1030 <printf@plt>
lea    0xe0e(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xdd8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeae(%rip),%r14
lea    0x4(%rsp),%rbx
mov    %rsp,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1060 <int_swap@plt>
cvtsi2sdl 0x4(%rsp),%xmm0
cvtsi2sdl (%rsp),%xmm1
lea    0xe7f(%rip),%r12
mov    %r12,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
mov    %ecx,0x4(%rsp)
mov    %eax,(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mov    %r12,%rdi
call   1030 <printf@plt>
lea    0xe43(%rip),%r14
lea    0x10(%rsp),%rbx
lea    0x8(%rsp),%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <dbl_swap@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
lea    0xe13(%rip),%r12
mov    %r12,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
mov    %r12,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
@.str.2 = [8 x i8] c"%lf %lf\00"
@.str.3 = [9 x i8] c"%lg %lg\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%8 = call i32 @int_swap(i32* %1, i32* %2)
%9 = load i32, i32* %1
%10 = sitofp i32 %9 to double
%11 = load i32, i32* %2
%12 = sitofp i32 %11 to double
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %10, double %12)
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%15 = load i32, i32* %1
store i32 %15, i32* %3
%16 = load i32, i32* %2
store i32 %16, i32* %1
%17 = load i32, i32* %3
store i32 %17, i32* %2
%18 = load i32, i32* %1
%19 = sitofp i32 %18 to double
%20 = load i32, i32* %2
%21 = sitofp i32 %20 to double
%22 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %19, double %21)
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double* %4, double* %5)
%24 = call i32 @dbl_swap(double* %4, double* %5)
%25 = load double, double* %4
%26 = load double, double* %5
%27 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), double %25, double %26)
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double* %4, double* %5)
%29 = load double, double* %4
store double %29, double* %6
%30 = load double, double* %5
store double %30, double* %4
%31 = load double, double* %6
store double %31, double* %5
%32 = load double, double* %4
%33 = load double, double* %5
%34 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), double %32, double %33)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [7 x i8] c"%d %d\0A\00"
@.str.2 = [8 x i8] c"%lf %lf\00"
@.str.3 = [9 x i8] c"%lg %lg\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 = bitcast double* %3 to i8*
%8 = bitcast double* %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 @int_swap(i32* %1, i32* %2)
%11 = load i32, i32* %1
%12 = sitofp i32 %11 to double
%13 = load i32, i32* %2
%14 = sitofp i32 %13 to double
%15 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %12, double %14)
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%17 = load i32, i32* %1
%18 = load i32, i32* %2
store i32 %18, i32* %1
store i32 %17, i32* %2
%19 = sitofp i32 %18 to double
%20 = sitofp i32 %17 to double
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %19, double %20)
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double* %3, double* %4)
%23 = call i32 @dbl_swap(double* %3, double* %4)
%24 = load double, double* %3
%25 = load double, double* %4
%26 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), double %24, double %25)
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double* %3, double* %4)
%28 = load double, double* %3
%29 = load double, double* %4
store double %29, double* %3
store double %28, double* %4
%30 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), double %29, double %28)
ret i32 0
}