// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_name_manager.c
// Function: bcore_name_enroll_sn
tp_t bcore_name_enroll_sn( tp_t name_space, sc_t name, uz_t n )
{
    assert( hmap_s_g != NULL );
    tp_t key = bcore_name_key_ns_n( name_space, name, n );
    if( key == 0 ) ERR( "Hash of '%s' is zero. Zero is a reserved value.", cat_name_ns_n( name_space, name, n )->sc );
    bcore_mutex_s_lock( &hmap_s_g->mutex );
    bcore_name_s* node = bcore_name_map_s_get( &hmap_s_g->map, key );
    if( node )
    {
        if( node->name_space != name_space || ( bcore_strcmp_n( name, n, node->name, bcore_strlen( node->name ) ) != 0 ) )
        {
            bcore_mutex_s_unlock( &hmap_s_g->mutex );
            ERR( "'%s' collides with '%s' at %"PRItp_t"", cat_name_ns_n( name_space, name, n )->sc, cat_name_ns( node->name_space, node->name )->sc, key );
            bcore_mutex_s_lock( &hmap_s_g->mutex );
        }
    }
    else
    {
        if( name_space && !bcore_name_map_s_exists( &hmap_s_g->map, name_space ) ) ERR( "Namespace %"PRItp_t" not found", name_space );
        bcore_name_map_s_set( &hmap_s_g->map, bcore_name_ns_sc_n( name_space, name, n ) );
    }
    bcore_mutex_s_unlock( &hmap_s_g->mutex );
    return key;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xc1420
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xc1599
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xc1000
movq 0x8(%rax), %r8
leaq 0x8fb60(%rip), %rdi     # 0x1510df
leaq 0x8fa8d(%rip), %rsi     # 0x151013
movl $0xe3, %edx
leaq 0x8fb62(%rip), %rcx     # 0x1510f4
movb $0x0, %al
callq 0x9cf40
movq 0xf0d98(%rip), %rdi     # 0x1b2338
addq $0x30, %rdi
callq 0x10fc20
movq 0xf0d88(%rip), %rdi     # 0x1b2338
movq -0x20(%rbp), %rsi
callq 0x131550
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xc169c
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x8(%rbp), %rax
jne 0xc1618
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x9d770
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rax, %rcx
callq 0x9d730
cmpl $0x0, %eax
je 0xc1697
movq 0xf0d19(%rip), %rdi     # 0x1b2338
addq $0x30, %rdi
callq 0x10fc70
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xc1000
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xc10b0
movq -0x60(%rbp), %r8
movq 0x8(%rax), %r9
movq -0x20(%rbp), %rax
leaq 0x8fa76(%rip), %rdi     # 0x1510df
leaq 0x8f9a3(%rip), %rsi     # 0x151013
movl $0xeb, %edx
leaq 0x8faa8(%rip), %rcx     # 0x151124
movq %rax, (%rsp)
movb $0x0, %al
callq 0x9cf40
movq 0xf0caa(%rip), %rdi     # 0x1b2338
addq $0x30, %rdi
callq 0x10fc20
jmp 0xc1722
cmpq $0x0, -0x8(%rbp)
je 0xc16dc
movq 0xf0c8e(%rip), %rdi     # 0x1b2338
movq -0x8(%rbp), %rsi
callq 0x131640
testb $0x1, %al
jne 0xc16dc
movq -0x8(%rbp), %r8
leaq 0x8fa1d(%rip), %rdi     # 0x1510df
leaq 0x8f94a(%rip), %rsi     # 0x151013
movl $0xf1, %edx
leaq 0x8fa6e(%rip), %rcx     # 0x151143
movb $0x0, %al
callq 0x9cf40
movq 0xf0c55(%rip), %rax     # 0x1b2338
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x40(%rbp), %rdi
callq 0x130bc0
movq -0x68(%rbp), %rdi
leaq -0x40(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x1315b0
movq 0xf0c0f(%rip), %rdi     # 0x1b2338
addq $0x30, %rdi
callq 0x10fc70
movq -0x20(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nop