// File: /workspace/github_c_makefile_star2_O0/johsteffens[P]beth/lib/bcore/bcore_name_manager.c
// Function: bcore_name_check_collision_sn
er_t bcore_name_check_collision_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 )
    {
        return bcore_error_push_fa( TYPEOF_general_error, "Hash of '#<sc_t>' 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 );
    bcore_mutex_s_unlock( &hmap_s_g->mutex );

    if( node )
    {
        if( node->name_space != name_space || ( bcore_strcmp_n( name, n, node->name, bcore_strlen( node->name ) ) != 0 ) )
        {
            return bcore_error_push_fa( TYPEOF_general_error, "'#<sc_t>' collides with '#<sc_t>' at key value '#<tp_t>'", cat_name_ns_n( name_space, name, n )->sc, cat_name_ns( node->name_space, node->name )->sc, key );
        }
    }
    else
    {
        if( name_space && !bcore_name_map_s_exists( &hmap_s_g->map, name_space ) )
        {
            return bcore_error_push_fa( TYPEOF_general_error, "Namespace '#<tp_t>' not found", name_space );
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xc1420
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xc12e6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xc1000
movq 0x8(%rax), %rdx
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
leaq 0x8fd7d(%rip), %rsi     # 0x151053
movb $0x0, %al
callq 0x9e090
movq %rax, -0x8(%rbp)
jmp 0xc1416
movq 0xf104b(%rip), %rdi     # 0x1b2338
addq $0x30, %rdi
callq 0x10fc20
movq 0xf103b(%rip), %rdi     # 0x1b2338
movq -0x28(%rbp), %rsi
callq 0x131550
movq %rax, -0x30(%rbp)
movq 0xf1027(%rip), %rdi     # 0x1b2338
addq $0x30, %rdi
callq 0x10fc70
cmpq $0x0, -0x30(%rbp)
je 0xc13cf
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xc1375
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x9d770
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq %rax, %rcx
callq 0x9d730
cmpl $0x0, %eax
je 0xc13cd
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xc1000
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xc10b0
movq -0x50(%rbp), %rdx
movq 0x8(%rax), %rcx
movq -0x28(%rbp), %r8
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
leaq 0x8fcc8(%rip), %rsi     # 0x151088
movb $0x0, %al
callq 0x9e090
movq %rax, -0x8(%rbp)
jmp 0xc1416
jmp 0xc140e
cmpq $0x0, -0x10(%rbp)
je 0xc140c
movq 0xf0f5b(%rip), %rdi     # 0x1b2338
movq -0x10(%rbp), %rsi
callq 0x131640
testb $0x1, %al
jne 0xc140c
movq -0x10(%rbp), %rdx
movabsq $0x4d9e984c5b21faea, %rdi # imm = 0x4D9E984C5B21FAEA
leaq 0x8fcc2(%rip), %rsi     # 0x1510c1
movb $0x0, %al
callq 0x9e090
movq %rax, -0x8(%rbp)
jmp 0xc1416
jmp 0xc140e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq