// File: /workspace/github_cpp_makefile_star2_O1/Heptagon196[P]Gos/GosVM.cpp
// Function: GosVM::VMProgram::WriteCommandDefFunc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
std::function<void(int)> GosVM::VMProgram::WriteCommandDefFunc(const std::string& name, const std::string& retType, const std::vector<std::string>& paramTypes) {
    AddOperation(DEF_MEMBER_FUNC);
    AddParamString(name);
    AddParamString(retType);
    int len = paramTypes.size();
    AddParamInt(len);
    for (int i = 0; i < len; i++) {
        AddParamString(paramTypes[i]);
    }
    int pos = content.size();
    AddParamInt(0);
    int startJump = content.size();
    return [this, pos, startJump](int jmp) {
        *(int*)&content[pos] = jmp - startJump;
    };
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, %r13
movq %rdx, %rbp
movq %rsi, %r14
movq %rdi, %r12
leaq 0x20(%rsi), %r15
movq %r15, %rdi
movl $0x4, %esi
callq 0x6ed94
leaq 0x68(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rbp
movq %rbp, %rdi
callq 0x37586
movq %r14, %rdi
movq %rbp, %rsi
callq 0x94f28
movq 0x58(%rsp), %rdi
cmpq %rbx, %rdi
je 0x999c9
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x11360
leaq 0x48(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %r13
movq %r13, %rdi
callq 0x37586
movq %r14, %rdi
movq %r13, %rsi
callq 0x94f28
movq %r12, 0x10(%rsp)
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0x99a11
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x11360
movq 0x8(%rsp), %rax
movq 0x8(%rax), %r12
subq (%rax), %r12
shrq $0x5, %r12
movl $0xfffffff8, %ebp       # imm = 0xFFFFFFF8
addl $0x8, %ebp
movl %r12d, %eax
movl %ebp, %ecx
sarl %cl, %eax
movsbl %al, %esi
movq %r15, %rdi
callq 0x6ed94
cmpl $0x18, %ebp
jb 0x99a26
testl %r12d, %r12d
jle 0x99aa7
leaq 0x28(%rsp), %rbx
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movl $0x8, %ebp
leaq 0x18(%rsp), %r13
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rbx, 0x18(%rsp)
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x37586
movq %r14, %rdi
movq %r13, %rsi
callq 0x94f28
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x99a9e
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x11360
addq $0x20, %rbp
decq %r12
jne 0x99a5b
movq 0x28(%r14), %rbx
movl $0xfffffff8, %ebp       # imm = 0xFFFFFFF8
movq %r15, %rdi
xorl %esi, %esi
callq 0x6ed94
addl $0x8, %ebp
cmpl $0x18, %ebp
jb 0x99ab0
movl 0x28(%r14), %ecx
xorps %xmm0, %xmm0
movq 0x10(%rsp), %rax
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movq %r14, (%rax)
movl %ebx, 0x8(%rax)
movl %ecx, 0xc(%rax)
leaq 0x15e9(%rip), %rcx      # 0x9b0ce
movq %rcx, 0x18(%rax)
leaq 0x15f2(%rip), %rcx      # 0x9b0e2
movq %rcx, 0x10(%rax)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x38(%rsp), %rdi
jmp 0x99b1f
movq %rax, %r14
movq 0x58(%rsp), %rdi
jmp 0x99b1f
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x99b2f
movq (%rbx), %rsi
incq %rsi
callq 0x11360
movq %r14, %rdi
callq 0x11580
nop