	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_v3d_get_bin_slot           ## -- Begin function vc4_v3d_get_bin_slot
	.p2align	4, 0x90
_vc4_v3d_get_bin_slot:                  ## @vc4_v3d_get_bin_slot
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movl	4(%r12), %eax
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_vc4_last_render_job
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rax), %r15
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	testq	%r15, %r15
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	$-1, %rdx
	movl	$1, %ecx
	callq	_vc4_wait_for_seqno
	testl	%eax, %eax
	je	LBB0_1
## %bb.7:
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_2:
	notl	%eax
	bsfl	%eax, %ebx
	movl	%ebx, %edi
	callq	_BIT
	orl	%eax, 4(%r12)
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_9
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_v3d_get_bin_slot           ; -- Begin function vc4_v3d_get_bin_slot
	.p2align	2
_vc4_v3d_get_bin_slot:                  ; @vc4_v3d_get_bin_slot
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	mov	x21, #0
	ldr	x20, [x0, #8]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x19, #4]
	cmn	w8, #1
	b.ne	LBB0_7
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_vc4_last_render_job
	cbz	x0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x21, [x0]
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	cbz	x21, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	mov	x1, x21
	mov	x2, #-1
	mov	w3, #1
	bl	_vc4_wait_for_seqno
	cbz	w0, LBB0_1
; %bb.6:
	mov	x22, x0
	b	LBB0_9
LBB0_7:
	mvn	w8, w8
	rbit	w8, w8
	clz	w22, w8
	mov	x0, x22
	bl	_BIT
	ldr	w8, [x19, #4]
	orr	w8, w8, w0
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	b	LBB0_9
LBB0_8:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
