	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_iommu_map
_omap_iommu_map:                        ## @omap_iommu_map
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)
	callq	_to_omap_domain
	movq	%rax, %r12
	movq	16(%rax), %r14
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movslq	(%rax), %rbx
	movq	%r13, %rdi
	callq	_bytes_to_iopgsz
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	leaq	-44(%rbp), %rcx
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdx
	movq	%r13, %r8
	callq	_dev_dbg
	movl	-44(%rbp), %edx
	leaq	-48(%rbp), %rdi
	movq	%r14, %rsi
	movl	%r15d, %ecx
	callq	_iotlb_init_entry
	cmpl	$0, (%r12)
	jle	LBB0_3
## %bb.4:
	movq	8(%r12), %r13
	leaq	-48(%rbp), %r15
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%r14,8), %rdi
	movq	%r15, %rsi
	callq	_omap_iopgtable_store_entry
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	cmpl	(%r12), %r14d
	jl	LBB0_5
## %bb.7:
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_dev_err
	xorl	%ebx, %ebx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_3:
	negq	%rbx
	jmp	LBB0_11
LBB0_8:
	movq	%rax, %rbx
	leaq	L_.str.2(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rdx
	callq	_dev_err
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.9:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	-8(%r13,%r14,8), %rdi
	movq	%r15, %rsi
	callq	_iopgtable_clear_entry
	decq	%r14
	testl	%r14d, %r14d
	jne	LBB0_10
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid size to map: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"mapping da 0x%lx to pa %pa size 0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"omap_iopgtable_store_entry failed: %d\n"

	.no_dead_strip	_omap_iommu_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_iommu_map
_omap_iommu_map:                        ; @omap_iommu_map
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x22, x3
	mov	x19, x1
	str	w2, [sp, #12]
	bl	_to_omap_domain
	mov	x21, x0
	ldr	x20, [x0, #16]
Lloh0:
	adrp	x25, _EINVAL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _EINVAL@GOTPAGEOFF]
	ldrsw	x24, [x25]
	mov	x0, x22
	bl	_bytes_to_iopgsz
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x23, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x3, sp, #12
	mov	x0, x20
	mov	x2, x19
	mov	x4, x22
	bl	_dev_dbg
	ldr	w2, [sp, #12]
	add	x0, sp, #8
	mov	x1, x19
	mov	x3, x23
	bl	_iotlb_init_entry
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x23, #0
	ldr	x24, [x21, #8]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x24, x23, lsl #3]
	add	x1, sp, #8
	bl	_omap_iopgtable_store_entry
	cbnz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	add	x23, x23, #1
	cmp	w23, w8
	b.lt	LBB0_3
; %bb.5:
	mov	x22, #0
	b	LBB0_11
LBB0_6:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_dev_err
	ldr	w8, [x25]
	neg	w22, w8
	b	LBB0_11
LBB0_7:
	neg	x22, x24
	b	LBB0_11
LBB0_8:
	mov	x22, x0
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_dev_err
	cbz	w23, LBB0_11
; %bb.9:
	sub	x20, x24, #8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20, x23, lsl #3]
	mov	x1, x19
	bl	_iopgtable_clear_entry
	sub	x23, x23, #1
	cbnz	w23, LBB0_10
LBB0_11:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid size to map: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"mapping da 0x%lx to pa %pa size 0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"omap_iopgtable_store_entry failed: %d\n"

	.no_dead_strip	_omap_iommu_map
.subsections_via_symbols
