// File: /workspace/github_c_makefile_star2_O3/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:
cmpl $0x1, 0x12697(%rip)     # 0x188b4
setne %dl
movl 0x126aa(%rip), %eax     # 0x188d0
movl 0x126ac(%rip), %ecx     # 0x188d8
cmpl %ecx, %eax
sete %sil
orb %dl, %sil
je 0x6255
movl 0x1268f(%rip), %esi     # 0x188cc
movl 0x12691(%rip), %edx     # 0x188d4
cmpl %edx, %esi
movl %edx, %edi
cmovll %esi, %edi
movl %edi, 0x1266c(%rip)     # 0x188bc
cmovgl %esi, %edx
jmp 0x6271
cmpl %ecx, %eax
movl 0x1266f(%rip), %edx     # 0x188cc
movl 0x12671(%rip), %esi     # 0x188d4
movl %esi, %edi
cmovll %edx, %edi
movl %edi, 0x1264e(%rip)     # 0x188bc
cmovll %esi, %edx
pushq %r14
pushq %rbx
pushq %rax
movl %edx, 0x12649(%rip)     # 0x188c4
leaq 0x12642(%rip), %rbx     # 0x188c4
cmpl %ecx, %eax
movl %ecx, %edx
cmovll %eax, %edx
movl %edx, 0x12631(%rip)     # 0x188c0
leaq 0x1262a(%rip), %rsi     # 0x188c0
cmovgl %eax, %ecx
movl %ecx, 0x12629(%rip)     # 0x188c8
leaq 0x12622(%rip), %r14     # 0x188c8
leaq 0x1260f(%rip), %rdi     # 0x188bc
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x8ac8
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x8ac8
cmpl $0x2, 0x125e6(%rip)     # 0x188b4
je 0x6413
movl 0x125e6(%rip), %eax     # 0x188c0
movl 0x16498(%rip), %esi     # 0x1c778
leaq 0x125f9(%rip), %rcx     # 0x188e0
subl %esi, %eax
jge 0x6322
movl 0x1647f(%rip), %edx     # 0x1c770
addl %edx, %eax
addl $0x7d1, %eax            # imm = 0x7D1
cltq
imulq $0x10624dd3, %rax, %rdx # imm = 0x10624DD3
movq %rdx, %rdi
shrq $0x3f, %rdi
sarq $0x27, %rdx
addl %edi, %edx
imull $0x7d0, %edx, %edx      # imm = 0x7D0
subl %edx, %eax
cltq
leaq (%rcx,%rax,8), %rax
addq $0x10, %rax
jmp 0x632f
cltq
shlq $0x3, %rax
addq 0x125b9(%rip), %rax     # 0x188e8
movq (%rax), %r8
movl 0x125ac(%rip), %eax     # 0x188e4
movl %eax, %edx
sarl $0x1f, %edx
andl %eax, %edx
movq %rax, %rdi
shlq $0x4, %rdi
leaq (%rdi,%r8), %r9
addq $-0xc, %r9
movl %eax, %r8d
testl %r8d, %r8d
jle 0x636f
movzwl (%r9), %r10d
addq $-0x10, %r9
decl %r8d
testl $0x201, %r10d           # imm = 0x201
je 0x6351
incl %r8d
jmp 0x6372
movl %edx, %r8d
cmpl %r8d, 0x12543(%rip)     # 0x188bc
jle 0x6382
movl %r8d, 0x1253a(%rip)     # 0x188bc
movl 0x1253f(%rip), %r8d     # 0x188c8
subl %esi, %r8d
jge 0x63cc
movl 0x163dc(%rip), %esi     # 0x1c770
addl %r8d, %esi
addl $0x7d1, %esi            # imm = 0x7D1
movslq %esi, %rsi
imulq $0x10624dd3, %rsi, %r8  # imm = 0x10624DD3
movq %r8, %r9
shrq $0x3f, %r9
sarq $0x27, %r8
addl %r9d, %r8d
imull $0x7d0, %r8d, %r8d      # imm = 0x7D0
subl %r8d, %esi
movslq %esi, %rsi
leaq (%rcx,%rsi,8), %rsi
addq $0x10, %rsi
jmp 0x63da
movslq %r8d, %rsi
shlq $0x3, %rsi
addq 0x1250e(%rip), %rsi     # 0x188e8
movl 0x124e4(%rip), %ecx     # 0x188c4
movq (%rsi), %rsi
addq %rsi, %rdi
addq $-0xc, %rdi
movl %eax, %esi
testl %esi, %esi
jle 0x6407
movzwl (%rdi), %r8d
addq $-0x10, %rdi
decl %esi
testl $0x201, %r8d            # imm = 0x201
je 0x63ec
incl %esi
movl %esi, %edx
cmpl %edx, %ecx
jl 0x6413
decl %eax
movl %eax, 0x124b1(%rip)     # 0x188c4
addq $0x8, %rsp
popq %rbx
popq %r14
retq