	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bd_md_unload                   ## -- Begin function bd_md_unload
	.p2align	4, 0x90
_bd_md_unload:                          ## @bd_md_unload
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_OBJ_TYPE_MD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_obj_lookup
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	-32(%rbp), %r15
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_PROTO_IOC_BUSDMA_MD_UNLOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movl	4(%rbx), %eax
	movl	%eax, -32(%rbp)
	movl	(%rbx), %edi
	movq	_PROTO_IOC_BUSDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.3:
	movq	_BUSDMA_MD_VIRT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_bd_md_del_segs
	movq	_BUSDMA_MD_PHYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_bd_md_del_segs
	movq	_BUSDMA_MD_BUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_bd_md_del_segs
	jmp	LBB0_4
LBB0_1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_4:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OBJ_TYPE_MD,4,2                ## @OBJ_TYPE_MD
	.comm	_errno,4,2                      ## @errno
	.comm	_PROTO_IOC_BUSDMA_MD_UNLOAD,4,2 ## @PROTO_IOC_BUSDMA_MD_UNLOAD
	.comm	_PROTO_IOC_BUSDMA,4,2           ## @PROTO_IOC_BUSDMA
	.comm	_BUSDMA_MD_VIRT,4,2             ## @BUSDMA_MD_VIRT
	.comm	_BUSDMA_MD_PHYS,4,2             ## @BUSDMA_MD_PHYS
	.comm	_BUSDMA_MD_BUS,4,2              ## @BUSDMA_MD_BUS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bd_md_unload                   ; -- Begin function bd_md_unload
	.p2align	2
_bd_md_unload:                          ; @bd_md_unload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x8, _OBJ_TYPE_MD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OBJ_TYPE_MD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_obj_lookup
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh3:
	adrp	x8, _PROTO_IOC_BUSDMA_MD_UNLOAD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PROTO_IOC_BUSDMA_MD_UNLOAD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldp	w0, w9, [x19]
	stp	w9, w8, [sp, #8]
Lloh6:
	adrp	x8, _PROTO_IOC_BUSDMA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PROTO_IOC_BUSDMA@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _BUSDMA_MD_VIRT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BUSDMA_MD_VIRT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_bd_md_del_segs
Lloh12:
	adrp	x8, _BUSDMA_MD_PHYS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BUSDMA_MD_PHYS@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_bd_md_del_segs
Lloh15:
	adrp	x8, _BUSDMA_MD_BUS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BUSDMA_MD_BUS@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_bd_md_del_segs
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh18:
	adrp	x8, _errno@GOTPAGE
Lloh19:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_OBJ_TYPE_MD,4,2                ; @OBJ_TYPE_MD
	.comm	_errno,4,2                      ; @errno
	.comm	_PROTO_IOC_BUSDMA_MD_UNLOAD,4,2 ; @PROTO_IOC_BUSDMA_MD_UNLOAD
	.comm	_PROTO_IOC_BUSDMA,4,2           ; @PROTO_IOC_BUSDMA
	.comm	_BUSDMA_MD_VIRT,4,2             ; @BUSDMA_MD_VIRT
	.comm	_BUSDMA_MD_PHYS,4,2             ; @BUSDMA_MD_PHYS
	.comm	_BUSDMA_MD_BUS,4,2              ; @BUSDMA_MD_BUS
.subsections_via_symbols
