	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_diva_mnt_remove_xdi_adapter    ## -- Begin function diva_mnt_remove_xdi_adapter
	.p2align	4, 0x90
_diva_mnt_remove_xdi_adapter:           ## @diva_mnt_remove_xdi_adapter
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$312, %rsp                      ## imm = 0x138
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-336(%rbp), %rdi
	leaq	-328(%rbp), %rsi
	callq	_diva_os_get_time
	movq	_dbg_adapter_lock@GOTPCREL(%rip), %rdi
	leaq	L_.str(%rip), %rbx
	leaq	-308(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_diva_os_enter_spin_lock
	movq	_dbg_q_lock@GOTPCREL(%rip), %rdi
	leaq	-312(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_diva_os_enter_spin_lock
	movq	_clients@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	$2, %eax
	jl	LBB0_1
## %bb.2:
	movl	$1, %r13d
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	callq	_ARRAY_SIZE
	cltq
	addq	$56, %rbx
	cmpq	%rax, %r13
	jge	LBB0_17
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	cmpq	$0, 88(%rdi,%rbx)
	je	LBB0_16
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	72(%rdi,%rbx), %rax
	cmpq	(%r15), %rax
	jne	LBB0_16
## %bb.5:
	movq	104(%rdi,%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.7:
	movl	(%rcx), %edi
	callq	*8(%rcx)
	movq	(%r12), %rax
	movq	$0, 104(%rax,%rbx)
	movq	(%r12), %rax
	movq	96(%rax,%rbx), %r14
	movq	$0, 96(%rax,%rbx)
	movq	(%r12), %rdi
	jmp	LBB0_8
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_17
LBB0_6:
	xorl	%r14d, %r14d
LBB0_8:
	movq	$0, 88(%rdi,%rbx)
	movq	(%r12), %rax
	movq	$0, 80(%rax,%rbx)
	movl	56(%rax,%rbx), %esi
	testl	%esi, %esi
	js	LBB0_10
## %bb.9:
	movq	72(%rax,%rbx), %rdi
	callq	_diva_free_dma_descriptor
	movq	(%r12), %rax
	movl	$-1, 56(%rax,%rbx)
LBB0_10:
	movq	$0, 72(%rax,%rbx)
	movq	(%r12), %rax
	movq	64(%rax,%rbx), %rcx
	leaq	L_.str.1(%rip), %rsi
	leaq	-304(%rbp), %rdi
	movl	%r13d, %edx
	callq	_sprintf
	movl	%eax, %r13d
	movq	(%r12), %rax
	leaq	(%rax,%rbx), %rdi
	addq	$64, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	leal	57(%r13), %r12d
	movq	_dbg_queue@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	%r12d, %esi
	callq	_queueAllocMsg
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_15
## %bb.11:
	movq	%r13, -320(%rbp)                ## 8-byte Spill
	leaq	-340(%rbp), %r13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	%r13, %rsi
	callq	_queuePeekMsg
	testq	%rax, %rax
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	(%r15), %edi
	callq	_queueFreeMsg
	movl	(%r15), %edi
	movl	%r12d, %esi
	callq	_queueAllocMsg
	testq	%rax, %rax
	je	LBB0_12
## %bb.14:
	movq	%rax, %rbx
	movq	-320(%rbp), %r13                ## 8-byte Reload
LBB0_15:
	incl	%r13d
	movq	_dbg_sequence@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%rax)
	movq	%rcx, 48(%rbx)
	movq	-336(%rbp), %rax
	movq	%rax, 40(%rbx)
	movq	-328(%rbp), %rax
	movq	%rax, 32(%rbx)
	movq	_MSG_TYPE_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_DLI_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	movl	%r13d, (%rbx)
	leaq	56(%rbx), %rdi
	leaq	-304(%rbp), %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movq	%rbx, %rdi
	callq	_queueCompleteMsg
	xorl	%eax, %eax
	callq	_diva_maint_wakeup_read
LBB0_17:
	movq	_dbg_q_lock@GOTPCREL(%rip), %rdi
	leaq	L_.str.2(%rip), %rbx
	leaq	-312(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_diva_os_leave_spin_lock
	movq	_dbg_adapter_lock@GOTPCREL(%rip), %rdi
	leaq	-308(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_diva_os_leave_spin_lock
	testq	%r14, %r14
	je	LBB0_19
## %bb.18:
	xorl	%edi, %edi
	movq	%r14, %rsi
	callq	_diva_os_free
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	addq	$312, %rsp                      ## imm = 0x138
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_dbg_adapter_lock,4,2           ## @dbg_adapter_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read"

	.comm	_dbg_q_lock,4,2                 ## @dbg_q_lock
	.comm	_clients,8,3                    ## @clients
L_.str.1:                               ## @.str.1
	.asciz	"DIMAINT - drv # %d = '%s' de-registered"

	.comm	_dbg_queue,4,2                  ## @dbg_queue
	.comm	_dbg_sequence,4,2               ## @dbg_sequence
	.comm	_MSG_TYPE_STRING,4,2            ## @MSG_TYPE_STRING
	.comm	_DLI_REG,4,2                    ## @DLI_REG
L_.str.2:                               ## @.str.2
	.asciz	"read_ack"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_diva_mnt_remove_xdi_adapter    ; -- Begin function diva_mnt_remove_xdi_adapter
	.p2align	2
_diva_mnt_remove_xdi_adapter:           ; @diva_mnt_remove_xdi_adapter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #368
	.cfi_def_cfa_offset 368
	stp	x24, x23, [sp, #304]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #320]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #336]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #352]            ; 16-byte Folded Spill
	add	x29, sp, #352
	.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	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	add	x0, sp, #24
	add	x1, sp, #16
	bl	_diva_os_get_time
Lloh3:
	adrp	x0, _dbg_adapter_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _dbg_adapter_lock@GOTPAGEOFF]
Lloh5:
	adrp	x20, l_.str@PAGE
Lloh6:
	add	x20, x20, l_.str@PAGEOFF
	add	x1, sp, #32
	mov	x2, x20
	bl	_diva_os_enter_spin_lock
Lloh7:
	adrp	x0, _dbg_q_lock@GOTPAGE
Lloh8:
	ldr	x0, [x0, _dbg_q_lock@GOTPAGEOFF]
	add	x1, sp, #36
	mov	x2, x20
	bl	_diva_os_enter_spin_lock
Lloh9:
	adrp	x21, _clients@GOTPAGE
Lloh10:
	ldr	x21, [x21, _clients@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #2
	b.lt	LBB0_7
; %bb.1:
	mov	w20, #1
	mov	w22, #104
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #1
	bl	_ARRAY_SIZE
	add	x22, x22, #56
	cmp	x20, w0, sxtw
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	add	x8, x0, x22
	ldur	x9, [x8, #-16]
	cbz	x9, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	x8, [x8, #-32]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.5:
	ldr	x8, [x0, x22]
	cbz	x8, LBB0_12
; %bb.6:
	ldr	x9, [x8, #8]
	ldr	w0, [x8]
	blr	x9
	ldr	x8, [x21]
	str	xzr, [x8, x22]
	ldr	x8, [x21]
	add	x8, x8, x22
	ldur	x19, [x8, #-8]
	stur	xzr, [x8, #-8]
	ldr	x0, [x21]
	b	LBB0_13
LBB0_7:
	mov	x19, #0
LBB0_8:
Lloh11:
	adrp	x0, _dbg_q_lock@GOTPAGE
Lloh12:
	ldr	x0, [x0, _dbg_q_lock@GOTPAGEOFF]
Lloh13:
	adrp	x20, l_.str.2@PAGE
Lloh14:
	add	x20, x20, l_.str.2@PAGEOFF
	add	x1, sp, #36
	mov	x2, x20
	bl	_diva_os_leave_spin_lock
Lloh15:
	adrp	x0, _dbg_adapter_lock@GOTPAGE
Lloh16:
	ldr	x0, [x0, _dbg_adapter_lock@GOTPAGEOFF]
	add	x1, sp, #32
	mov	x2, x20
	bl	_diva_os_leave_spin_lock
	cbz	x19, LBB0_10
; %bb.9:
	mov	w0, #0
	mov	x1, x19
	bl	_diva_os_free
LBB0_10:
	ldur	x8, [x29, #-56]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.11:
	ldp	x29, x30, [sp, #352]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #336]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #320]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #304]            ; 16-byte Folded Reload
	add	sp, sp, #368
	ret
LBB0_12:
	mov	x19, #0
LBB0_13:
	add	x8, x0, x22
	stur	xzr, [x8, #-16]
	ldr	x8, [x21]
	add	x9, x8, x22
	stur	xzr, [x9, #-24]
	ldur	w1, [x9, #-48]
	tbnz	w1, #31, LBB0_15
; %bb.14:
	ldur	x0, [x9, #-32]
	bl	_diva_free_dma_descriptor
	ldr	x8, [x21]
	add	x9, x8, x22
	mov	w10, #-1
	stur	w10, [x9, #-48]
LBB0_15:
	add	x8, x8, x22
	stur	xzr, [x8, #-32]
	ldr	x8, [x21]
	add	x8, x8, x22
	ldur	x3, [x8, #-40]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #40
	mov	x2, x20
	bl	_sprintf
	mov	x20, x0
	ldr	x8, [x21]
	add	x8, x8, x22
	sub	x0, x8, #40
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	add	w22, w20, #57
Lloh22:
	adrp	x23, _dbg_queue@GOTPAGE
Lloh23:
	ldr	x23, [x23, _dbg_queue@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	x1, x22
	bl	_queueAllocMsg
	mov	x21, x0
	cbnz	x0, LBB0_19
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	w0, [x23]
	bl	_queueFreeMsg
	ldr	w0, [x23]
	mov	x1, x22
	bl	_queueAllocMsg
	cbnz	x0, LBB0_18
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	add	x1, sp, #12
	bl	_queuePeekMsg
	cbnz	x0, LBB0_16
	b	LBB0_8
LBB0_18:
	mov	x21, x0
LBB0_19:
	add	w2, w20, #1
Lloh24:
	adrp	x8, _dbg_sequence@GOTPAGE
Lloh25:
	ldr	x8, [x8, _dbg_sequence@GOTPAGEOFF]
	ldrsw	x11, [x8]
	add	w10, w11, #1
	str	w10, [x8]
	ldp	x9, x8, [sp, #16]
	stp	x8, x11, [x21, #40]
	str	x9, [x21, #32]
Lloh26:
	adrp	x8, _MSG_TYPE_STRING@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MSG_TYPE_STRING@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _DLI_REG@GOTPAGE
Lloh30:
	ldr	x9, [x9, _DLI_REG@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #24]
	stp	xzr, xzr, [x21, #8]
	str	w2, [x21]
	add	x0, x21, #56
	add	x1, sp, #40
	bl	_memcpy
	mov	x0, x21
	bl	_queueCompleteMsg
	bl	_diva_maint_wakeup_read
	b	LBB0_8
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_dbg_adapter_lock,4,2           ; @dbg_adapter_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read"

	.comm	_dbg_q_lock,4,2                 ; @dbg_q_lock
	.comm	_clients,8,3                    ; @clients
l_.str.1:                               ; @.str.1
	.asciz	"DIMAINT - drv # %d = '%s' de-registered"

	.comm	_dbg_queue,4,2                  ; @dbg_queue
	.comm	_dbg_sequence,4,2               ; @dbg_sequence
	.comm	_MSG_TYPE_STRING,4,2            ; @MSG_TYPE_STRING
	.comm	_DLI_REG,4,2                    ; @DLI_REG
l_.str.2:                               ; @.str.2
	.asciz	"read_ack"

.subsections_via_symbols
