// File: /workspace/github_c_makefile_star2_O3/c-zhou[P]yahs/sdict.c
// Function: asm_put
uint32_t asm_put(asm_dict_t *d, const char *name, uint64_t len, uint64_t gap, uint32_t n, uint32_t s, uint32_t gn, 
        uint32_t *gs, uint32_t *gsize, uint32_t *gcomp, uint32_t *gtype, uint32_t *glink, uint32_t *gevid)
{
    if (!name) 
        return UINT32_MAX;
    sdhash_t *h;
    khint_t k;
    int absent;

    h = d->h;
    k = kh_put(sdict, h, name, &absent);
    if (absent) {
        sd_aseq_t *a;
        if (d->n == d->m) {
            d->m = d->m? d->m<<1 : 16;
            d->s = (sd_aseq_t *) realloc(d->s, d->m * sizeof(sd_aseq_t));
        }
        a = &d->s[d->n];
        a->len = len;
        a->gap = gap;
        a->n = n;
        a->s = s;
        a->gn = gn;
        a->gs = memcpy1(gs, sizeof(uint32_t) * gn);
        a->gsize = memcpy1(gsize, sizeof(uint32_t) * gn);
        a->gcomp = memcpy1(gcomp, sizeof(uint32_t) * gn);
        a->gtype = memcpy1(gtype, sizeof(uint32_t) * gn);
        a->glink = memcpy1(glink, sizeof(uint32_t) * gn);
        a->gevid = memcpy1(gevid, sizeof(uint32_t) * gn);
        kh_key(h, k) = a->name = strdup(name);
        kh_val(h, k) = d->n++;
    }
    return kh_val(h, k);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rsi, %rsi
je 0x5027
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
movl %r8d, 0xc(%rsp)
movl %r9d, 0x10(%rsp)
movq 0x10(%rdi), %rbp
leaq 0x24(%rsp), %r12
movq %rbp, %rdi
movq %r12, %rdx
callq 0x457d
cmpl $0x0, (%r12)
je 0x5032
movl 0x60(%rsp), %edi
movl (%rbx), %r12d
cmpl 0x4(%rbx), %r12d
movq %rbp, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jne 0x5041
leal (%r12,%r12), %eax
testl %r12d, %r12d
movl $0x10, %ecx
cmovnel %eax, %ecx
movl %ecx, 0x4(%rbx)
movl %edi, %ebp
movq 0x8(%rbx), %rdi
imulq $0x58, %rcx, %rsi
callq 0x2290
movl %ebp, %edi
movq %rax, 0x8(%rbx)
movl (%rbx), %r12d
jmp 0x5045
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x5184
movq 0x20(%rbp), %rdx
movl %eax, %ecx
movl (%rdx,%rcx,4), %r12d
jmp 0x5184
movq 0x8(%rbx), %rax
movl 0x10(%rsp), %edx
movl 0xc(%rsp), %esi
movl %r12d, %ecx
imulq $0x58, %rcx, %rcx
leaq (%rax,%rcx), %rbp
movq %r13, 0x8(%rax,%rcx)
movq %r14, 0x10(%rax,%rcx)
movl %esi, 0x18(%rax,%rcx)
movl %edx, 0x1c(%rax,%rcx)
movl %edi, 0x20(%rax,%rcx)
testl %edi, %edi
je 0x513e
movl %edi, %r13d
shlq $0x2, %r13
movq %r13, %rdi
callq 0x2250
movq %rax, %r14
movq %rax, %rdi
movq 0x68(%rsp), %rsi
movq %r13, %rdx
callq 0x2220
movq %r14, 0x28(%rbp)
movq %r13, %rdi
callq 0x2250
movq %rax, %r14
movq %rax, %rdi
movq 0x70(%rsp), %rsi
movq %r13, %rdx
callq 0x2220
movq %r14, 0x30(%rbp)
movq %r13, %rdi
callq 0x2250
movq %rax, %r14
movq %rax, %rdi
movq 0x78(%rsp), %rsi
movq %r13, %rdx
callq 0x2220
movq %r14, 0x38(%rbp)
movq %r13, %rdi
callq 0x2250
movq %rax, %r14
movq %rax, %rdi
movq 0x80(%rsp), %rsi
movq %r13, %rdx
callq 0x2220
movq %r14, 0x40(%rbp)
movq %r13, %rdi
callq 0x2250
movq %rax, %r14
movq %rax, %rdi
movq 0x88(%rsp), %rsi
movq %r13, %rdx
callq 0x2220
movq %r14, 0x48(%rbp)
movq %r13, %rdi
callq 0x2250
movq %rax, %r14
movq %rax, %rdi
movq 0x90(%rsp), %rsi
movq %r13, %rdx
callq 0x2220
jmp 0x5154
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbp)
movups %xmm0, 0x28(%rbp)
movq $0x0, 0x48(%rbp)
xorl %r14d, %r14d
movq %r14, 0x50(%rbp)
movq %r15, %rdi
callq 0x23b0
movq %rax, (%rbp)
movq 0x18(%rsp), %rsi
movq 0x18(%rsi), %rcx
movl 0x14(%rsp), %edx
movq %rax, (%rcx,%rdx,8)
leal 0x1(%r12), %eax
movl %eax, (%rbx)
movq 0x20(%rsi), %rax
movl %r12d, (%rax,%rdx,4)
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq