// File: /workspace/github_c_makefile_star2_O0/anachronic[P]st/st.c
// Function: selnormalize
void
selnormalize(void)
{
	int i;

	if (sel.type == SEL_REGULAR && sel.ob.y != sel.oe.y) {
		sel.nb.x = sel.ob.y < sel.oe.y ? sel.ob.x : sel.oe.x;
		sel.ne.x = sel.ob.y < sel.oe.y ? sel.oe.x : sel.ob.x;
	} else {
		sel.nb.x = MIN(sel.ob.x, sel.oe.x);
		sel.ne.x = MAX(sel.ob.x, sel.oe.x);
	}
	sel.nb.y = MIN(sel.ob.y, sel.oe.y);
	sel.ne.y = MAX(sel.ob.y, sel.oe.y);

	selsnap(&sel.nb.x, &sel.nb.y, -1);
	selsnap(&sel.ne.x, &sel.ne.y, +1);

	/* expand selection over line breaks */
	if (sel.type == SEL_RECTANGULAR)
		return;

  i = tlinelen(TLINE(sel.nb.y));
	if (sel.nb.x > i)
		sel.nb.x = i;
  if (sel.ne.x >= tlinelen(TLINE(sel.ne.y)))
    sel.ne.x = term.col - 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
cmpl $0x1, 0x16f35(%rip)     # 0x1ceb4
jne 0x5fe7
movl 0x16f49(%rip), %eax     # 0x1ced0
cmpl 0x16f4b(%rip), %eax     # 0x1ced8
je 0x5fe7
movl 0x16f3b(%rip), %eax     # 0x1ced0
cmpl 0x16f3d(%rip), %eax     # 0x1ced8
jge 0x5fa8
movl 0x16f29(%rip), %eax     # 0x1cecc
movl %eax, -0x8(%rbp)
jmp 0x5fb1
movl 0x16f26(%rip), %eax     # 0x1ced4
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, 0x16f02(%rip)     # 0x1cebc
movl 0x16f10(%rip), %eax     # 0x1ced0
cmpl 0x16f12(%rip), %eax     # 0x1ced8
jge 0x5fd3
movl 0x16f06(%rip), %eax     # 0x1ced4
movl %eax, -0xc(%rbp)
jmp 0x5fdc
movl 0x16ef3(%rip), %eax     # 0x1cecc
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, 0x16edf(%rip)     # 0x1cec4
jmp 0x603d
movl 0x16edf(%rip), %eax     # 0x1cecc
cmpl 0x16ee1(%rip), %eax     # 0x1ced4
jge 0x6000
movl 0x16ed1(%rip), %eax     # 0x1cecc
movl %eax, -0x10(%rbp)
jmp 0x6009
movl 0x16ece(%rip), %eax     # 0x1ced4
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, 0x16eaa(%rip)     # 0x1cebc
movl 0x16eb4(%rip), %eax     # 0x1cecc
cmpl 0x16eb6(%rip), %eax     # 0x1ced4
jge 0x602b
movl 0x16eae(%rip), %eax     # 0x1ced4
movl %eax, -0x14(%rbp)
jmp 0x6034
movl 0x16e9b(%rip), %eax     # 0x1cecc
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, 0x16e87(%rip)     # 0x1cec4
movl 0x16e8d(%rip), %eax     # 0x1ced0
cmpl 0x16e8f(%rip), %eax     # 0x1ced8
jge 0x6056
movl 0x16e7f(%rip), %eax     # 0x1ced0
movl %eax, -0x18(%rbp)
jmp 0x605f
movl 0x16e7c(%rip), %eax     # 0x1ced8
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, 0x16e58(%rip)     # 0x1cec0
movl 0x16e62(%rip), %eax     # 0x1ced0
cmpl 0x16e64(%rip), %eax     # 0x1ced8
jge 0x6081
movl 0x16e5c(%rip), %eax     # 0x1ced8
movl %eax, -0x1c(%rbp)
jmp 0x608a
movl 0x16e49(%rip), %eax     # 0x1ced0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, 0x16e35(%rip)     # 0x1cec8
leaq 0x16e16(%rip), %rdi     # 0x1ceb0
addq $0xc, %rdi
movq %rdi, %rsi
addq $0x4, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x8a70
leaq 0x16dfa(%rip), %rdi     # 0x1ceb0
addq $0x14, %rdi
movq %rdi, %rsi
addq $0x4, %rsi
movl $0x1, %edx
callq 0x8a70
cmpl $0x2, 0x16de2(%rip)     # 0x1ceb4
jne 0x60d9
jmp 0x61e9
movl 0x16de1(%rip), %eax     # 0x1cec0
cmpl 0x1ac93(%rip), %eax     # 0x20d78
jge 0x611e
movl 0x1ac83(%rip), %eax     # 0x20d70
addl 0x16dcd(%rip), %eax     # 0x1cec0
subl 0x1ac7f(%rip), %eax     # 0x20d78
addl $0x1, %eax
addl $0x7d0, %eax            # imm = 0x7D0
movl $0x7d0, %ecx            # imm = 0x7D0
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x16dcd(%rip), %rax     # 0x1cee0
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
jmp 0x613c
movq 0x16dc3(%rip), %rax     # 0x1cee8
movl 0x16d95(%rip), %ecx     # 0x1cec0
subl 0x1ac47(%rip), %ecx     # 0x20d78
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x6750
movl %eax, -0x4(%rbp)
movl 0x16d6e(%rip), %eax     # 0x1cebc
cmpl -0x4(%rbp), %eax
jle 0x615c
movl -0x4(%rbp), %eax
movl %eax, 0x16d60(%rip)     # 0x1cebc
movl 0x16d62(%rip), %eax     # 0x1cec4
movl %eax, -0x2c(%rbp)
movl 0x16d5d(%rip), %eax     # 0x1cec8
cmpl 0x1ac07(%rip), %eax     # 0x20d78
jge 0x61aa
movl 0x1abf7(%rip), %eax     # 0x20d70
addl 0x16d49(%rip), %eax     # 0x1cec8
subl 0x1abf3(%rip), %eax     # 0x20d78
addl $0x1, %eax
addl $0x7d0, %eax            # imm = 0x7D0
movl $0x7d0, %ecx            # imm = 0x7D0
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x16d41(%rip), %rax     # 0x1cee0
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
jmp 0x61c8
movq 0x16d37(%rip), %rax     # 0x1cee8
movl 0x16d11(%rip), %ecx     # 0x1cec8
subl 0x1abbb(%rip), %ecx     # 0x20d78
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x6750
movl %eax, %ecx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
jl 0x61e9
movl 0x16d04(%rip), %eax     # 0x1cee4
subl $0x1, %eax
movl %eax, 0x16cdb(%rip)     # 0x1cec4
addq $0x40, %rsp
popq %rbp
retq
nop