// File: /workspace/github_c_makefile_star2_O0/mijallen[P]SimpleHTTPServer/lib/libyaml/src/dumper.c
// Function: yaml_emitter_anchor_node
static void
yaml_emitter_anchor_node(yaml_emitter_t *emitter, int index)
{
    yaml_node_t *node = emitter->document->nodes.start + index - 1;
    yaml_node_item_t *item;
    yaml_node_pair_t *pair;

    emitter->anchors[index-1].references ++;

    if (emitter->anchors[index-1].references == 1) {
        switch (node->type) {
            case YAML_SEQUENCE_NODE:
                for (item = node->data.sequence.items.start;
                        item < node->data.sequence.items.top; item ++) {
                    yaml_emitter_anchor_node(emitter, *item);
                }
                break;
            case YAML_MAPPING_NODE:
                for (pair = node->data.mapping.pairs.start;
                        pair < node->data.mapping.pairs.top; pair ++) {
                    yaml_emitter_anchor_node(emitter, pair->key);
                    yaml_emitter_anchor_node(emitter, pair->value);
                }
                break;
            default:
                break;
        }
    }

    else if (emitter->anchors[index-1].references == 2) {
        emitter->anchors[index-1].anchor = (++ emitter->last_anchor_id);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x1a8(%rax), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
addq $-0x60, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x198(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x198(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0x2a1a9
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
subl $0x2, %eax
je 0x2a123
jmp 0x2a116
movl -0x2c(%rbp), %eax
subl $0x3, %eax
je 0x2a15c
jmp 0x2a1a5
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x2a15a
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movl (%rax), %esi
callq 0x2a090
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
jmp 0x2a12f
jmp 0x2a1a7
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x2a1a3
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl (%rax), %esi
callq 0x2a090
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x2a090
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
jmp 0x2a168
jmp 0x2a1a7
jmp 0x2a1a7
jmp 0x2a1fc
movq -0x8(%rbp), %rax
movq 0x198(%rax), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
cmpl $0x2, (%rax)
jne 0x2a1fa
movq -0x8(%rbp), %rax
movl 0x1a0(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x1a0(%rax)
movq -0x8(%rbp), %rax
movq 0x198(%rax), %rax
movl -0xc(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
jmp 0x2a1fc
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)