// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/geometry.c
// Function: on_dir_side
bool on_dir_side(xcb_rectangle_t r1, xcb_rectangle_t r2, direction_t dir)
{
	xcb_point_t r1_max = {r1.x + r1.width - 1, r1.y + r1.height - 1};
	xcb_point_t r2_max = {r2.x + r2.width - 1, r2.y + r2.height - 1};

	/* Eliminate rectangles on the opposite side */
	switch (directional_focus_tightness) {
		case TIGHTNESS_LOW:
			switch (dir) {
				case DIR_NORTH:
					if (r2.y > r1_max.y) {
						return false;
					}
					break;
				case DIR_WEST:
					if (r2.x > r1_max.x) {
						return false;
					}
					break;
				case DIR_SOUTH:
					if (r2_max.y < r1.y) {
						return false;
					}
					break;
				case DIR_EAST:
					if (r2_max.x < r1.x) {
						return false;
					}
					break;
				default:
					return false;
			}
			break;
		case TIGHTNESS_HIGH:
			switch (dir) {
				case DIR_NORTH:
					if (r2.y >= r1.y) {
						return false;
					}
					break;
				case DIR_WEST:
					if (r2.x >= r1.x) {
						return false;
					}
					break;
				case DIR_SOUTH:
					if (r2_max.y <= r1_max.y) {
						return false;
					}
					break;
				case DIR_EAST:
					if (r2_max.x <= r1_max.x) {
						return false;
					}
					break;
				default:
					return false;
			}
			break;
		default:
			return false;
	}

	/* Is there a shared vertical/horizontal range? */
	switch (dir) {
		case DIR_NORTH:
		case DIR_SOUTH:
			return
				(r2.x >= r1.x && r2.x <= r1_max.x) ||
				(r2_max.x >= r1.x && r2_max.x <= r1_max.x) ||
				(r1.x > r2.x && r1.x < r2_max.x);
			break;
		case DIR_WEST:
		case DIR_EAST:
			return
				(r2.y >= r1.y && r2.y <= r1_max.y) ||
				(r2_max.y >= r1.y && r2_max.y <= r1_max.y) ||
				(r1.y > r2.y && r1_max.y < r2_max.y);
			break;
		default:
			return false;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0xa(%rbp)
movq %rsi, -0x12(%rbp)
movl %edx, -0x18(%rbp)
movzwl -0xa(%rbp), %edx
movzwl -0x6(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal -0x1(%rax,%rcx), %eax
movw %ax, -0x1c(%rbp)
movzwl -0x8(%rbp), %edx
movzwl -0x4(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal -0x1(%rax,%rcx), %eax
movw %ax, -0x1a(%rbp)
movzwl -0x12(%rbp), %edx
movzwl -0xe(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal -0x1(%rax,%rcx), %eax
movw %ax, -0x20(%rbp)
movzwl -0x10(%rbp), %edx
movzwl -0xc(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal -0x1(%rax,%rcx), %eax
movw %ax, -0x1e(%rbp)
leaq 0x2ef16(%rip), %rax     # 0x35dcc
movl (%rax), %eax
movl %eax, -0x24(%rbp)
testl %eax, %eax
je 0x6ed2
jmp 0x6ec1
movl -0x24(%rbp), %eax
subl $0x1, %eax
je 0x6f5d
jmp 0x6fe5
movl -0x18(%rbp), %eax
movq %rax, -0x30(%rbp)
subq $0x3, %rax
ja 0x6f4f
movq -0x30(%rbp), %rax
leaq 0x26536(%rip), %rcx     # 0x2d420
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movswl -0x10(%rbp), %eax
movswl -0x1a(%rbp), %ecx
cmpl %ecx, %eax
jle 0x6f08
movb $0x0, -0x1(%rbp)
jmp 0x70ed
jmp 0x6f58
movswl -0x12(%rbp), %eax
movswl -0x1c(%rbp), %ecx
cmpl %ecx, %eax
jle 0x6f1f
movb $0x0, -0x1(%rbp)
jmp 0x70ed
jmp 0x6f58
movswl -0x1e(%rbp), %eax
movswl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jge 0x6f36
movb $0x0, -0x1(%rbp)
jmp 0x70ed
jmp 0x6f58
movswl -0x20(%rbp), %eax
movswl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jge 0x6f4d
movb $0x0, -0x1(%rbp)
jmp 0x70ed
jmp 0x6f58
movb $0x0, -0x1(%rbp)
jmp 0x70ed
jmp 0x6fee
movl -0x18(%rbp), %eax
movq %rax, -0x38(%rbp)
subq $0x3, %rax
ja 0x6fda
movq -0x38(%rbp), %rax
leaq 0x2649b(%rip), %rcx     # 0x2d410
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movswl -0x10(%rbp), %eax
movswl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jl 0x6f93
movb $0x0, -0x1(%rbp)
jmp 0x70ed
jmp 0x6fe3
movswl -0x12(%rbp), %eax
movswl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jl 0x6faa
movb $0x0, -0x1(%rbp)
jmp 0x70ed
jmp 0x6fe3
movswl -0x1e(%rbp), %eax
movswl -0x1a(%rbp), %ecx
cmpl %ecx, %eax
jg 0x6fc1
movb $0x0, -0x1(%rbp)
jmp 0x70ed
jmp 0x6fe3
movswl -0x20(%rbp), %eax
movswl -0x1c(%rbp), %ecx
cmpl %ecx, %eax
jg 0x6fd8
movb $0x0, -0x1(%rbp)
jmp 0x70ed
jmp 0x6fe3
movb $0x0, -0x1(%rbp)
jmp 0x70ed
jmp 0x6fee
movb $0x0, -0x1(%rbp)
jmp 0x70ed
movl -0x18(%rbp), %eax
movq %rax, -0x40(%rbp)
subq $0x3, %rax
ja 0x70e9
movq -0x40(%rbp), %rax
leaq 0x26426(%rip), %rcx     # 0x2d430
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movswl -0x12(%rbp), %eax
movswl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jl 0x7030
movswl -0x12(%rbp), %ecx
movswl -0x1c(%rbp), %edx
movb $0x1, %al
cmpl %edx, %ecx
movb %al, -0x41(%rbp)
jle 0x7074
movswl -0x20(%rbp), %eax
movswl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jl 0x704d
movswl -0x20(%rbp), %ecx
movswl -0x1c(%rbp), %edx
movb $0x1, %al
cmpl %edx, %ecx
movb %al, -0x41(%rbp)
jle 0x7074
movswl -0xa(%rbp), %ecx
movswl -0x12(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x42(%rbp)
jle 0x706e
movswl -0xa(%rbp), %eax
movswl -0x20(%rbp), %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x70ed
movswl -0x10(%rbp), %eax
movswl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jl 0x709b
movswl -0x10(%rbp), %ecx
movswl -0x1a(%rbp), %edx
movb $0x1, %al
cmpl %edx, %ecx
movb %al, -0x43(%rbp)
jle 0x70df
movswl -0x1e(%rbp), %eax
movswl -0x8(%rbp), %ecx
cmpl %ecx, %eax
jl 0x70b8
movswl -0x1e(%rbp), %ecx
movswl -0x1a(%rbp), %edx
movb $0x1, %al
cmpl %edx, %ecx
movb %al, -0x43(%rbp)
jle 0x70df
movswl -0x8(%rbp), %ecx
movswl -0x10(%rbp), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x44(%rbp)
jle 0x70d9
movswl -0x1a(%rbp), %eax
movswl -0x1e(%rbp), %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0x44(%rbp)
movb -0x44(%rbp), %al
movb %al, -0x43(%rbp)
movb -0x43(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x70ed
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)