// File: /workspace/github_cpp_makefile_star2_O1/night-shift[P]Srl/src/lib/Node.cpp
// Function: Srl::Node::read_source(int)
void Node::read_source(int scope_depth)
{
    auto& parser = *this->env->parser;
    auto& source = this->env->in;

    while(true) {

        MemBlock seg_name; Value val;
        tie(seg_name, val) = parser.read(source);

        if(val.type() == Type::Scope_End) {
            this->parsed = true;
            break;
        }

        auto field_name = String(seg_name, Encoding::UTF8);

        if(!TpTools::is_scope(val.type())) {
            this->env->store_value(*this, val, field_name);

        } else {

            if(scope_depth + 1 > MAX_SAFE_NESTED_SCOPE_DEPTH) {
                throw Exception("Abort parsing data MAX_SAFE_NESTED_SCOPE_DEPTH [" + to_string(MAX_SAFE_NESTED_SCOPE_DEPTH) + "] exceeded");
            }

            auto* link = this->env->store_node(*this, Node(this->env->tree, val.type()), field_name);

            link->field.read_source(scope_depth + 1);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %r14
movq (%rdi), %r12
movq 0x250(%r12), %rbp
addq $0x260, %r12            # imm = 0x260
leaq 0x48(%rsp), %r15
movq %rsi, 0xa0(%rsp)
leal 0x1(%rsi), %eax
movl %eax, 0xc(%rsp)
leaq 0x68(%rsp), %r13
movq %r12, 0x98(%rsp)
movq %rbp, 0x90(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movl $0x0, 0x30(%rsp)
movw $0xb, 0x34(%rsp)
movb $0x0, 0x36(%rsp)
movq (%rbp), %rax
leaq 0x38(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq *0x10(%rax)
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rax
movq 0x10(%r15), %rdx
movq %rdx, 0x30(%rsp)
movups (%r15), %xmm0
movaps %xmm0, 0x20(%rsp)
movb 0x34(%rsp), %bl
cmpb $0x10, %bl
jne 0x113f0
movb $0x1, 0x51(%r14)
jmp 0x114f5
movq %rcx, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movw $0x10c, 0x1c(%rsp)      # imm = 0x10C
movb $0x0, 0x1e(%rsp)
movl %ebx, %eax
andb $-0x2, %al
cmpb $0xe, %al
jne 0x114b1
cmpl $0x80, 0xa0(%rsp)
jge 0x11510
movq (%r14), %rbp
movq (%rbp), %rdi
callq 0xbf80
movq %rax, 0x38(%rsp)
addq $0x8, %rax
movq %rax, 0x40(%rsp)
movq %r15, 0x50(%rsp)
movq %r15, 0x48(%rsp)
movq $0x0, 0x58(%rsp)
movq %rax, 0x60(%rsp)
movq %r13, 0x70(%rsp)
movq %r13, 0x68(%rsp)
movq %r14, %rsi
movq %r15, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r15)
movb %bl, 0x88(%rsp)
movb $0x1, 0x89(%rsp)
movq %rbp, %rdi
leaq 0x38(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0xb470
movq %rax, %rbp
movq 0x68(%rsp), %r15
cmpq %r13, %r15
je 0x114c8
movq %r15, %rsi
movq (%r15), %r15
movq 0x60(%rsp), %rdi
movl $0x30, %edx
callq 0xb3c0
jmp 0x11495
movq (%r14), %rdi
movq %r14, %rsi
leaq 0x20(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0xbf90
jmp 0x114f5
leaq 0x40(%rsp), %rdi
callq 0xbab0
addq $0x8, %rbp
movq %rbp, %rdi
movl 0xc(%rsp), %esi
callq 0xb9f0
movq %r12, %r15
movq 0x98(%rsp), %r12
movq 0x90(%rsp), %rbp
cmpb $0x10, %bl
jne 0x11393
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %r12
movl $0x28, %edi
callq 0xb3b0
movq %rax, %r15
leaq 0xa8(%rsp), %rdi
movl $0x80, %esi
callq 0xbb50
leaq 0xdf37(%rip), %rsi      # 0x1f470
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0xbe10
leaq 0xdf4c(%rip), %rsi      # 0x1f4a1
leaq 0xc8(%rsp), %rdi
callq 0xc000
movq %r12, 0x38(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x11580
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x1158d
movq %rdx, 0x38(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x48(%rsp)
movq 0x8(%rax), %rdx
leaq 0x38(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bl
movq %r15, %rdi
callq 0xb1d0
xorl %ebx, %ebx
movq 0x16a2c(%rip), %rsi     # 0x27fe8
movq 0x16985(%rip), %rdx     # 0x27f48
movq %r15, %rdi
callq 0xbe60
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x115ec
movq 0x48(%rsp), %rsi
incq %rsi
callq 0xb940
jmp 0x115ec
movq %rax, %r14
movb $0x1, %bl
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11614
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0xb940
jmp 0x11614
movq %rax, %r14
movb $0x1, %bl
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1163c
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0xb940
jmp 0x1163c
movq %rax, %r14
movb $0x1, %bl
testb %bl, %bl
je 0x11657
movq %r15, %rdi
callq 0xb610
jmp 0x11657
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0xc020
movq %r14, %rdi
callq 0xbe90
movq %rax, %rdi
callq 0xf080
nop