// File: /workspace/github_c_makefile_star2_O1/johsteffens[P]beth/lib/bcore/bcore_tbman.c
// Function: block_manager_s_alloc
static vd_t block_manager_s_alloc( block_manager_s* o )
{
    if( o->free_index == o->size ) block_manager_s_acquire_token_manager( o );
    token_manager_s* child = o->data[ o->free_index ];
    vd_t ret = token_manager_s_alloc( child );
    if( token_manager_s_is_full( child ) ) o->free_index++;
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %rax
cmpq %rax, 0x30(%rdi)
jne 0x11f075
movq 0x28(%rbx), %rcx
cmpq %rcx, %rax
jne 0x11ee4b
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
movl $0x1, %esi
cmovneq %rax, %rsi
movq %rsi, 0x28(%rbx)
movq 0x18(%rbx), %rdi
shlq $0x3, %rsi
testq %rdi, %rdi
je 0x11ee11
callq 0xd3e0
jmp 0x11ee19
movq %rsi, %rdi
callq 0xd160
movq %rax, 0x18(%rbx)
testq %rax, %rax
jne 0x11ee4b
movq 0x28(%rbx), %r8
shlq $0x3, %r8
leaq 0x39453(%rip), %rdi     # 0x158284
leaq 0x38e5d(%rip), %rsi     # 0x157c95
leaq 0x38e64(%rip), %rcx     # 0x157ca3
movl $0x359, %edx            # imm = 0x359
xorl %eax, %eax
callq 0xc80f6
movq (%rbx), %r14
movq 0x8(%rbx), %rbp
movb 0x10(%rbx), %r13b
movq 0x60(%rbx), %rax
movq %rax, 0x10(%rsp)
movq 0x68(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq -0x1(%r14), %rax
movq %rax, (%rsp)
testq %rax, %r14
je 0x11ee99
leaq 0x39450(%rip), %rdi     # 0x1582cc
leaq 0x38e12(%rip), %rsi     # 0x157c95
leaq 0x39459(%rip), %rcx     # 0x1582e3
movl $0x10c, %edx            # imm = 0x10C
movq %r14, %r8
xorl %eax, %eax
callq 0xc80f6
movq %r14, %rax
xorl %edx, %edx
divq %rbp
movq %rax, %r15
cmpq $0x10001, %rax          # imm = 0x10001
jb 0x11eed0
leaq 0x39419(%rip), %rdi     # 0x1582cc
leaq 0x38ddb(%rip), %rsi     # 0x157c95
leaq 0x39446(%rip), %rcx     # 0x158307
movl $0x10e, %edx            # imm = 0x10E
movq %r15, %r8
xorl %eax, %eax
callq 0xc80f6
leaq 0x48(,%r15,2), %rax
xorl %edx, %edx
divq %rbp
movq %rax, %r12
cmpq $0x1, %rdx
sbbq $-0x1, %r12
leaq 0x1(%r12), %rax
cmpq %rax, %r15
jae 0x11ef16
leaq 0x393d3(%rip), %rdi     # 0x1582cc
leaq 0x38d95(%rip), %rsi     # 0x157c95
leaq 0x3941f(%rip), %rcx     # 0x158326
movl $0x111, %edx            # imm = 0x111
movq %r14, %r8
xorl %eax, %eax
callq 0xc80f6
testb %r13b, %r13b
je 0x11ef4a
movq %r14, %rdi
movq %r14, %rsi
callq 0xd1d0
testq %rax, %rax
jne 0x11ef5c
leaq 0x3939a(%rip), %rdi     # 0x1582cc
leaq 0x38d5c(%rip), %rsi     # 0x157c95
leaq 0x39401(%rip), %rcx     # 0x158341
xorl %r13d, %r13d
movl $0x11b, %edx            # imm = 0x11B
jmp 0x11ef7e
movl $0x100, %edi            # imm = 0x100
movq %r14, %rsi
callq 0xd1d0
testq %rax, %rax
je 0x11ef61
movq %rax, %r13
jmp 0x11ef88
leaq 0x39364(%rip), %rdi     # 0x1582cc
leaq 0x38d26(%rip), %rsi     # 0x157c95
leaq 0x38d2d(%rip), %rcx     # 0x157ca3
xorl %r13d, %r13d
movl $0x120, %edx            # imm = 0x120
movq %r14, %r8
xorl %eax, %eax
callq 0xc80f6
movl $0x48, %esi
movq %r13, %rdi
callq 0xc8366
testq %r13, (%rsp)
sete 0x14(%r13)
movq %r14, (%r13)
movq %rbp, 0x8(%r13)
movw %r15w, 0x10(%r13)
movw $0x0, 0x12(%r13)
testw %r15w, %r15w
je 0x11efd9
xorl %eax, %eax
xorl %ecx, %ecx
leaq (%rcx,%r12), %rdx
cmpq %r15, %rdx
cmovael %eax, %edx
movw %dx, 0x48(%r13,%rcx,2)
incq %rcx
movzwl 0x10(%r13), %edx
cmpq %rdx, %rcx
jb 0x11efbc
movq 0x10(%rsp), %rax
movq %rax, 0x40(%r13)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%r13)
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
movq %r13, (%rax,%rcx,8)
movq 0x18(%rbx), %rdx
movq (%rdx,%rcx,8), %rax
movq %rcx, 0x28(%rax)
movq 0x20(%rbx), %rax
movq (%rdx,%rax,8), %rcx
movq %rbx, 0x20(%rcx)
cmpb $0x1, 0x40(%rbx)
jne 0x11f036
movq 0x18(%rbx), %rcx
movq (%rcx,%rax,8), %rax
cmpb $0x0, 0x14(%rax)
jne 0x11f036
movb $0x0, 0x40(%rbx)
movq 0x50(%rbx), %rax
testq %rax, %rax
je 0x11f036
movq 0x48(%rbx), %rdi
callq *%rax
movq 0x58(%rbx), %rdi
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x131e46
cmpl $0x1, %eax
je 0x11f071
leaq 0x3922d(%rip), %rdi     # 0x158284
leaq 0x38c37(%rip), %rsi     # 0x157c95
leaq 0x39245(%rip), %rcx     # 0x1582aa
movl $0x363, %edx            # imm = 0x363
xorl %eax, %eax
callq 0xc80f6
incq 0x20(%rbx)
movq 0x18(%rbx), %rax
movq 0x30(%rbx), %rcx
movq (%rax,%rcx,8), %rax
movzwl 0x12(%rax), %edi
movzwl 0x48(%rax,%rdi,2), %edx
movq 0x8(%rax), %rsi
incl %edi
movw %di, 0x12(%rax)
movzwl %di, %edi
cmpw $0x0, 0x48(%rax,%rdi,2)
jne 0x11f0a6
incq %rcx
movq %rcx, 0x30(%rbx)
imulq %rdx, %rsi
addq %rsi, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq