// File: /workspace/github_cpp_makefile_star2_O3/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:
cmpl $-0x1, 0x80(%rdi)
je 0x1b14a
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x4a31126(%rip), %r14   # 0x4a4bb10
leaq 0x4a31197(%rip), %r12   # 0x4a4bb88
movq $0x0, 0x4a31104(%rip) # 0x4a4bb00
movq %rbx, 0x10(%rsp)
movq 0x98(%rbx), %rax
testq %rax, %rax
jne 0x1af4b
xorl %ebx, %ebx
jmp 0x1b10d
movq %rbp, 0x20(%rsp)
incl 0x3a31085(%rip)         # 0x3a4baa8
movsd 0x26ec(%rip), %xmm15    # 0x1d118
movl $0x1, %r10d
leal -0x1(%rax), %ebx
movslq %ebx, %rcx
leaq (%rcx,%rcx,2), %rcx
movsd 0x4a31104(%rip), %xmm0  # 0x4a4bb48
movsd 0x38(%r14,%rcx,8), %xmm7
movsd 0x40(%r14,%rcx,8), %xmm8
subsd %xmm0, %xmm7
movsd 0x4a310f2(%rip), %xmm1  # 0x4a4bb50
subsd %xmm1, %xmm8
movsd 0x48(%r14,%rcx,8), %xmm6
movsd 0x4a310e6(%rip), %xmm2  # 0x4a4bb58
subsd %xmm2, %xmm6
movapd %xmm8, %xmm3
mulsd %xmm8, %xmm3
movapd %xmm7, %xmm4
mulsd %xmm7, %xmm4
addsd %xmm3, %xmm4
movapd %xmm6, %xmm3
mulsd %xmm6, %xmm3
addsd %xmm4, %xmm3
sqrtsd %xmm3, %xmm3
ucomisd %xmm3, %xmm15
xorpd %xmm4, %xmm4
xorpd %xmm5, %xmm5
ja 0x1aabd
divsd %xmm3, %xmm7
divsd %xmm3, %xmm8
movapd %xmm8, %xmm4
movapd %xmm7, %xmm5
leaq (%r14,%rcx,8), %rcx
addq $0x38, %rcx
divsd %xmm3, %xmm6
cmpltsd %xmm15, %xmm3
andnpd %xmm6, %xmm3
testl %eax, %eax
movl $0x1, %r13d
cmovlel %eax, %r13d
movl %eax, %edx
leal -0x1(%r13), %esi
leaq (,%rdx,8), %rdi
leaq (%rdi,%rdi,2), %rdi
leaq (,%rbx,8), %r8
leaq (%r8,%r8,2), %r8
movl %eax, %r15d
movq %r14, %r9
cmpl $0x2, %r15d
jl 0x1abd5
movsd 0x8(%r9,%rdi), %xmm8
movsd 0x10(%r9,%rdi), %xmm9
subsd 0x38(%r9,%r8), %xmm8
subsd 0x40(%r9,%r8), %xmm9
movsd 0x18(%r9,%rdi), %xmm6
subsd 0x48(%r9,%r8), %xmm6
movapd %xmm9, %xmm7
mulsd %xmm9, %xmm7
movapd %xmm8, %xmm10
mulsd %xmm8, %xmm10
addsd %xmm7, %xmm10
movapd %xmm6, %xmm7
mulsd %xmm6, %xmm7
addsd %xmm10, %xmm7
sqrtsd %xmm7, %xmm7
ucomisd %xmm7, %xmm15
xorpd %xmm10, %xmm10
xorpd %xmm11, %xmm11
ja 0x1ab86
divsd %xmm7, %xmm8
divsd %xmm7, %xmm9
movapd %xmm9, %xmm10
movapd %xmm8, %xmm11
mulsd %xmm5, %xmm11
mulsd %xmm4, %xmm10
addsd %xmm11, %xmm10
divsd %xmm7, %xmm6
cmpltsd %xmm15, %xmm7
andnpd %xmm6, %xmm7
mulsd %xmm3, %xmm7
addsd %xmm10, %xmm7
decl %r15d
movsd 0x6731(%rip), %xmm6     # 0x212e8
ucomisd %xmm7, %xmm6
ja 0x1abcf
addq $-0x18, %r9
ucomisd 0x8117(%rip), %xmm7     # 0x22ce0
jbe 0x1ab03
leal 0x1(%r15), %r13d
jmp 0x1abd8
movl %esi, %r15d
movsd 0x4a30f7f(%rip), %xmm8  # 0x4a4bb60
movapd %xmm8, %xmm10
subsd %xmm0, %xmm10
movsd 0x4a30f75(%rip), %xmm7  # 0x4a4bb68
movapd %xmm7, %xmm11
subsd %xmm1, %xmm11
movsd 0x4a30f6b(%rip), %xmm6  # 0x4a4bb70
movapd %xmm6, %xmm9
subsd %xmm2, %xmm9
movapd %xmm11, %xmm3
mulsd %xmm11, %xmm3
movapd %xmm10, %xmm4
mulsd %xmm10, %xmm4
addsd %xmm3, %xmm4
movapd %xmm9, %xmm3
mulsd %xmm9, %xmm3
addsd %xmm4, %xmm3
sqrtsd %xmm3, %xmm3
ucomisd %xmm3, %xmm15
xorpd %xmm4, %xmm4
xorpd %xmm5, %xmm5
ja 0x1ac5c
divsd %xmm3, %xmm10
divsd %xmm3, %xmm11
movapd %xmm11, %xmm4
movapd %xmm10, %xmm5
divsd %xmm3, %xmm9
cmpltsd %xmm15, %xmm3
cmpl $0x2, %ebx
cmovll %r10d, %ebx
andnpd %xmm9, %xmm3
leaq -0x1(%rbx), %rsi
movq %r12, %r8
xorl %edi, %edi
cmpq %rdi, %rsi
je 0x1ad62
movsd -0x10(%r8), %xmm9
movsd -0x8(%r8), %xmm10
movapd %xmm9, %xmm11
subsd %xmm8, %xmm11
movapd %xmm10, %xmm12
subsd %xmm7, %xmm12
movsd (%r8), %xmm7
movapd %xmm7, %xmm8
subsd %xmm6, %xmm8
movapd %xmm12, %xmm6
mulsd %xmm12, %xmm6
movapd %xmm11, %xmm13
mulsd %xmm11, %xmm13
addsd %xmm6, %xmm13
movapd %xmm8, %xmm6
mulsd %xmm8, %xmm6
addsd %xmm13, %xmm6
sqrtsd %xmm6, %xmm6
ucomisd %xmm6, %xmm15
xorpd %xmm13, %xmm13
xorpd %xmm14, %xmm14
ja 0x1ad05
divsd %xmm6, %xmm11
divsd %xmm6, %xmm12
movapd %xmm12, %xmm13
movapd %xmm11, %xmm14
mulsd %xmm5, %xmm14
mulsd %xmm4, %xmm13
addsd %xmm14, %xmm13
divsd %xmm6, %xmm8
cmpltsd %xmm15, %xmm6
andnpd %xmm8, %xmm6
mulsd %xmm3, %xmm6
addsd %xmm13, %xmm6
incq %rdi
movsd 0x65af(%rip), %xmm8     # 0x212e8
ucomisd %xmm6, %xmm8
ja 0x1ad60
addq $0x18, %r8
ucomisd 0x7f94(%rip), %xmm6     # 0x22ce0
movapd %xmm7, %xmm6
movapd %xmm10, %xmm7
movapd %xmm9, %xmm8
jbe 0x1ac7c
movl %edi, %ebx
cmpl $0x1a, %ebx
jb 0x1add0
cmpl $0x2, %eax
jl 0x1ad9d
leaq (%rdx,%rdx,2), %rax
leaq -0x18(,%rax,8), %rax
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, %rax
jne 0x1ad7a
movsd %xmm0, (%rcx)
movslq 0x4a30d94(%rip), %rax   # 0x4a4bb3c
leaq (%rax,%rax,2), %rax
movsd %xmm1, 0x28(%r14,%rax,8)
movslq 0x4a30d82(%rip), %rax   # 0x4a4bb3c
leaq (%rax,%rax,2), %rax
movsd %xmm2, 0x30(%r14,%rax,8)
movl 0x4a30d71(%rip), %eax   # 0x4a4bb3c
jmp 0x1aa32
movq %r14, %rdi
callq 0x146f5
movq %rax, %rbp
xorl %edi, %edi
cmpq $0x0, 0x4a30d4b(%rip)   # 0x4a4bb30
sete %dil
movl $0x2, %esi
callq 0xa655
movq 0x20(%rsp), %rax
movq %rax, 0x20(%rbp)
movq 0x4a30cfd(%rip), %rax   # 0x4a4bb00
movq %rax, (%rbp)
movq %rbp, 0x4a30cf2(%rip)   # 0x4a4bb00
movl 0x4a30d28(%rip), %eax   # 0x4a4bb3c
movl %eax, %ecx
subl %ebx, %ecx
cmpl $0x1c, %ecx
jg 0x1af14
addl $0x2, %ebx
movq %rbp, %rax
addq $0x2c, %rax
movl %ebx, 0x2c(%rbp)
movl %ebx, %ecx
movl $0x48, %edx
movsd -0x10(%rdx,%r14), %xmm0
movsd %xmm0, -0x10(%rbp,%rdx)
movsd -0x8(%rdx,%r14), %xmm0
movsd %xmm0, -0x8(%rbp,%rdx)
movsd (%rdx,%r14), %xmm0
movsd %xmm0, (%rbp,%rdx)
addq $0x18, %rdx
decq %rcx
jne 0x1ae35
movl 0x4a30cd2(%rip), %esi   # 0x4a4bb3c
cmpl %esi, %ebx
jg 0x1aedd
leal -0x1(%rbx), %ecx
movslq %ecx, %rcx
incl %ebx
leaq (%rcx,%rcx,2), %rdx
leaq (%r14,%rdx,8), %rdx
addq $0x48, %rdx
movsd -0x10(%rdx), %xmm0
movl %ebx, %esi
subl (%rax), %esi
movslq %esi, %rsi
leaq (%rsi,%rsi,2), %rsi
movsd %xmm0, 0x38(%r14,%rsi,8)
movl %ebx, %esi
subl (%rax), %esi
movsd -0x8(%rdx), %xmm0
movslq %esi, %rsi
leaq (%rsi,%rsi,2), %rsi
movsd %xmm0, 0x40(%r14,%rsi,8)
movsd (%rdx), %xmm0
movl %ebx, %esi
subl (%rax), %esi
movslq %esi, %rsi
leaq (%rsi,%rsi,2), %rsi
movsd %xmm0, 0x48(%r14,%rsi,8)
incq %rcx
movslq 0x4a30c6c(%rip), %rsi   # 0x4a4bb3c
incl %ebx
addq $0x18, %rdx
cmpq %rsi, %rcx
jl 0x1ae82
movl (%rax), %ebx
subl %ebx, %esi
addl $0x2, %esi
movl %esi, 0x4a30c54(%rip)   # 0x4a4bb3c
xorl %edi, %edi
cmpq $0x0, 0x4a30c3e(%rip)   # 0x4a4bb30
sete %dil
movl $0x2, %esi
callq 0xa655
movl 0x4a30c36(%rip), %eax   # 0x4a4bb3c
cmpl $0x1c, %eax
jg 0x1aa18
jmp 0x1b0d5
movl $0x1c, %ebx
cmpl $0x1a, %r13d
jg 0x1ae24
subl %r15d, %eax
cmpl $0x1d, %eax
jge 0x1ae24
leal 0x1(%r13), %ebx
movq %rbp, %rax
addq $0x2c, %rax
movl %ebx, 0x2c(%rbp)
testl %r13d, %r13d
jns 0x1ae2e
jmp 0x1ae64
movq %rax, %rsi
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movl $0x4b8, %edx            # imm = 0x4B8
movq %r14, %rdi
movq %rsi, 0x8(%rsp)
callq 0x4260
xorl %esi, %esi
movslq 0x4a30bcb(%rip), %rcx   # 0x4a4bb3c
cmpq %rcx, %rsi
jge 0x1b090
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 0x30(%rsp), %rdx
leaq 0x28(%rsp), %rcx
callq 0x1b14b
movq %rax, %rdx
addq $0x48, %rdx
movsd 0x30(%rsp), %xmm1
addsd 0x54be(%rip), %xmm1     # 0x20480
movq (%rdx), %rcx
movsd (%rcx), %xmm0
leaq 0x10(%rcx), %rdx
ucomisd %xmm0, %xmm1
ja 0x1afc2
movsd 0x28(%rsp), %xmm1
addsd 0x54bf(%rip), %xmm1     # 0x204a0
ucomisd %xmm0, %xmm1
movq %r13, %rsi
jbe 0x1af6a
incl 0x3a30abc(%rip)         # 0x3a4baac
movl 0x4a30b46(%rip), %edx   # 0x4a4bb3c
cmpl %ebx, %edx
jle 0x1b033
movslq %edx, %rdx
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 0x1b00c
movsd (%rcx), %xmm0
movl 0x4a30b09(%rip), %edx   # 0x4a4bb3c
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)
leal 0x1(%rdx), %eax
movl %eax, 0x4a30ac7(%rip)   # 0x4a4bb3c
xorl %edi, %edi
cmpl $0x2a7, %edx            # imm = 0x2A7
setl %dil
movl $0x15, %esi
callq 0xa655
jmp 0x1af68
cmpl $0x1c, %ecx
jg 0x1b0ac
movl $0x4b8, %edx            # imm = 0x4B8
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4260
jmp 0x1b0ee
xorl %edi, %edi
cmpq $0x0, 0x4a30a7a(%rip)   # 0x4a4bb30
sete %dil
movl $0x2, %esi
callq 0xa655
movl 0x4a30a72(%rip), %eax   # 0x4a4bb3c
xorl %ebp, %ebp
cmpl $0x1d, %eax
jge 0x1aa18
movl $0x4b8, %edx            # imm = 0x4B8
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4260
movq %rbp, 0x20(%rbx)
movq 0x4a30a0b(%rip), %rax   # 0x4a4bb00
movq %rax, (%rbx)
movq %rbx, 0x4a30a01(%rip)   # 0x4a4bb00
movq 0x18(%rsp), %rax
testq %rax, %rax
jne 0x1af4b
movq %rbx, %rax
movq 0x10(%rsp), %rbx
movq %rax, 0x98(%rbx)
movq 0x88(%rbx), %rdi
callq 0x1a9c5
movq 0x90(%rbx), %rbx
cmpl $-0x1, 0x80(%rbx)
jne 0x1a9f1
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq