#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);
  {
    int s;
    s = x1;
    x1 = y1;
    y1 = s;
  };
  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);
  {
    int s;
    s = x2;
    x2 = y2;
    y2 = s;
  };
  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,-0x2c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x2c(%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>
cvttsd2si -0x18(%rbp),%eax
mov    %eax,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0x30(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
lea    0xdda(%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  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
cvttpd2dq %xmm1,%xmm1
movsd  %xmm0,0x10(%rsp)
cvtdq2pd %xmm1,%xmm1
movlps %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 = alloca i32
%8 = alloca i32
%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
store i32 %17, i32* %7
%18 = load i32, i32* %2
store i32 %18, i32* %1
%19 = load i32, i32* %7
store i32 %19, i32* %2
%20 = load i32, i32* %1
%21 = sitofp i32 %20 to double
%22 = load i32, i32* %2
%23 = sitofp i32 %22 to double
%24 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %21, double %23)
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double* %4, double* %5)
%26 = call i32 @dbl_swap(double* %4, double* %5)
%27 = load double, double* %4
%28 = load double, double* %5
%29 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), double %27, double %28)
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double* %4, double* %5)
%31 = load double, double* %4
%32 = fptosi double %31 to i32
store i32 %32, i32* %8
%33 = load double, double* %5
store double %33, double* %4
%34 = load i32, i32* %8
%35 = sitofp i32 %34 to double
store double %35, double* %5
%36 = load double, double* %4
%37 = load double, double* %5
%38 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), double %36, double %37)
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 = fptosi double %28 to i32
%30 = load double, double* %4
store double %30, double* %3
%31 = sitofp i32 %29 to double
store double %31, double* %4
%32 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), double %30, double %31)
ret i32 0
}