	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehea_destroy_busmap            ## -- Begin function ehea_destroy_busmap
	.p2align	4, 0x90
_ehea_destroy_busmap:                   ## @ehea_destroy_busmap
	.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	_ehea_busmap_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_ehea_bmap@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.1:
	movq	_EHEA_MAP_ENTRIES@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.2:
	xorl	%r12d, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	callq	_kfree
	movl	(%r14), %eax
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movslq	%eax, %rcx
	movq	(%r15), %rdi
	cmpq	%rcx, %r12
	jge	LBB0_11
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	(%rdi), %rcx
	movq	(%rcx,%r12,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%eax, %eax
	jle	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	incq	%rbx
	movslq	%eax, %rcx
	movq	(%r15), %rdx
	movq	(%rdx), %rdx
	movq	(%rdx,%r12,8), %rdi
	cmpq	%rcx, %rbx
	jge	LBB0_9
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rdi), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	callq	_kfree
	movl	(%r14), %eax
	jmp	LBB0_8
LBB0_11:
	callq	_kfree
	movq	$0, (%r15)
LBB0_12:
	movq	_ehea_busmap_mutex@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ehea_busmap_mutex,4,2          ## @ehea_busmap_mutex
	.comm	_ehea_bmap,8,3                  ## @ehea_bmap
	.comm	_EHEA_MAP_ENTRIES,4,2           ## @EHEA_MAP_ENTRIES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehea_destroy_busmap            ; -- Begin function ehea_destroy_busmap
	.p2align	2
_ehea_destroy_busmap:                   ; @ehea_destroy_busmap
	.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
Lloh0:
	adrp	x0, _ehea_busmap_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ehea_busmap_mutex@GOTPAGEOFF]
	bl	_mutex_lock
Lloh2:
	adrp	x19, _ehea_bmap@GOTPAGE
Lloh3:
	ldr	x19, [x19, _ehea_bmap@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_12
; %bb.1:
Lloh4:
	adrp	x20, _EHEA_MAP_ENTRIES@GOTPAGE
Lloh5:
	ldr	x20, [x20, _EHEA_MAP_ENTRIES@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.2:
	mov	x21, #0
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_kfree
	ldr	w8, [x20]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	ldr	x0, [x19]
	cmp	x21, w8, sxtw
	b.ge	LBB0_11
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	x9, [x0]
	ldr	x0, [x9, x21, lsl #3]
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, #0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x22, x22, #1
	ldr	x9, [x19]
	ldr	x9, [x9]
	ldr	x0, [x9, x21, lsl #3]
	cmp	x22, w8, sxtw
	b.ge	LBB0_3
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x0, #8]
	ldr	x0, [x9, x22, lsl #3]
	cbz	x0, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	bl	_kfree
	ldr	w8, [x20]
	b	LBB0_8
LBB0_11:
	bl	_kfree
	str	xzr, [x19]
LBB0_12:
Lloh6:
	adrp	x0, _ehea_busmap_mutex@GOTPAGE
Lloh7:
	ldr	x0, [x0, _ehea_busmap_mutex@GOTPAGEOFF]
	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
	b	_mutex_unlock
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ehea_busmap_mutex,4,2          ; @ehea_busmap_mutex
	.comm	_ehea_bmap,8,3                  ; @ehea_bmap
	.comm	_EHEA_MAP_ENTRIES,4,2           ; @EHEA_MAP_ENTRIES
.subsections_via_symbols
