	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rvu_mbox_handler_attach_resources
_rvu_mbox_handler_attach_resources:     ## @rvu_mbox_handler_attach_resources
	.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	%rsi, %rbx
	movq	%rdi, %r15
	movl	40(%rsi), %r14d
	cmpq	$0, 16(%rsi)
	jne	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_rvu_detach_rsrcs
LBB0_2:
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_rvu_check_rsrc_availability
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.3:
	cmpq	$0, 32(%rbx)
	je	LBB0_5
## %bb.4:
	movq	_BLKTYPE_NPA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	$1, %ecx
	callq	_rvu_attach_block
LBB0_5:
	cmpq	$0, 24(%rbx)
	je	LBB0_7
## %bb.6:
	movq	_BLKTYPE_NIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	$1, %ecx
	callq	_rvu_attach_block
LBB0_7:
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.8:
	cmpq	$0, 16(%rbx)
	je	LBB0_10
## %bb.9:
	movq	_BLKTYPE_SSO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rvu_detach_block
	movl	(%rbx), %ecx
LBB0_10:
	movq	_BLKTYPE_SSO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rvu_attach_block
LBB0_11:
	movl	4(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_15
## %bb.12:
	cmpq	$0, 16(%rbx)
	je	LBB0_14
## %bb.13:
	movq	_BLKTYPE_SSOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rvu_detach_block
	movl	4(%rbx), %ecx
LBB0_14:
	movq	_BLKTYPE_SSOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rvu_attach_block
LBB0_15:
	movl	8(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_19
## %bb.16:
	cmpq	$0, 16(%rbx)
	je	LBB0_18
## %bb.17:
	movq	_BLKTYPE_TIM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rvu_detach_block
	movl	8(%rbx), %ecx
LBB0_18:
	movq	_BLKTYPE_TIM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rvu_attach_block
LBB0_19:
	movl	12(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_23
## %bb.20:
	cmpq	$0, 16(%rbx)
	je	LBB0_22
## %bb.21:
	movq	_BLKTYPE_CPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rvu_detach_block
	movl	12(%rbx), %ecx
LBB0_22:
	movq	_BLKTYPE_CPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_rvu_attach_block
LBB0_23:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLKTYPE_NPA,4,2                ## @BLKTYPE_NPA
	.comm	_BLKTYPE_NIX,4,2                ## @BLKTYPE_NIX
	.comm	_BLKTYPE_SSO,4,2                ## @BLKTYPE_SSO
	.comm	_BLKTYPE_SSOW,4,2               ## @BLKTYPE_SSOW
	.comm	_BLKTYPE_TIM,4,2                ## @BLKTYPE_TIM
	.comm	_BLKTYPE_CPT,4,2                ## @BLKTYPE_CPT
	.no_dead_strip	_rvu_mbox_handler_attach_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rvu_mbox_handler_attach_resources
_rvu_mbox_handler_attach_resources:     ; @rvu_mbox_handler_attach_resources
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
	ldr	w20, [x1, #40]
	ldr	x8, [x1, #16]
	cbnz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, #0
	mov	x2, x20
	bl	_rvu_detach_rsrcs
LBB0_2:
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_rvu_check_rsrc_availability
	mov	x22, x0
	cbnz	w0, LBB0_23
; %bb.3:
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _BLKTYPE_NPA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLKTYPE_NPA@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_rvu_attach_block
LBB0_5:
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_7
; %bb.6:
Lloh3:
	adrp	x8, _BLKTYPE_NIX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BLKTYPE_NIX@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w3, #1
	bl	_rvu_attach_block
LBB0_7:
	ldr	w3, [x21]
	cbz	w3, LBB0_11
; %bb.8:
	ldr	x8, [x21, #16]
Lloh6:
	adrp	x23, _BLKTYPE_SSO@GOTPAGE
Lloh7:
	ldr	x23, [x23, _BLKTYPE_SSO@GOTPAGEOFF]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_rvu_detach_block
	ldr	w3, [x21]
LBB0_10:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_rvu_attach_block
LBB0_11:
	ldr	w3, [x21, #4]
	cbz	w3, LBB0_15
; %bb.12:
	ldr	x8, [x21, #16]
Lloh8:
	adrp	x23, _BLKTYPE_SSOW@GOTPAGE
Lloh9:
	ldr	x23, [x23, _BLKTYPE_SSOW@GOTPAGEOFF]
	cbz	x8, LBB0_14
; %bb.13:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_rvu_detach_block
	ldr	w3, [x21, #4]
LBB0_14:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_rvu_attach_block
LBB0_15:
	ldr	w3, [x21, #8]
	cbz	w3, LBB0_19
; %bb.16:
	ldr	x8, [x21, #16]
Lloh10:
	adrp	x23, _BLKTYPE_TIM@GOTPAGE
Lloh11:
	ldr	x23, [x23, _BLKTYPE_TIM@GOTPAGEOFF]
	cbz	x8, LBB0_18
; %bb.17:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_rvu_detach_block
	ldr	w3, [x21, #8]
LBB0_18:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_rvu_attach_block
LBB0_19:
	ldr	w3, [x21, #12]
	cbz	w3, LBB0_23
; %bb.20:
	ldr	x8, [x21, #16]
Lloh12:
	adrp	x23, _BLKTYPE_CPT@GOTPAGE
Lloh13:
	ldr	x23, [x23, _BLKTYPE_CPT@GOTPAGEOFF]
	cbz	x8, LBB0_22
; %bb.21:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_rvu_detach_block
	ldr	w3, [x21, #12]
LBB0_22:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	bl	_rvu_attach_block
LBB0_23:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_BLKTYPE_NPA,4,2                ; @BLKTYPE_NPA
	.comm	_BLKTYPE_NIX,4,2                ; @BLKTYPE_NIX
	.comm	_BLKTYPE_SSO,4,2                ; @BLKTYPE_SSO
	.comm	_BLKTYPE_SSOW,4,2               ; @BLKTYPE_SSOW
	.comm	_BLKTYPE_TIM,4,2                ; @BLKTYPE_TIM
	.comm	_BLKTYPE_CPT,4,2                ; @BLKTYPE_CPT
	.no_dead_strip	_rvu_mbox_handler_attach_resources
.subsections_via_symbols
