// File: /workspace/github_cpp_makefile_star2_O2/margual56[P]Markdown-CLI/src/Component.cpp
// Function: Component::render[abi:cxx11]()
std::string Component::render(){
    std::string tmp = ""; 
    
    if(!type.empty())                       // If the component has a tag assigned,
        tmp += "<" + this->type + ">\n";    // open the tag

    if(this->content.after == NULL && !this->content.text.empty())     // If the text's "after" is NULL, it means that the text should be rendered first
        tmp += this->content.text + "\n";

    for(Component *c: this->children){   // For each subcomponent,
        tmp += c->render() + "\n";              // render it

        if(this->content.after == c){  // and then check if the text goes after it
            tmp += this->content.text + "\n";  // (if it does, render the text)
        }
    }
    
    if(!type.empty())                       // If the component has a tag assigned,
        tmp += "</" + this->type + ">\n";    // close the tag

    return tmp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r13
leaq 0xeb08(%rip), %rsi      # 0x133d9
leaq -0x50(%rbp), %rdx
movq %rdi, -0x30(%rbp)
callq 0x4af4
cmpq $0x0, 0x8(%r13)
je 0x492b
leaq 0xe718(%rip), %rsi      # 0x13004
leaq -0x78(%rbp), %rdi
movq %r13, %rdx
callq 0x4b58
leaq 0xe707(%rip), %rdx      # 0x13006
leaq -0x50(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x4b2f
leaq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x4570
leaq -0x50(%rbp), %rdi
callq 0x41a0
leaq -0x78(%rbp), %rdi
callq 0x41a0
leaq 0x20(%r13), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, 0x40(%r13)
jne 0x496b
cmpq $0x0, 0x28(%r13)
je 0x496b
leaq 0xea90(%rip), %rdx      # 0x133d8
leaq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x4bce
leaq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x4570
leaq -0x50(%rbp), %rdi
callq 0x41a0
leaq 0x50(%r13), %r14
leaq -0x78(%rbp), %r12
leaq -0x50(%rbp), %r15
movq %r14, -0x80(%rbp)
movq (%r14), %r14
cmpq -0x80(%rbp), %r14
je 0x49f0
movq 0x10(%r14), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x48b6
movq %r15, %rdi
movq %r12, %rsi
leaq 0xea38(%rip), %rdx      # 0x133d8
callq 0x4b2f
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x4570
movq %r15, %rdi
callq 0x41a0
movq %r12, %rdi
callq 0x41a0
cmpq %rbx, 0x40(%r13)
jne 0x497b
movq %r15, %rdi
movq -0x58(%rbp), %rsi
leaq 0xea03(%rip), %rdx      # 0x133d8
callq 0x4bce
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x4570
movq %r15, %rdi
callq 0x41a0
jmp 0x497b
cmpq $0x0, 0x8(%r13)
je 0x4a3d
leaq 0xe60b(%rip), %rsi      # 0x13009
leaq -0x78(%rbp), %rdi
movq %r13, %rdx
callq 0x4b58
leaq 0xe5f5(%rip), %rdx      # 0x13006
leaq -0x50(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x4b2f
leaq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x4570
leaq -0x50(%rbp), %rdi
callq 0x41a0
leaq -0x78(%rbp), %rdi
callq 0x41a0
movq -0x30(%rbp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4a62
jmp 0x4a6b
jmp 0x4a75
jmp 0x4a70
jmp 0x4a6b
jmp 0x4a75
jmp 0x4a70
jmp 0x4a6b
jmp 0x4a6b
movq %rax, %r14
leaq -0x50(%rbp), %rdi
jmp 0x4a85
movq %rax, %r14
jmp 0x4a8a
movq %rax, %r14
jmp 0x4a81
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x41a0
leaq -0x78(%rbp), %rdi
callq 0x41a0
movq -0x30(%rbp), %rdi
callq 0x41a0
movq %r14, %rdi
callq 0x44f0
nop