// File: pstuifzand[P]magento-tools/src/magento-config.cpp
// Function: root_start_element_handler(void*, char const*, char const**)
void root_start_element_handler(void* udata, const XML_Char* name, const XML_Char** atts) {
    user_data* data = (user_data*)udata;
    switch (data->state) {
        case State::ROOT:
            if (strcmp(name, "config") == 0) data->state = State::IN_CONFIG;
            break;
        case State::IN_CONFIG:
            if (strcmp(name, "sections") == 0) data->state = State::IN_SECTIONS;
            break;
        case State::IN_SECTIONS:
            data->state = State::IN_SECTION;
            data->section = name;
            break;
        case State::IN_SECTION:
            if (strcmp(name, "groups") == 0) data->state = State::IN_GROUPS;
            break;
        case State::IN_GROUPS:
            data->group = name;
            data->state = State::IN_GROUP;
            break;
        case State::IN_GROUP:
            if (strcmp(name, "fields") == 0) data->state = State::IN_FIELDS;
            break;
        case State::IN_FIELDS:
            data->field = name;
            data->state = State::IN_FIELD;
            std::stringstream ss;
            ss << data->section << "/" << data->group << "/" << data->field;
            data->names.push_back(ss.str());
            break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x1e0(%rbp)
subl $0x6, %eax
ja 0x2692
movq -0x1e0(%rbp), %rax
leaq 0x3b8d(%rip), %rcx      # 0x6004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
leaq 0x3c27(%rip), %rsi      # 0x60b2
callq 0x2270
cmpl $0x0, %eax
jne 0x249f
movq -0x20(%rbp), %rax
movl $0x2, (%rax)
jmp 0x2692
movq -0x10(%rbp), %rdi
leaq 0x3c0a(%rip), %rsi      # 0x60b9
callq 0x2270
cmpl $0x0, %eax
jne 0x24c3
movq -0x20(%rbp), %rax
movl $0x3, (%rax)
jmp 0x2692
movq -0x20(%rbp), %rax
movl $0x4, (%rax)
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
callq 0x2250
jmp 0x2692
movq -0x10(%rbp), %rdi
leaq 0x3bcf(%rip), %rsi      # 0x60c2
callq 0x2270
cmpl $0x0, %eax
jne 0x2507
movq -0x20(%rbp), %rax
movl $0x5, (%rax)
jmp 0x2692
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdi
addq $0x30, %rdi
callq 0x2250
movq -0x20(%rbp), %rax
movl $0x6, (%rax)
jmp 0x2692
movq -0x10(%rbp), %rdi
leaq 0x3b92(%rip), %rsi      # 0x60c9
callq 0x2270
cmpl $0x0, %eax
jne 0x254b
movq -0x20(%rbp), %rax
movl $0x7, (%rax)
jmp 0x2692
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
callq 0x2250
movq -0x20(%rbp), %rax
movl $0x8, (%rax)
leaq -0x1a8(%rbp), %rdi
callq 0x2110
leaq -0x198(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x10, %rsi
callq 0x2170
movq %rax, -0x1e8(%rbp)
jmp 0x2594
movq -0x1e8(%rbp), %rdi
leaq 0x3b2e(%rip), %rsi      # 0x60d0
callq 0x21a0
movq %rax, -0x1f0(%rbp)
jmp 0x25b0
movq -0x1f0(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x30, %rsi
callq 0x2170
movq %rax, -0x1f8(%rbp)
jmp 0x25cd
movq -0x1f8(%rbp), %rdi
leaq 0x3af5(%rip), %rsi      # 0x60d0
callq 0x21a0
movq %rax, -0x200(%rbp)
jmp 0x25e9
movq -0x200(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x50, %rsi
callq 0x2170
jmp 0x25ff
movq -0x20(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x208(%rbp)
leaq -0x1d8(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x2190
jmp 0x2623
movq -0x208(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x2d20
jmp 0x2638
leaq -0x1d8(%rbp), %rdi
callq 0x20f0
leaq -0x1a8(%rbp), %rdi
callq 0x2130
jmp 0x2692
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b0(%rbp)
movl %eax, -0x1b4(%rbp)
jmp 0x2684
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b0(%rbp)
movl %eax, -0x1b4(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x20f0
leaq -0x1a8(%rbp), %rdi
callq 0x2130
jmp 0x269b
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq -0x1b0(%rbp), %rdi
callq 0x22b0
nopw (%rax,%rax)