// File: /workspace/github_c_makefile_star2_O3/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 0x113e2b
cmpq 0x28(%rbx), %rcx
jne 0x113b4c
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 0x113b12
callq 0xd3f0
jmp 0x113b1a
movq %rsi, %rdi
callq 0xd160
movq %rax, 0x18(%rbx)
testq %rax, %rax
jne 0x113b4c
movq 0x28(%rbx), %r8
shlq $0x3, %r8
leaq 0x397aa(%rip), %rdi     # 0x14d2dc
leaq 0x391b4(%rip), %rsi     # 0x14cced
leaq 0x391bb(%rip), %rcx     # 0x14ccfb
movl $0x359, %edx            # imm = 0x359
xorl %eax, %eax
callq 0xbe592
movq (%rbx), %r15
movq 0x8(%rbx), %rbp
movb 0x10(%rbx), %r12b
movq 0x60(%rbx), %rax
movq %rax, 0x10(%rsp)
movq 0x68(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq -0x1(%r15), %rax
movq %rax, (%rsp)
testq %rax, %r15
je 0x113b9a
leaq 0x397a7(%rip), %rdi     # 0x14d324
leaq 0x39169(%rip), %rsi     # 0x14cced
leaq 0x397b0(%rip), %rcx     # 0x14d33b
movl $0x10c, %edx            # imm = 0x10C
movq %r15, %r8
xorl %eax, %eax
callq 0xbe592
movq %r15, %rax
xorl %edx, %edx
divq %rbp
movq %rax, %r14
cmpq $0x10001, %rax          # imm = 0x10001
jb 0x113bd1
leaq 0x39770(%rip), %rdi     # 0x14d324
leaq 0x39132(%rip), %rsi     # 0x14cced
leaq 0x3979d(%rip), %rcx     # 0x14d35f
movl $0x10e, %edx            # imm = 0x10E
movq %r14, %r8
xorl %eax, %eax
callq 0xbe592
leaq 0x48(,%r14,2), %rax
xorl %edx, %edx
divq %rbp
movq %rax, %r13
cmpq $0x1, %rdx
sbbq $-0x1, %r13
leaq 0x1(%r13), %rax
cmpq %rax, %r14
jae 0x113c16
leaq 0x3972b(%rip), %rdi     # 0x14d324
leaq 0x390ed(%rip), %rsi     # 0x14cced
leaq 0x39777(%rip), %rcx     # 0x14d37e
movl $0x111, %edx            # imm = 0x111
movq %r15, %r8
xorl %eax, %eax
callq 0xbe592
testb %r12b, %r12b
je 0x113c4a
movq %r15, %rdi
movq %r15, %rsi
callq 0xd1d0
testq %rax, %rax
jne 0x113c5c
leaq 0x396f2(%rip), %rdi     # 0x14d324
leaq 0x390b4(%rip), %rsi     # 0x14cced
leaq 0x39759(%rip), %rcx     # 0x14d399
xorl %r12d, %r12d
movl $0x11b, %edx            # imm = 0x11B
jmp 0x113c7e
movl $0x100, %edi            # imm = 0x100
movq %r15, %rsi
callq 0xd1d0
testq %rax, %rax
je 0x113c61
movq %rax, %r12
jmp 0x113c88
leaq 0x396bc(%rip), %rdi     # 0x14d324
leaq 0x3907e(%rip), %rsi     # 0x14cced
leaq 0x39085(%rip), %rcx     # 0x14ccfb
xorl %r12d, %r12d
movl $0x120, %edx            # imm = 0x120
movq %r15, %r8
xorl %eax, %eax
callq 0xbe592
movl $0x48, %esi
movq %r12, %rdi
callq 0xbe802
testq %r12, (%rsp)
sete 0x14(%r12)
movq %r15, (%r12)
movq %rbp, 0x8(%r12)
movw %r14w, 0x10(%r12)
movw $0x0, 0x12(%r12)
movq %r14, %rcx
andq $0xffff, %rcx           # imm = 0xFFFF
je 0x113d91
leal 0x1(%rcx), %eax
andl $-0x2, %eax
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movq %r13, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
movdqa 0x38fb5(%rip), %xmm2    # 0x14cca0
xorl %ecx, %ecx
movdqa 0x38fbb(%rip), %xmm3    # 0x14ccb0
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x38fbb(%rip), %xmm5    # 0x14ccc0
xorl %edx, %edx
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm6     # xmm6 = xmm6[1,1,3,3]
pand %xmm7, %xmm6
pshufd $0xf5, %xmm7, %xmm7     # xmm7 = xmm7[1,1,3,3]
por %xmm6, %xmm7
movdqa %xmm2, %xmm6
paddq %xmm1, %xmm6
movd %xmm7, %esi
notl %esi
testb $0x1, %sil
je 0x113d56
movd %xmm6, %esi
movq %xmm6, %rdi
cmpq %r14, %rdi
cmovael %ecx, %esi
movw %si, 0x48(%r12,%rdx,2)
pxor %xmm4, %xmm7
pextrw $0x4, %xmm7, %esi
testb $0x1, %sil
je 0x113d80
pextrw $0x4, %xmm6, %esi
pshufd $0xee, %xmm6, %xmm6     # xmm6 = xmm6[2,3,2,3]
movq %xmm6, %rdi
cmpq %r14, %rdi
cmovael %ecx, %esi
movw %si, 0x4a(%r12,%rdx,2)
addq $0x2, %rdx
paddq %xmm5, %xmm2
cmpq %rdx, %rax
jne 0x113d07
movq 0x10(%rsp), %rax
movq %rax, 0x40(%r12)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%r12)
movq 0x18(%rbx), %rcx
movq 0x20(%rbx), %rax
movq %r12, (%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 0x113df0
movq (%rcx,%rax,8), %rdx
cmpb $0x0, 0x14(%rdx)
jne 0x113df0
movb $0x0, 0x40(%rbx)
movq 0x50(%rbx), %rdx
testq %rdx, %rdx
je 0x113df0
movq 0x48(%rbx), %rdi
callq *%rdx
movq 0x18(%rbx), %rcx
movq 0x20(%rbx), %rax
movq 0x58(%rbx), %rdi
movq (%rcx,%rax,8), %rsi
callq 0x126901
cmpl $0x1, %eax
je 0x113e23
leaq 0x394d3(%rip), %rdi     # 0x14d2dc
leaq 0x38edd(%rip), %rsi     # 0x14cced
leaq 0x394eb(%rip), %rcx     # 0x14d302
movl $0x363, %edx            # imm = 0x363
xorl %eax, %eax
callq 0xbe592
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 0x113e58
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