// File: qian-jiahong[P]uvncrep017-ws/iniparser.cpp
// Function: iniparser_dump_ini
void iniparser_dump_ini(dictionary * d, FILE * f)
{
    int     i, j ;
    char    keym[ASCIILINESZ+1];
    int     nsec ;
    char *  secname ;
    int     seclen ;

    if (d==NULL || f==NULL) return ;

    nsec = iniparser_getnsec(d);
    if (nsec<1) {
        /* No section in file: dump all keys as they are */
        for (i=0 ; i<d->size ; i++) {
            if (d->key[i]==NULL)
                continue ;
            fprintf(f, "%s = %s\n", d->key[i], d->val[i]);
        }
        return ;
    }
    for (i=0 ; i<nsec ; i++) {
        secname = iniparser_getsecname(d, i) ;
        seclen  = (int)strlen(secname);
        fprintf(f, "\n[%s]\n", secname);
        snprintf(keym, ASCIILINESZ+1, "%s:", secname);
        for (j=0 ; j<d->size ; j++) {
            if (d->key[j]==NULL)
                continue ;
            if (!strncmp(d->key[j], keym, seclen+1)) {
                fprintf(f,
                        "%-30s = %s\n",
                        d->key[j]+seclen+1,
                        d->val[j] ? d->val[j] : "");
            }
        }
    }
    fprintf(f, "\n");
    return ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x7a21
cmpq $0x0, -0x10(%rbp)
jne 0x7a26
jmp 0x7c3e
movq -0x8(%rbp), %rdi
callq 0x77a0
movl %eax, -0x424(%rbp)
cmpl $0x1, -0x424(%rbp)
jge 0x7aa8
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x7aa3
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x7a66
jmp 0x7a98
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0x4871(%rip), %rsi      # 0xc302
movb $0x0, %al
callq 0x22d0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7a45
jmp 0x7c3e
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x424(%rbp), %eax
jge 0x7c2c
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x7830
movq %rax, -0x430(%rbp)
movq -0x430(%rbp), %rdi
callq 0x20e0
movl %eax, -0x434(%rbp)
movq -0x10(%rbp), %rdi
movq -0x430(%rbp), %rdx
leaq 0x4816(%rip), %rsi      # 0xc30b
movb $0x0, %al
callq 0x22d0
leaq -0x420(%rbp), %rdi
movq -0x430(%rbp), %rcx
movl $0x401, %esi            # imm = 0x401
leaq 0x47fc(%rip), %rdx      # 0xc312
movb $0x0, %al
callq 0x2320
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x7c1c
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x18(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x7b4c
jmp 0x7c0e
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq -0x420(%rbp), %rsi
movl -0x434(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdx
callq 0x2100
cmpl $0x0, %eax
jne 0x7c0c
movq -0x10(%rbp), %rax
movq %rax, -0x448(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x434(%rbp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x440(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x7bd9
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x450(%rbp)
jmp 0x7be9
leaq 0x39fa(%rip), %rax      # 0xb5da
movq %rax, -0x450(%rbp)
jmp 0x7be9
movq -0x440(%rbp), %rdx
movq -0x448(%rbp), %rdi
movq -0x450(%rbp), %rcx
leaq 0x4711(%rip), %rsi      # 0xc316
movb $0x0, %al
callq 0x22d0
jmp 0x7c0e
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7b24
jmp 0x7c1e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7aaf
movq -0x10(%rbp), %rdi
leaq 0x39a2(%rip), %rsi      # 0xb5d9
movb $0x0, %al
callq 0x22d0
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
nopw (%rax,%rax)