// File: /workspace/github_cpp_makefile_star2_O2/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 $0xd8, %rsp
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x250(%r14), %r12
addq $0x260, %r14            # imm = 0x260
movq %rsi, 0x38(%rsp)
leal 0x1(%rsi), %eax
movl %eax, 0xc(%rsp)
leaq 0x40(%rsp), %r13
andl $0x0, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movw $0xb, 0x34(%rsp)
movb $0x0, 0x36(%rsp)
movq (%r12), %rax
movq %r13, %r15
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq *0x10(%rax)
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %rax
leaq 0x50(%rsp), %rsi
movq 0x10(%rsi), %rdx
movq %rdx, 0x30(%rsp)
movups (%rsi), %xmm0
movaps %xmm0, 0x20(%rsp)
movb 0x34(%rsp), %r13b
cmpb $0x10, %r13b
je 0x17342
movq %rcx, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movw $0x10c, 0x1c(%rsp)      # imm = 0x10C
movb $0x0, 0x1e(%rsp)
movl %r13d, %eax
andb $-0x2, %al
cmpb $0xe, %al
jne 0x17325
cmpl $0x80, 0x38(%rsp)
jge 0x17358
movq (%rbx), %rbp
movq (%rbp), %rdi
callq 0x12af0
movq %rax, 0x40(%rsp)
addq $0x8, %rax
movq %rax, 0x48(%rsp)
leaq 0x50(%rsp), %rcx
movq %rcx, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
andq $0x0, 0x60(%rsp)
movq %rax, 0x68(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, 0x78(%rsp)
movq %rax, 0x70(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rcx)
movb %r13b, 0x90(%rsp)
movb $0x1, 0x91(%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
movq %r15, %r13
movq %r15, %rdx
leaq 0x10(%rsp), %rcx
callq 0x11700
movq %rax, %rbp
movq %r13, %rdi
callq 0x12c70
addq $0x8, %rbp
movq %rbp, %rdi
movl 0xc(%rsp), %esi
callq 0x12040
jmp 0x1720a
movq (%rbx), %rdi
movq %rbx, %rsi
leaq 0x20(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x12b00
movq %r15, %r13
jmp 0x1720a
movb $0x1, 0x51(%rbx)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x28
popq %rdi
callq 0x115e0
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
movl $0x80, %esi
callq 0x12290
leaq 0xa134(%rip), %rsi      # 0x214b0
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x128a0
leaq 0xa149(%rip), %rdx      # 0x214e1
leaq 0x40(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x11250
movb $0x1, %bpl
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x11300
xorl %ebp, %ebp
movq 0x14c25(%rip), %rsi     # 0x2bfe8
movq 0x14b7e(%rip), %rdx     # 0x2bf48
movq %rbx, %rdi
callq 0x12920
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x12cd8
jmp 0x173e7
movq %rax, %r14
movb $0x1, %bpl
leaq 0xb8(%rsp), %rdi
callq 0x12cd8
jmp 0x173fc
movq %rax, %r14
movb $0x1, %bpl
leaq 0x98(%rsp), %rdi
callq 0x12cd8
testb %bpl, %bpl
jne 0x17413
jmp 0x1742a
movq %rax, %r14
movq %rbx, %rdi
callq 0x119b0
jmp 0x1742a
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x12c70
movq %r14, %rdi
callq 0x12990