// File: /workspace/github_cpp_makefile_star2_O3/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), %r15
movq 0x250(%r15), %r12
addq $0x260, %r15            # imm = 0x260
movq %rsi, 0x90(%rsp)
leal 0x1(%rsi), %eax
movl %eax, 0x4(%rsp)
leaq 0x48(%rsp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movl $0x0, 0x80(%rsp)
movw $0xb, 0x84(%rsp)
movb $0x0, 0x86(%rsp)
movq (%r12), %rax
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq *0x10(%rax)
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rax
leaq 0x28(%rsp), %rsi
movq 0x10(%rsi), %rdx
movq %rdx, 0x80(%rsp)
movups (%rsi), %xmm0
movaps %xmm0, 0x70(%rsp)
movb 0x84(%rsp), %r14b
cmpb $0x10, %r14b
je 0x114aa
movq %rcx, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movw $0x10c, 0x14(%rsp)      # imm = 0x10C
movb $0x0, 0x16(%rsp)
movl %r14d, %eax
andb $-0x2, %al
cmpb $0xe, %al
jne 0x11471
cmpl $0x80, 0x90(%rsp)
jge 0x114c0
movq (%rbx), %rbp
movq (%rbp), %rdi
callq 0xbf80
movq %rax, 0x18(%rsp)
addq $0x8, %rax
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rcx
movq %rcx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq $0x0, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq %r13, 0x50(%rsp)
movq %r13, 0x48(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rcx)
movb %r14b, 0x68(%rsp)
movb $0x1, 0x69(%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
leaq 0x18(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0xb470
movq %rax, %rbp
movq 0x48(%rsp), %r14
cmpq %r13, %r14
je 0x1148b
movq %r14, %rsi
movq (%r14), %r14
movq 0x40(%rsp), %rdi
movl $0x30, %edx
callq 0xb3c0
jmp 0x11455
movq (%rbx), %rdi
movq %rbx, %rsi
leaq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0xbf90
jmp 0x11347
leaq 0x20(%rsp), %rdi
callq 0xbab0
addq $0x8, %rbp
movq %rbp, %rdi
movl 0x4(%rsp), %esi
callq 0xb9f0
jmp 0x11347
movb $0x1, 0x51(%rbx)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x28, %edi
callq 0xb3b0
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
movl $0x80, %esi
callq 0xbb50
leaq 0xcf8a(%rip), %rsi      # 0x1e470
leaq 0xb8(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0xbe10
leaq 0xcf9f(%rip), %rsi      # 0x1e4a1
leaq 0xb8(%rsp), %rdi
callq 0xc000
leaq 0x28(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x11535
movups (%rcx), %xmm0
leaq 0x28(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x11542
movq %rdx, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
movq 0x8(%rax), %rdx
leaq 0x18(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %rbx, %rdi
callq 0xb1d0
xorl %ebp, %ebp
movq 0x15a76(%rip), %rsi     # 0x26fe8
movq 0x159cf(%rip), %rdx     # 0x26f48
movq %rbx, %rdi
callq 0xbe60
movq %rax, %r15
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x115a8
movq 0x28(%rsp), %rsi
incq %rsi
callq 0xb940
jmp 0x115a8
movq %rax, %r15
movb $0x1, %bpl
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x115c9
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0xb940
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x115ea
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0xb940
testb %bpl, %bpl
jne 0x1161a
jmp 0x11631
movq %rax, %r15
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1161a
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0xb940
jmp 0x1161a
movq %rax, %r15
movq %rbx, %rdi
callq 0xb610
jmp 0x11631
movq %rax, %r15
leaq 0x18(%rsp), %rdi
callq 0xc020
movq %r15, %rdi
callq 0xbe90
movq %rax, %rdi
callq 0xf059
nop