// File: /workspace/github_c_makefile_star2_O2/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 0x30(%rdi), %rcx
cmpq 0x20(%rdi), %rcx
jne 0x9755b
cmpq 0x28(%rbx), %rcx
jne 0x9733d
leaq (%rcx,%rcx), %rax
testq %rcx, %rcx
pushq $0x1
popq %rsi
cmovneq %rax, %rsi
movq %rsi, 0x28(%rbx)
movq 0x18(%rbx), %rdi
shlq $0x3, %rsi
testq %rdi, %rdi
je 0x97303
callq 0xd3f0
jmp 0x9730b
movq %rsi, %rdi
callq 0xd160
movq %rax, 0x18(%rbx)
testq %rax, %rax
jne 0x9733d
movq 0x28(%rbx), %r8
shlq $0x3, %r8
leaq 0x33fe9(%rip), %rdi     # 0xcb30c
leaq 0x339f3(%rip), %rsi     # 0xcad1d
leaq 0x339fa(%rip), %rcx     # 0xcad2b
movl $0x359, %edx            # imm = 0x359
xorl %eax, %eax
callq 0x60031
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 0x9738b
leaq 0x33fe6(%rip), %rdi     # 0xcb354
leaq 0x339a8(%rip), %rsi     # 0xcad1d
leaq 0x33fef(%rip), %rcx     # 0xcb36b
movl $0x10c, %edx            # imm = 0x10C
movq %r14, %r8
xorl %eax, %eax
callq 0x60031
movq %r14, %rax
xorl %edx, %edx
divq %rbp
movq %rax, %r15
cmpq $0x10001, %rax          # imm = 0x10001
jb 0x973c2
leaq 0x33faf(%rip), %rdi     # 0xcb354
leaq 0x33971(%rip), %rsi     # 0xcad1d
leaq 0x33fdc(%rip), %rcx     # 0xcb38f
movl $0x10e, %edx            # imm = 0x10E
movq %r15, %r8
xorl %eax, %eax
callq 0x60031
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 0x97408
leaq 0x33f69(%rip), %rdi     # 0xcb354
leaq 0x3392b(%rip), %rsi     # 0xcad1d
leaq 0x33fb5(%rip), %rcx     # 0xcb3ae
movl $0x111, %edx            # imm = 0x111
movq %r14, %r8
xorl %eax, %eax
callq 0x60031
testb %r13b, %r13b
je 0x9743c
movq %r14, %rdi
movq %r14, %rsi
callq 0xd1d0
testq %rax, %rax
jne 0x9744e
leaq 0x33f30(%rip), %rdi     # 0xcb354
leaq 0x338f2(%rip), %rsi     # 0xcad1d
leaq 0x33f97(%rip), %rcx     # 0xcb3c9
xorl %r13d, %r13d
movl $0x11b, %edx            # imm = 0x11B
jmp 0x97470
movl $0x100, %edi            # imm = 0x100
movq %r14, %rsi
callq 0xd1d0
testq %rax, %rax
je 0x97453
movq %rax, %r13
jmp 0x9747a
leaq 0x33efa(%rip), %rdi     # 0xcb354
leaq 0x338bc(%rip), %rsi     # 0xcad1d
leaq 0x338c3(%rip), %rcx     # 0xcad2b
xorl %r13d, %r13d
movl $0x120, %edx            # imm = 0x120
movq %r14, %r8
xorl %eax, %eax
callq 0x60031
pushq $0x48
popq %rsi
movq %r13, %rdi
callq 0x6028b
testq %r13, (%rsp)
sete 0x14(%r13)
movq %r14, (%r13)
movq %rbp, 0x8(%r13)
movw %r15w, 0x10(%r13)
andw $0x0, 0x12(%r13)
movzwl %r15w, %eax
xorl %ecx, %ecx
xorl %edx, %edx
cmpq %rax, %rdx
jae 0x974c3
leaq (%rdx,%r12), %rsi
cmpq %r15, %rsi
cmovael %ecx, %esi
movw %si, 0x48(%r13,%rdx,2)
incq %rdx
jmp 0x974a9
movq 0x10(%rsp), %rax
movq %rax, 0x40(%r13)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%r13)
movq 0x18(%rbx), %rcx
movq 0x20(%rbx), %rax
movq %r13, (%rcx,%rax,8)
movq 0x18(%rbx), %rcx
movq (%rcx,%rax,8), %rcx
movq %rax, 0x28(%rcx)
movq %rbx, 0x20(%rcx)
movq 0x18(%rbx), %rcx
cmpb $0x1, 0x40(%rbx)
jne 0x97520
movq (%rcx,%rax,8), %rdx
cmpb $0x0, 0x14(%rdx)
jne 0x97520
movb $0x0, 0x40(%rbx)
movq 0x50(%rbx), %rdx
testq %rdx, %rdx
je 0x97520
movq 0x48(%rbx), %rdi
callq *%rdx
movq 0x18(%rbx), %rcx
movq 0x20(%rbx), %rax
movq 0x58(%rbx), %rdi
movq (%rcx,%rax,8), %rsi
callq 0xa486f
cmpl $0x1, %eax
je 0x97553
leaq 0x33dd3(%rip), %rdi     # 0xcb30c
leaq 0x337dd(%rip), %rsi     # 0xcad1d
leaq 0x33deb(%rip), %rcx     # 0xcb332
movl $0x363, %edx            # imm = 0x363
xorl %eax, %eax
callq 0x60031
incq 0x20(%rbx)
movq 0x30(%rbx), %rcx
movq 0x18(%rbx), %rax
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 0x97588
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