	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40iw_mmap
_i40iw_mmap:                            ## @i40iw_mmap
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_to_ucontext
	movq	%rax, %r14
	movq	(%rax), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_3
## %bb.1:
	movq	_I40IW_DB_ADDR_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_I40IW_PUSH_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_7
## %bb.2:
	movq	_I40IW_PF_FIRST_PUSH_PAGE_INDEX@GOTPCREL(%rip), %rdx
	jmp	LBB0_5
LBB0_3:
	movq	_I40IW_VF_DB_ADDR_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_I40IW_VF_PUSH_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_7
## %bb.4:
	movq	_I40IW_VF_FIRST_PUSH_PAGE_INDEX@GOTPCREL(%rip), %rdx
LBB0_5:
	movl	(%rdx), %edx
	leal	(%rcx,%rdx), %esi
	decl	%esi
	movl	%esi, (%r15)
	jmp	LBB0_8
LBB0_7:
	xorl	%esi, %esi
LBB0_8:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r13
	movb	(%r13), %cl
	movl	%edi, %edx
	sarl	%cl, %edx
	addl	%esi, %edx
	movl	%edx, (%r15)
	movl	(%r13), %ecx
	sarl	%cl, %edi
	cmpl	%edi, %edx
	jne	LBB0_10
## %bb.9:
	movq	8(%r15), %rdi
	callq	_pgprot_noncached
	movq	%rax, 8(%r15)
	movq	%r14, 24(%r15)
	jmp	LBB0_14
LBB0_10:
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %eax
	subl	%eax, %edx
	movq	8(%r15), %rdi
	testb	$1, %dl
	jne	LBB0_12
## %bb.11:
	callq	_pgprot_writecombine
	jmp	LBB0_13
LBB0_12:
	callq	_pgprot_noncached
LBB0_13:
	movq	%rax, 8(%r15)
LBB0_14:
	movl	(%r15), %ebx
	movl	16(%r15), %r12d
	movq	(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_pci_resource_start
	movb	(%r13), %cl
	sarl	%cl, %eax
	addl	%eax, %ebx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	8(%r15), %r8
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_io_remap_pfn_range
	movq	_EAGAIN@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	testq	%rax, %rax
	cmovel	%r14d, %ecx
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I40IW_DB_ADDR_OFFSET,4,2       ## @I40IW_DB_ADDR_OFFSET
	.comm	_I40IW_PUSH_OFFSET,4,2          ## @I40IW_PUSH_OFFSET
	.comm	_I40IW_PF_FIRST_PUSH_PAGE_INDEX,4,2 ## @I40IW_PF_FIRST_PUSH_PAGE_INDEX
	.comm	_I40IW_VF_DB_ADDR_OFFSET,4,2    ## @I40IW_VF_DB_ADDR_OFFSET
	.comm	_I40IW_VF_PUSH_OFFSET,4,2       ## @I40IW_VF_PUSH_OFFSET
	.comm	_I40IW_VF_FIRST_PUSH_PAGE_INDEX,4,2 ## @I40IW_VF_FIRST_PUSH_PAGE_INDEX
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_i40iw_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40iw_mmap
_i40iw_mmap:                            ; @i40iw_mmap
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	bl	_to_ucontext
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _I40IW_DB_ADDR_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I40IW_DB_ADDR_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _I40IW_PUSH_OFFSET@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I40IW_PUSH_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ldr	w10, [x19]
	cbz	w10, LBB0_6
; %bb.2:
Lloh6:
	adrp	x11, _I40IW_PF_FIRST_PUSH_PAGE_INDEX@GOTPAGE
Lloh7:
	ldr	x11, [x11, _I40IW_PF_FIRST_PUSH_PAGE_INDEX@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _I40IW_VF_DB_ADDR_OFFSET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I40IW_VF_DB_ADDR_OFFSET@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _I40IW_VF_PUSH_OFFSET@GOTPAGE
Lloh12:
	ldr	x9, [x9, _I40IW_VF_PUSH_OFFSET@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	ldr	w10, [x19]
	cbz	w10, LBB0_6
; %bb.4:
Lloh14:
	adrp	x11, _I40IW_VF_FIRST_PUSH_PAGE_INDEX@GOTPAGE
Lloh15:
	ldr	x11, [x11, _I40IW_VF_FIRST_PUSH_PAGE_INDEX@GOTPAGEOFF]
LBB0_5:
	ldr	w11, [x11]
	add	w10, w10, w11
	sub	w10, w10, #1
	str	w10, [x19]
LBB0_6:
Lloh16:
	adrp	x22, _PAGE_SHIFT@GOTPAGE
Lloh17:
	ldr	x22, [x22, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w11, [x22]
	asr	w11, w8, w11
	add	w10, w10, w11
	str	w10, [x19]
	ldr	w11, [x22]
	asr	w8, w8, w11
	cmp	w10, w8
	b.ne	LBB0_8
; %bb.7:
	ldr	x0, [x19, #8]
	bl	_pgprot_noncached
	str	x0, [x19, #8]
	str	x20, [x19, #24]
	b	LBB0_12
LBB0_8:
	lsr	w8, w9, w11
	sub	w8, w10, w8
	ldr	x0, [x19, #8]
	tbnz	w8, #0, LBB0_10
; %bb.9:
	bl	_pgprot_writecombine
	b	LBB0_11
LBB0_10:
	bl	_pgprot_noncached
LBB0_11:
	str	x0, [x19, #8]
LBB0_12:
	ldr	w21, [x19, #16]
	ldr	w23, [x19]
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	w0, [x8]
	mov	w1, #0
	bl	_pci_resource_start
	ldr	w8, [x22]
	asr	w8, w0, w8
	add	w2, w8, w23
Lloh18:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	ldr	x4, [x19, #8]
	mov	x0, x19
	mov	x1, x21
	bl	_io_remap_pfn_range
Lloh21:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	x0, #0
	csneg	w0, wzr, w8, eq
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_I40IW_DB_ADDR_OFFSET,4,2       ; @I40IW_DB_ADDR_OFFSET
	.comm	_I40IW_PUSH_OFFSET,4,2          ; @I40IW_PUSH_OFFSET
	.comm	_I40IW_PF_FIRST_PUSH_PAGE_INDEX,4,2 ; @I40IW_PF_FIRST_PUSH_PAGE_INDEX
	.comm	_I40IW_VF_DB_ADDR_OFFSET,4,2    ; @I40IW_VF_DB_ADDR_OFFSET
	.comm	_I40IW_VF_PUSH_OFFSET,4,2       ; @I40IW_VF_PUSH_OFFSET
	.comm	_I40IW_VF_FIRST_PUSH_PAGE_INDEX,4,2 ; @I40IW_VF_FIRST_PUSH_PAGE_INDEX
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_i40iw_mmap
.subsections_via_symbols
