// File: /workspace/github_cpp_makefile_star2_O1/FreeSlave[P]vhlt/hlbsp/tjunc.cpp
// Function: tjunc_fix_r(node_s*)
static void     tjunc_fix_r(node_t* node)
{
    face_t*         f;
    face_t*         next;

    if (node->planenum == PLANENUM_LEAF)
    {
        return;
    }

    newlist = NULL;

    for (f = node->faces; f; f = next)
    {
        next = f->next;
        FixFaceEdges(f);
    }

    node->faces = newlist;

    tjunc_fix_r(node->children[0]);
    tjunc_fix_r(node->children[1]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
leaq 0x4a31dfe(%rip), %r14   # 0x4a4cb20
cmpl $-0x1, 0x80(%rdi)
je 0x1b56c
movq $0x0, 0x4a31dd6(%rip) # 0x4a4cb10
movq %rdi, 0x50(%rsp)
movq 0x98(%rdi), %rax
testq %rax, %rax
je 0x1b541
movq %rax, %rsi
movq (%rax), %rax
movq %rax, 0x58(%rsp)
movl $0x4b8, %edx            # imm = 0x4B8
movq %r14, %rdi
movq %rsi, 0x38(%rsp)
callq 0x4260
xorl %esi, %esi
movslq 0x4a31dd7(%rip), %rcx   # 0x4a4cb4c
cmpq %rcx, %rsi
jge 0x1ae91
leaq 0x1(%rsi), %r13
movl %r13d, %eax
cltd
idivl %ecx
movl %edx, %ebx
leaq (%rsi,%rsi,2), %rax
leaq (%r14,%rax,8), %rdi
addq $0x38, %rdi
leaq (%rbx,%rbx,2), %r15
leaq 0x38(%r14,%r15,8), %rbp
movq %rbp, %rsi
leaq 0x70(%rsp), %rdx
leaq 0x68(%rsp), %rcx
callq 0x1b57b
movq %rax, %rdx
addq $0x48, %rdx
movsd 0x70(%rsp), %xmm0
addsd 0x66ca(%rip), %xmm0     # 0x21490
movq (%rdx), %rcx
movsd (%rcx), %xmm1
leaq 0x10(%rcx), %rdx
ucomisd %xmm1, %xmm0
ja 0x1adc6
movsd 0x68(%rsp), %xmm0
addsd 0x66c3(%rip), %xmm0     # 0x214a8
ucomisd %xmm1, %xmm0
movq %r13, %rsi
jbe 0x1ad6e
incl 0x3a31cc8(%rip)         # 0x3a4cabc
movslq 0x4a31d51(%rip), %rdx   # 0x4a4cb4c
cmpl %ebx, %edx
jle 0x1ae2b
movslq %ebx, %rsi
leaq (%rdx,%rdx,2), %rdi
leaq (%r14,%rdi,8), %rdi
addq $0x48, %rdi
decq %rdx
movups -0x28(%rdi), %xmm0
movups %xmm0, -0x10(%rdi)
movsd -0x18(%rdi), %xmm0
movsd %xmm0, (%rdi)
addq $-0x18, %rdi
cmpq %rsi, %rdx
jg 0x1ae0e
movsd (%rcx), %xmm0
mulsd 0x8(%rax), %xmm0
addsd 0x20(%rax), %xmm0
movsd %xmm0, (%rbp)
movsd (%rcx), %xmm0
mulsd 0x10(%rax), %xmm0
addsd 0x28(%rax), %xmm0
movsd %xmm0, 0x40(%r14,%r15,8)
movsd (%rcx), %xmm0
mulsd 0x18(%rax), %xmm0
addsd 0x30(%rax), %xmm0
movsd %xmm0, 0x48(%r14,%r15,8)
movl 0x4a31cde(%rip), %eax   # 0x4a4cb4c
leal 0x1(%rax), %ecx
movl %ecx, 0x4a31cd5(%rip)   # 0x4a4cb4c
xorl %edi, %edi
cmpl $0x2a7, %eax            # imm = 0x2A7
setl %dil
movl $0x15, %esi
callq 0xa731
jmp 0x1ad6c
cmpl $0x1c, %ecx
jg 0x1aeb0
movl $0x4b8, %edx            # imm = 0x4B8
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4260
jmp 0x1b526
xorl %edi, %edi
cmpq $0x0, 0x4a31c86(%rip)   # 0x4a4cb40
sete %dil
movl $0x2, %esi
callq 0xa731
cmpl $0x1d, 0x4a31c7d(%rip)  # 0x4a4cb4c
jge 0x1aed8
xorl %ebp, %ebp
jmp 0x1b50d
xorl %ebp, %ebp
movq %rbp, 0x60(%rsp)
incl 0x3a31bd3(%rip)         # 0x3a4cab8
movsd 0x3223(%rip), %xmm4     # 0x1e110
movslq 0x4a31c58(%rip), %rax   # 0x4a4cb4c
leaq (%rax,%rax,2), %rax
movsd 0x20(%r14,%rax,8), %xmm2
subsd 0x4a31c51(%rip), %xmm2  # 0x4a4cb58
movsd 0x28(%r14,%rax,8), %xmm7
subsd 0x4a31c4a(%rip), %xmm7  # 0x4a4cb60
movsd 0x30(%r14,%rax,8), %xmm8
subsd 0x4a31c42(%rip), %xmm8  # 0x4a4cb68
movapd %xmm7, %xmm0
mulsd %xmm7, %xmm0
movapd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movapd %xmm8, %xmm0
mulsd %xmm8, %xmm0
addsd %xmm1, %xmm0
ucomisd 0x6330(%rip), %xmm0     # 0x21280
jb 0x1af5b
xorps %xmm3, %xmm3
sqrtsd %xmm0, %xmm3
jmp 0x1af90
movapd %xmm2, 0x10(%rsp)
movsd %xmm7, 0x8(%rsp)
movsd %xmm8, (%rsp)
callq 0x4240
movsd (%rsp), %xmm8
movsd 0x8(%rsp), %xmm7
movapd 0x10(%rsp), %xmm2
movsd 0x3184(%rip), %xmm4     # 0x1e110
movapd %xmm0, %xmm3
ucomisd %xmm3, %xmm4
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
ja 0x1afb0
divsd %xmm3, %xmm7
divsd %xmm3, %xmm8
movapd %xmm7, %xmm5
movapd %xmm8, %xmm6
divsd %xmm3, %xmm2
cmpltsd %xmm4, %xmm3
movl 0x4a31b8d(%rip), %eax   # 0x4a4cb4c
testl %eax, %eax
movl $0x1, %r13d
cmovlel %eax, %r13d
andnpd %xmm2, %xmm3
movq %rax, %rcx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rbx
leal -0x1(%rax), %ecx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %r15
movq %r14, %rbp
movapd %xmm3, 0x40(%rsp)
movsd %xmm5, 0x30(%rsp)
movsd %xmm6, 0x28(%rsp)
movl %eax, %r12d
cmpl $0x2, %eax
jl 0x1b115
movsd 0x8(%rbp,%rbx), %xmm7
subsd 0x38(%rbp,%r15), %xmm7
movsd 0x10(%rbp,%rbx), %xmm8
subsd 0x40(%rbp,%r15), %xmm8
movsd 0x18(%rbp,%rbx), %xmm9
subsd 0x48(%rbp,%r15), %xmm9
movapd %xmm8, %xmm0
mulsd %xmm8, %xmm0
movapd %xmm7, %xmm1
mulsd %xmm7, %xmm1
addsd %xmm0, %xmm1
movapd %xmm9, %xmm0
mulsd %xmm9, %xmm0
addsd %xmm1, %xmm0
ucomisd 0x6225(%rip), %xmm0     # 0x21280
jb 0x1b063
sqrtsd %xmm0, %xmm0
jmp 0x1b0a8
movapd %xmm7, 0x10(%rsp)
movsd %xmm8, 0x8(%rsp)
movsd %xmm9, (%rsp)
callq 0x4240
movsd (%rsp), %xmm9
movsd 0x8(%rsp), %xmm8
movapd 0x10(%rsp), %xmm7
movsd 0x28(%rsp), %xmm6
movsd 0x30(%rsp), %xmm5
movapd 0x40(%rsp), %xmm3
movsd 0x3068(%rip), %xmm4     # 0x1e110
ucomisd %xmm0, %xmm4
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
ja 0x1b0ca
divsd %xmm0, %xmm8
divsd %xmm0, %xmm9
movapd %xmm8, %xmm1
movapd %xmm9, %xmm2
mulsd %xmm6, %xmm2
mulsd %xmm5, %xmm1
divsd %xmm0, %xmm7
cmpltsd %xmm4, %xmm0
andnpd %xmm7, %xmm0
mulsd %xmm3, %xmm0
addsd %xmm1, %xmm0
addsd %xmm2, %xmm0
leal -0x1(%r12), %eax
movsd 0x71f8(%rip), %xmm1     # 0x222f0
ucomisd %xmm0, %xmm1
ja 0x1b110
addq $-0x18, %rbp
ucomisd 0x8c06(%rip), %xmm0     # 0x23d10
jbe 0x1affa
incl %eax
movl %eax, %r13d
movsd 0x4a31a53(%rip), %xmm2  # 0x4a4cb70
subsd 0x4a31a33(%rip), %xmm2  # 0x4a4cb58
movsd 0x4a31a4b(%rip), %xmm7  # 0x4a4cb78
subsd 0x4a31a2b(%rip), %xmm7  # 0x4a4cb60
movsd 0x4a31a42(%rip), %xmm8  # 0x4a4cb80
subsd 0x4a31a21(%rip), %xmm8  # 0x4a4cb68
movapd %xmm7, %xmm0
mulsd %xmm7, %xmm0
movapd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movapd %xmm8, %xmm0
mulsd %xmm8, %xmm0
addsd %xmm1, %xmm0
ucomisd 0x610f(%rip), %xmm0     # 0x21280
jb 0x1b17c
xorps %xmm3, %xmm3
sqrtsd %xmm0, %xmm3
jmp 0x1b1b1
movapd %xmm2, 0x10(%rsp)
movsd %xmm7, 0x8(%rsp)
movsd %xmm8, (%rsp)
callq 0x4240
movsd (%rsp), %xmm8
movsd 0x8(%rsp), %xmm7
movapd 0x10(%rsp), %xmm2
movsd 0x2f63(%rip), %xmm4     # 0x1e110
movapd %xmm0, %xmm3
ucomisd %xmm3, %xmm4
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
ja 0x1b1d1
divsd %xmm3, %xmm7
divsd %xmm3, %xmm8
movapd %xmm7, %xmm5
movapd %xmm8, %xmm6
divsd %xmm3, %xmm2
cmpltsd %xmm4, %xmm3
andnpd %xmm2, %xmm3
movl $0x1, %eax
movl $0x3, %ecx
leaq 0x4a319a9(%rip), %rbp   # 0x4a4cb98
movapd %xmm3, 0x40(%rsp)
movsd %xmm5, 0x30(%rsp)
movsd %xmm6, 0x28(%rsp)
movq %rax, %r15
movl %ecx, %ebx
movslq 0x4a3193f(%rip), %rax   # 0x4a4cb4c
decq %rax
cmpq %rax, %r15
jge 0x1b31e
movsd -0x10(%rbp), %xmm7
subsd -0x28(%rbp), %xmm7
movsd -0x8(%rbp), %xmm8
subsd -0x20(%rbp), %xmm8
movsd (%rbp), %xmm9
subsd -0x18(%rbp), %xmm9
movapd %xmm8, %xmm0
mulsd %xmm8, %xmm0
movapd %xmm7, %xmm1
mulsd %xmm7, %xmm1
addsd %xmm0, %xmm1
movapd %xmm9, %xmm0
mulsd %xmm9, %xmm0
addsd %xmm1, %xmm0
ucomisd 0x6019(%rip), %xmm0     # 0x21280
jb 0x1b26f
sqrtsd %xmm0, %xmm0
jmp 0x1b2b4
movapd %xmm7, 0x10(%rsp)
movsd %xmm8, 0x8(%rsp)
movsd %xmm9, (%rsp)
callq 0x4240
movsd (%rsp), %xmm9
movsd 0x8(%rsp), %xmm8
movapd 0x10(%rsp), %xmm7
movsd 0x28(%rsp), %xmm6
movsd 0x30(%rsp), %xmm5
movapd 0x40(%rsp), %xmm3
movsd 0x2e5c(%rip), %xmm4     # 0x1e110
ucomisd %xmm0, %xmm4
xorpd %xmm1, %xmm1
xorpd %xmm2, %xmm2
ja 0x1b2d6
divsd %xmm0, %xmm8
divsd %xmm0, %xmm9
movapd %xmm8, %xmm1
movapd %xmm9, %xmm2
mulsd %xmm6, %xmm2
mulsd %xmm5, %xmm1
divsd %xmm0, %xmm7
cmpltsd %xmm4, %xmm0
andnpd %xmm7, %xmm0
mulsd %xmm3, %xmm0
addsd %xmm1, %xmm0
addsd %xmm2, %xmm0
movsd 0x6ff1(%rip), %xmm1     # 0x222f0
ucomisd %xmm0, %xmm1
ja 0x1b31e
leaq 0x1(%r15), %rax
leal 0x1(%rbx), %ecx
addq $0x18, %rbp
ucomisd 0x89f8(%rip), %xmm0     # 0x23d10
jbe 0x1b201
cmpq $0x1a, %r15
jb 0x1b3b6
movsd 0x4a31828(%rip), %xmm2  # 0x4a4cb58
movsd 0x4a31828(%rip), %xmm1  # 0x4a4cb60
movsd 0x4a31828(%rip), %xmm0  # 0x4a4cb68
movslq 0x4a31805(%rip), %rax   # 0x4a4cb4c
cmpq $0x2, %rax
jl 0x1b37e
leaq (%rax,%rax,2), %rcx
leaq -0x18(,%rcx,8), %rcx
xorl %edx, %edx
movups 0x50(%rdx,%r14), %xmm3
movups %xmm3, 0x38(%rdx,%r14)
movsd 0x60(%rdx,%r14), %xmm3
movsd %xmm3, 0x48(%rdx,%r14)
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0x1b35b
decl %eax
cltq
leaq (%rax,%rax,2), %rax
movsd %xmm2, 0x38(%r14,%rax,8)
movslq 0x4a317b8(%rip), %rax   # 0x4a4cb4c
leaq (%rax,%rax,2), %rax
movsd %xmm1, 0x28(%r14,%rax,8)
movslq 0x4a317a6(%rip), %rax   # 0x4a4cb4c
leaq (%rax,%rax,2), %rax
movsd %xmm0, 0x30(%r14,%rax,8)
jmp 0x1aeed
movq %r14, %rdi
callq 0x1493f
movq %rax, %rbp
xorl %edi, %edi
cmpq $0x0, 0x4a31775(%rip)   # 0x4a4cb40
sete %dil
movl $0x2, %esi
callq 0xa731
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rbp)
movq 0x4a31727(%rip), %rax   # 0x4a4cb10
movq %rax, (%rbp)
movq %rbp, 0x4a3171c(%rip)   # 0x4a4cb10
movl 0x4a31752(%rip), %eax   # 0x4a4cb4c
movl %eax, %ecx
subl %r15d, %ecx
cmpl $0x1d, %ecx
jl 0x1b41f
subl %r12d, %eax
incl %eax
leal 0x1(%r13), %ebx
cmpl $0x1d, %eax
movl $0x1c, %eax
cmovgel %eax, %ebx
cmpl $0x1b, %r13d
cmovgel %eax, %ebx
movl %ebx, 0x2c(%rbp)
testl %ebx, %ebx
jle 0x1b463
movl $0x48, %eax
xorl %ecx, %ecx
movsd -0x10(%rax,%r14), %xmm0
movsd %xmm0, -0x10(%rbp,%rax)
movsd -0x8(%rax,%r14), %xmm0
movsd %xmm0, -0x8(%rbp,%rax)
movsd (%rax,%r14), %xmm0
movsd %xmm0, (%rbp,%rax)
incq %rcx
movslq 0x2c(%rbp), %rbx
addq $0x18, %rax
cmpq %rbx, %rcx
jl 0x1b42d
movl 0x4a316e3(%rip), %edx   # 0x4a4cb4c
cmpl %edx, %ebx
jg 0x1b4dc
leal -0x1(%rbx), %eax
cltq
incl %ebx
leaq (%rax,%rax,2), %rcx
leaq (%r14,%rcx,8), %rcx
addq $0x48, %rcx
movsd -0x10(%rcx), %xmm0
movl %ebx, %edx
subl 0x2c(%rbp), %edx
movslq %edx, %rdx
leaq (%rdx,%rdx,2), %rdx
movsd %xmm0, 0x38(%r14,%rdx,8)
movl %ebx, %edx
subl 0x2c(%rbp), %edx
movsd -0x8(%rcx), %xmm0
movslq %edx, %rdx
leaq (%rdx,%rdx,2), %rdx
movsd %xmm0, 0x40(%r14,%rdx,8)
movsd (%rcx), %xmm0
movl %ebx, %edx
subl 0x2c(%rbp), %edx
movslq %edx, %rdx
leaq (%rdx,%rdx,2), %rdx
movsd %xmm0, 0x48(%r14,%rdx,8)
incq %rax
movslq 0x4a3167b(%rip), %rdx   # 0x4a4cb4c
incl %ebx
addq $0x18, %rcx
cmpq %rdx, %rax
jl 0x1b480
subl 0x2c(%rbp), %edx
addl $0x2, %edx
movl %edx, 0x4a31664(%rip)   # 0x4a4cb4c
xorl %edi, %edi
cmpq $0x0, 0x4a3164e(%rip)   # 0x4a4cb40
sete %dil
movl $0x2, %esi
callq 0xa731
cmpl $0x1c, 0x4a31645(%rip)  # 0x4a4cb4c
jg 0x1aeda
movl $0x4b8, %edx            # imm = 0x4B8
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4260
movq %rbp, 0x20(%rbx)
movq 0x4a315e3(%rip), %rax   # 0x4a4cb10
movq %rax, (%rbx)
movq %rbx, 0x4a315d9(%rip)   # 0x4a4cb10
movq 0x58(%rsp), %rax
jmp 0x1ad46
movq 0x4a315c8(%rip), %rax   # 0x4a4cb10
movq 0x50(%rsp), %rbx
movq %rax, 0x98(%rbx)
movq 0x88(%rbx), %rdi
callq 0x1ad0d
movq 0x90(%rbx), %rdi
jmp 0x1ad22
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq