#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*/ scanf(char *, int *, int *);
int main() {
  typedef struct point {
    int x;
    int y;
  } Point;
  struct rect {
    Point leftbot;
    Point lefttop;
    Point rightbot;
    Point righttop;
  };
  struct rect r, s;
  scanf("%d %d", &r.lefttop.x, &r.lefttop.y);
  scanf("%d %d", &r.rightbot.x, &r.rightbot.y);
  scanf("%d %d", &s.lefttop.x, &s.lefttop.y);
  scanf("%d %d", &s.rightbot.x, &s.rightbot.y);
  r.leftbot.y = r.rightbot.y;
  r.leftbot.x = r.lefttop.x;
  r.righttop.x = r.rightbot.x;
  r.righttop.y = r.lefttop.y;
  s.leftbot.y = s.rightbot.y;
  s.leftbot.x = s.lefttop.x;
  s.righttop.x = s.rightbot.x;
  s.righttop.y = s.lefttop.y;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x28(%rbp),%rsi
add    $0x8,%rsi
lea    -0x28(%rbp),%rdx
add    $0x8,%rdx
add    $0x4,%rdx
lea    0xec6(%rip),%rdi
call   1030 <scanf@plt>
lea    -0x28(%rbp),%rsi
add    $0x10,%rsi
lea    -0x28(%rbp),%rdx
add    $0x10,%rdx
add    $0x4,%rdx
lea    0xea6(%rip),%rdi
call   1030 <scanf@plt>
lea    -0x48(%rbp),%rsi
add    $0x8,%rsi
lea    -0x48(%rbp),%rdx
add    $0x8,%rdx
add    $0x4,%rdx
lea    0xe86(%rip),%rdi
call   1030 <scanf@plt>
lea    -0x48(%rbp),%rsi
add    $0x10,%rsi
lea    -0x48(%rbp),%rdx
add    $0x10,%rdx
add    $0x4,%rdx
lea    0xe66(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
lea    0x28(%rsp),%rsi
lea    0x2c(%rsp),%rdx
lea    0xeda(%rip),%rbx
mov    %rbx,%rdi
call   1030 <scanf@plt>
lea    0x30(%rsp),%rsi
lea    0x34(%rsp),%rdx
mov    %rbx,%rdi
call   1030 <scanf@plt>
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
call   1030 <scanf@plt>
lea    0x10(%rsp),%rsi
lea    0x14(%rsp),%rdx
mov    %rbx,%rdi
call   1030 <scanf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.rect = type { %struct.point, %struct.point, %struct.point, %struct.point }
%struct.point = type { i32, i32 }
@.str = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.rect
%3 = alloca %struct.rect
store i32 0, i32* %1
%4 = getelementptr inbounds %struct.rect, %struct.rect* %2, i32 0, i32 1
%5 = getelementptr inbounds %struct.point, %struct.point* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.rect, %struct.rect* %2, i32 0, i32 1
%7 = getelementptr inbounds %struct.point, %struct.point* %6, i32 0, i32 1
%8 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %5, i32* %7)
%9 = getelementptr inbounds %struct.rect, %struct.rect* %2, i32 0, i32 2
%10 = getelementptr inbounds %struct.point, %struct.point* %9, i32 0, i32 0
%11 = getelementptr inbounds %struct.rect, %struct.rect* %2, i32 0, i32 2
%12 = getelementptr inbounds %struct.point, %struct.point* %11, i32 0, i32 1
%13 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %10, i32* %12)
%14 = getelementptr inbounds %struct.rect, %struct.rect* %3, i32 0, i32 1
%15 = getelementptr inbounds %struct.point, %struct.point* %14, i32 0, i32 0
%16 = getelementptr inbounds %struct.rect, %struct.rect* %3, i32 0, i32 1
%17 = getelementptr inbounds %struct.point, %struct.point* %16, i32 0, i32 1
%18 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %15, i32* %17)
%19 = getelementptr inbounds %struct.rect, %struct.rect* %3, i32 0, i32 2
%20 = getelementptr inbounds %struct.point, %struct.point* %19, i32 0, i32 0
%21 = getelementptr inbounds %struct.rect, %struct.rect* %3, i32 0, i32 2
%22 = getelementptr inbounds %struct.point, %struct.point* %21, i32 0, i32 1
%23 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %20, i32* %22)
%24 = getelementptr inbounds %struct.rect, %struct.rect* %2, i32 0, i32 2
%25 = getelementptr inbounds %struct.point, %struct.point* %24, i32 0, i32 1
%26 = load i32, i32* %25
%27 = getelementptr inbounds %struct.rect, %struct.rect* %2, i32 0, i32 0
%28 = getelementptr inbounds %struct.point, %struct.point* %27, i32 0, i32 1
store i32 %26, i32* %28
%29 = getelementptr inbounds %struct.rect, %struct.rect* %2, i32 0, i32 1
%30 = getelementptr inbounds %struct.point, %struct.point* %29, i32 0, i32 0
%31 = load i32, i32* %30
%32 = getelementptr inbounds %struct.rect, %struct.rect* %2, i32 0, i32 0
%33 = getelementptr inbounds %struct.point, %struct.point* %32, i32 0, i32 0
store i32 %31, i32* %33
%34 = getelementptr inbounds %struct.rect, %struct.rect* %2, i32 0, i32 2
%35 = getelementptr inbounds %struct.point, %struct.point* %34, i32 0, i32 0
%36 = load i32, i32* %35
%37 = getelementptr inbounds %struct.rect, %struct.rect* %2, i32 0, i32 3
%38 = getelementptr inbounds %struct.point, %struct.point* %37, i32 0, i32 0
store i32 %36, i32* %38
%39 = getelementptr inbounds %struct.rect, %struct.rect* %2, i32 0, i32 1
%40 = getelementptr inbounds %struct.point, %struct.point* %39, i32 0, i32 1
%41 = load i32, i32* %40
%42 = getelementptr inbounds %struct.rect, %struct.rect* %2, i32 0, i32 3
%43 = getelementptr inbounds %struct.point, %struct.point* %42, i32 0, i32 1
store i32 %41, i32* %43
%44 = getelementptr inbounds %struct.rect, %struct.rect* %3, i32 0, i32 2
%45 = getelementptr inbounds %struct.point, %struct.point* %44, i32 0, i32 1
%46 = load i32, i32* %45
%47 = getelementptr inbounds %struct.rect, %struct.rect* %3, i32 0, i32 0
%48 = getelementptr inbounds %struct.point, %struct.point* %47, i32 0, i32 1
store i32 %46, i32* %48
%49 = getelementptr inbounds %struct.rect, %struct.rect* %3, i32 0, i32 1
%50 = getelementptr inbounds %struct.point, %struct.point* %49, i32 0, i32 0
%51 = load i32, i32* %50
%52 = getelementptr inbounds %struct.rect, %struct.rect* %3, i32 0, i32 0
%53 = getelementptr inbounds %struct.point, %struct.point* %52, i32 0, i32 0
store i32 %51, i32* %53
%54 = getelementptr inbounds %struct.rect, %struct.rect* %3, i32 0, i32 2
%55 = getelementptr inbounds %struct.point, %struct.point* %54, i32 0, i32 0
%56 = load i32, i32* %55
%57 = getelementptr inbounds %struct.rect, %struct.rect* %3, i32 0, i32 3
%58 = getelementptr inbounds %struct.point, %struct.point* %57, i32 0, i32 0
store i32 %56, i32* %58
%59 = getelementptr inbounds %struct.rect, %struct.rect* %3, i32 0, i32 1
%60 = getelementptr inbounds %struct.point, %struct.point* %59, i32 0, i32 1
%61 = load i32, i32* %60
%62 = getelementptr inbounds %struct.rect, %struct.rect* %3, i32 0, i32 3
%63 = getelementptr inbounds %struct.point, %struct.point* %62, i32 0, i32 1
store i32 %61, i32* %63
ret i32 0
}

LLVM IR (-O2):
%struct.rect = type { %struct.point, %struct.point, %struct.point, %struct.point }
%struct.point = type { i32, i32 }
@.str = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca %struct.rect
%2 = alloca %struct.rect
%3 = bitcast %struct.rect* %1 to i8*
%4 = bitcast %struct.rect* %2 to i8*
%5 = getelementptr inbounds %struct.rect, %struct.rect* %1, i64 0, i32 1, i32 0
%6 = getelementptr inbounds %struct.rect, %struct.rect* %1, i64 0, i32 1, i32 1
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %5, i32* %6)
%8 = getelementptr inbounds %struct.rect, %struct.rect* %1, i64 0, i32 2, i32 0
%9 = getelementptr inbounds %struct.rect, %struct.rect* %1, i64 0, i32 2, i32 1
%10 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %8, i32* %9)
%11 = getelementptr inbounds %struct.rect, %struct.rect* %2, i64 0, i32 1, i32 0
%12 = getelementptr inbounds %struct.rect, %struct.rect* %2, i64 0, i32 1, i32 1
%13 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %11, i32* %12)
%14 = getelementptr inbounds %struct.rect, %struct.rect* %2, i64 0, i32 2, i32 0
%15 = getelementptr inbounds %struct.rect, %struct.rect* %2, i64 0, i32 2, i32 1
%16 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %14, i32* %15)
ret i32 0
}