	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iounit_get_area
_iounit_get_area:                       ## @iounit_get_area
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	notq	%rax
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	andq	%rsi, %rax
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
	movslq	%edx, %rcx
	addq	%rax, %rcx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rax,%rcx), %r13
	decq	%r13
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %r13
	movq	%rdi, %r12
	cmpl	$2, %r13d
	movl	$306, %eax                      ## imm = 0x132
	movl	$531, %ecx                      ## imm = 0x213
	cmovel	%eax, %ecx
	movl	%r13d, %r14d
	decl	%r14d
	movl	$561, %ebx                      ## imm = 0x231
	cmovnel	%ecx, %ebx
	negl	%r14d
	movslq	%r13d, %r15
	movq	%r15, %rdi
	callq	_IOD
	movl	%ebx, %eax
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
                                        ##       Child Loop BB0_4 Depth 3
                                        ##         Child Loop BB0_13 Depth 4
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
                                        ## kill: def $eax killed $eax def $rax
	andl	$15, %eax
	leaq	-1(%rax), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rcx
	movq	8(%r12), %rdx
	movq	-8(%rcx,%rax,8), %rcx
	movq	(%rdx,%rax,8), %rbx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rdx
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_4 Depth 3
                                        ##         Child Loop BB0_13 Depth 4
	movl	24(%r12), %edi
	movq	%rbx, %rsi
	callq	_find_next_zero_bit
	movq	%rax, %rcx
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_13 Depth 4
	addq	%r15, %rcx
	cmpq	%rbx, %rcx
	ja	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=3
	cmpl	$2, %r13d
	jl	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=3
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leal	1(%rax), %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ##       Parent Loop BB0_4 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movl	24(%r12), %esi
	movl	%ebx, %edi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_3
## %bb.12:                              ##   in Loop: Header=BB0_13 Depth=4
	decq	%r15
	incl	%ebx
	cmpl	%r15d, %r14d
	jne	LBB0_13
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=3
	movl	24(%r12), %edi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	subq	%r15, %rdx
	addq	$2, %rdx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_find_next_zero_bit
	movq	%rax, %rcx
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	cmpq	%rsi, %rbx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=2
	movq	8(%r12), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rdx
	movq	%rsi, %rbx
	jmp	LBB0_2
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	-80(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %ebx
	shrl	$4, %ebx
	testb	$-16, %al
	movl	%ebx, %eax
	jne	LBB0_1
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str.1(%rip), %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	callq	_panic
	movl	%ebx, %eax
	jmp	LBB0_1
LBB0_14:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	subq	%r15, %rax
	incq	%rax
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_15:
	movq	%rax, %rdx
	cmpq	%rbx, %rax
	jb	LBB0_17
## %bb.16:
	movq	8(%r12), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,8), %rdx
LBB0_17:
	movq	(%r12), %rcx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rdx, (%rcx,%rsi,8)
	subq	%r15, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_PAGE_MASK@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	andq	-72(%rbp), %rdi                 ## 8-byte Folded Reload
	callq	___pa
	movl	%eax, %edi
	callq	_MKIOPTE
	movl	%eax, %r14d
	movq	_IOUNIT_DMA_BASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rbx
	testl	%r13d, %r13d
	jle	LBB0_20
## %bb.18:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	24(%r12), %esi
	movq	%r15, %rdi
	callq	_set_bit
	movq	16(%r12), %rax
	movl	%r14d, (%rax,%r15,4)
	movl	%r14d, %edi
	callq	_iopte_val
	leaq	256(%rax), %rdi
	callq	___iopte
	movl	%eax, %r14d
	incq	%r15
	decl	%r13d
	jne	LBB0_19
LBB0_20:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $cl killed $cl killed $rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	shlq	%cl, %rax
	addq	-64(%rbp), %rax                 ## 8-byte Folded Reload
	notq	%rbx
	andq	-72(%rbp), %rbx                 ## 8-byte Folded Reload
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_IOD
	movq	%rbx, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	incq	%rax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MASK,8,3                  ## @PAGE_MASK
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"iounit_get_area: Couldn't find free iopte slots for (%08lx,%d)\n"

	.comm	_IOUNIT_DMA_BASE,8,3            ## @IOUNIT_DMA_BASE
	.no_dead_strip	_iounit_get_area
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iounit_get_area
_iounit_get_area:                       ; @iounit_get_area
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	bic	x8, x1, x8
	str	w2, [sp, #8]                    ; 4-byte Folded Spill
	add	x8, x8, w2, sxtw
Lloh3:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldrsw	x9, [x9]
	add	x8, x9, x8
	sub	x8, x8, #1
Lloh6:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	lsr	x26, x8, x9
	mov	w8, #531
	mov	w9, #306
	cmp	w26, #2
	csel	w8, w9, w8, eq
	subs	w28, w26, #1
	mov	w9, #561
	csel	w23, w9, w8, eq
	sxtw	x22, w26
	mov	x0, x22
	bl	_IOD
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
                                        ;       Child Loop BB0_4 Depth 3
	str	w23, [sp, #12]                  ; 4-byte Folded Spill
	and	w8, w23, #0xf
	sub	w9, w8, #1
	sxtw	x27, w9
	ldp	x10, x11, [x20]
	ldr	x21, [x10, w9, sxtw #3]
	ldr	x24, [x11, w8, uxtw #3]
	mov	x2, x21
	ldr	w0, [x20, #24]
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_4 Depth 3
	mov	x1, x24
	bl	_find_next_zero_bit
	add	x8, x0, x22
	cmp	x8, x24
	b.hi	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=2
	add	x25, x0, #1
	mov	x23, x28
	cmp	w26, #2
	b.lt	LBB0_11
LBB0_4:                                 ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_2 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w1, [x20, #24]
	mov	x0, x25
	bl	_test_bit
	cbnz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=3
	add	x25, x25, #1
	subs	w23, w23, #1
	b.ne	LBB0_4
	b	LBB0_11
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=2
	cmp	x24, x21
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	x8, [x20, #8]
	ldr	x2, [x8, x27, lsl #3]
	mov	x24, x21
	ldr	w0, [x20, #24]
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=2
	ldr	w0, [x20, #24]
	add	x2, x25, #1
	b	LBB0_2
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	lsr	w21, w8, #4
	tst	w8, #0xf0
	mov	x23, x21
	b.ne	LBB0_1
; %bb.10:                               ;   in Loop: Header=BB0_1 Depth=1
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	ldr	w2, [sp, #8]                    ; 4-byte Folded Reload
	bl	_panic
	mov	x23, x21
	b	LBB0_1
LBB0_11:
	mov	x8, x25
	cmp	x25, x24
	b.lo	LBB0_13
; %bb.12:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, x27, lsl #3]
LBB0_13:
	ldr	x9, [x20]
	str	x8, [x9, x27, lsl #3]
	sub	x23, x25, x22
Lloh11:
	adrp	x22, _PAGE_MASK@GOTPAGE
Lloh12:
	ldr	x22, [x22, _PAGE_MASK@GOTPAGEOFF]
	ldr	x8, [x22]
	and	x0, x8, x19
	bl	___pa
	bl	_MKIOPTE
Lloh13:
	adrp	x8, _IOUNIT_DMA_BASE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IOUNIT_DMA_BASE@GOTPAGEOFF]
Lloh15:
	ldr	x24, [x8]
Lloh16:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	x27, [x8]
	ldr	x25, [x22]
	cmp	w26, #1
	b.lt	LBB0_16
; %bb.14:
	mov	x21, x0
	mov	x22, x23
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20, #24]
	mov	x0, x22
	bl	_set_bit
	ldr	x8, [x20, #16]
	str	w21, [x8, x22, lsl #2]
	mov	x0, x21
	bl	_iopte_val
	add	x0, x0, #256
	bl	___iopte
	mov	x21, x0
	add	x22, x22, #1
	subs	w26, w26, #1
	b.ne	LBB0_15
LBB0_16:
	lsl	x8, x23, x27
	bic	x9, x19, x25
	add	x8, x8, x24
	add	x19, x8, x9
	mov	x0, x19
	bl	_IOD
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,8,3                  ; @PAGE_MASK
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"iounit_get_area: Couldn't find free iopte slots for (%08lx,%d)\n"

	.comm	_IOUNIT_DMA_BASE,8,3            ; @IOUNIT_DMA_BASE
	.no_dead_strip	_iounit_get_area
.subsections_via_symbols
