	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmap_kvaddr
_mmap_kvaddr:                           ## @mmap_kvaddr
	.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
                                        ## kill: def $ecx killed $ecx def $rcx
	xorl	%r13d, %r13d
	cmpl	$0, (%rdx)
	je	LBB0_17
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	56(%rdx), %r15
	movq	16(%rdx), %r12
	movq	48(%rdx), %rdi
	imulq	8(%rdx), %r12
	callq	_cvt_kvaddr
	cmpq	%r14, %rax
	jne	LBB0_3
## %bb.2:
	movq	48(%rbx), %rsi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rbx), %r12d
	imull	(%rax), %r12d
	jmp	LBB0_12
LBB0_3:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	40(%rbx), %rdi
	callq	_cvt_kvaddr
	cmpq	%r14, %rax
	jne	LBB0_5
## %bb.4:
	movq	40(%rbx), %rsi
	movl	(%rbx), %r12d
	imulq	24(%rbx), %r12
	jmp	LBB0_12
LBB0_5:
	movq	32(%rbx), %rdi
	callq	_cvt_kvaddr
	cmpq	%r14, %rax
	jne	LBB0_7
## %bb.6:
	movq	32(%rbx), %rsi
	movl	(%rbx), %eax
	imulq	%rax, %r12
	jmp	LBB0_12
LBB0_7:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	imull	%r15d, %edi
	addq	48(%rbx), %rdi
	callq	_cvt_kvaddr
	cmpq	%r14, %rax
	jne	LBB0_9
## %bb.8:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	imull	%r12d, %r15d
	addq	48(%rbx), %r15
	jmp	LBB0_11
LBB0_9:
	movl	%r15d, %r15d
	movq	24(%rbx), %rdi
	imulq	%r15, %rdi
	addq	40(%rbx), %rdi
	callq	_cvt_kvaddr
	cmpq	%r14, %rax
	jne	LBB0_18
## %bb.10:
	movq	24(%rbx), %r12
	imulq	%r12, %r15
	addq	40(%rbx), %r15
LBB0_11:
	movq	%r15, %rsi
LBB0_12:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_13:
	movq	8(%rdi), %rdx
	subq	16(%rdi), %rdx
	cmpq	%r12, %rdx
	jbe	LBB0_16
## %bb.14:
	movq	_MM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rcx
	callq	_ipath_cdbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_15:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_17
LBB0_16:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %rsi
	movq	%rsi, 24(%rdi)
	movq	_ipath_file_vm_ops@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rdi)
	movq	_VM_RESERVED@GOTPCREL(%rip), %rax
	movq	_VM_DONTEXPAND@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, (%rdi)
	movl	$1, %r13d
LBB0_17:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	imulq	%r12, %r15
	movq	32(%rbx), %rdi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	addq	%r15, %rdi
	callq	_cvt_kvaddr
	cmpq	%r14, %rax
	jne	LBB0_17
## %bb.19:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %edx
	movq	_VM_WRITE@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_21
## %bb.20:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_21:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	addq	32(%rbx), %rsi
	movq	_VM_MAYWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edx
	movl	%edx, (%rdi)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_VM_WRITE,4,2                   ## @VM_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't map eager buffers as writable (flags=%lx)\n"

	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_VM_MAYWRITE,4,2                ## @VM_MAYWRITE
	.comm	_MM,4,2                         ## @MM
L_.str.1:                               ## @.str.1
	.asciz	"FAIL: reqlen %lx > %zx\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_ipath_file_vm_ops,4,2          ## @ipath_file_vm_ops
	.comm	_VM_RESERVED,4,2                ## @VM_RESERVED
	.comm	_VM_DONTEXPAND,4,2              ## @VM_DONTEXPAND
	.no_dead_strip	_mmap_kvaddr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmap_kvaddr
_mmap_kvaddr:                           ; @mmap_kvaddr
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x2]
	cbz	w8, LBB0_18
; %bb.1:
	mov	x23, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldp	x20, x25, [x2, #8]
	ldp	x0, x24, [x2, #48]
	bl	_cvt_kvaddr
	cmp	x0, x22
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x21, #48]
Lloh0:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldr	w10, [x21]
	mul	w20, w10, w9
	b	LBB0_11
LBB0_3:
	ldr	x0, [x21, #40]
	bl	_cvt_kvaddr
	cmp	x0, x22
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x21, #40]
	ldr	x9, [x21, #24]
	ldr	w10, [x21]
	mul	x20, x9, x10
	b	LBB0_11
LBB0_5:
	mul	x20, x25, x20
	ldr	x0, [x21, #32]
	bl	_cvt_kvaddr
	cmp	x0, x22
	b.ne	LBB0_7
; %bb.6:
	ldr	x8, [x21, #32]
	ldr	w9, [x21]
	mul	x20, x20, x9
	b	LBB0_11
LBB0_7:
	ldr	x8, [x21, #48]
Lloh3:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w9, [x25]
	mul	w9, w9, w23
	add	x0, x8, x9
	bl	_cvt_kvaddr
	cmp	x0, x22
	b.ne	LBB0_9
; %bb.8:
	ldr	x8, [x21, #48]
	ldr	w20, [x25]
	mul	w9, w20, w23
	add	x8, x8, x9
	b	LBB0_11
LBB0_9:
	ldr	x8, [x21, #40]
	ldr	x9, [x21, #24]
	mov	w23, w23
	madd	x0, x9, x23, x8
	bl	_cvt_kvaddr
	cmp	x0, x22
	b.ne	LBB0_15
; %bb.10:
	ldr	x8, [x21, #40]
	ldr	x20, [x21, #24]
	madd	x8, x20, x23, x8
LBB0_11:
	ldp	x9, x10, [x19, #8]
	sub	x2, x9, x10
	cmp	x2, x20
	b.ls	LBB0_14
; %bb.12:
Lloh5:
	adrp	x8, _MM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MM@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x20
	bl	_ipath_cdbg
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_19
LBB0_14:
Lloh12:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	lsr	x8, x8, x9
Lloh15:
	adrp	x9, _ipath_file_vm_ops@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ipath_file_vm_ops@GOTPAGEOFF]
	stp	x8, x9, [x19, #24]
Lloh17:
	adrp	x8, _VM_RESERVED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VM_RESERVED@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _VM_DONTEXPAND@GOTPAGE
Lloh21:
	ldr	x9, [x9, _VM_DONTEXPAND@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19]
	orr	w8, w8, w9
	str	w8, [x19]
	mov	w0, #1
	b	LBB0_19
LBB0_15:
	ldr	x8, [x21, #32]
	mul	x23, x20, x23
	add	x0, x8, x23
	bl	_cvt_kvaddr
	cmp	x0, x22
	b.ne	LBB0_18
; %bb.16:
	ldr	w2, [x19]
Lloh23:
	adrp	x8, _VM_WRITE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _VM_WRITE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_20
; %bb.17:
	ldr	x0, [x24]
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
Lloh28:
	adrp	x8, _EPERM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_13
LBB0_18:
	mov	w0, #0
LBB0_19:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_20:
	ldr	x8, [x21, #32]
	add	x8, x8, x23
Lloh30:
	adrp	x9, _VM_MAYWRITE@GOTPAGE
Lloh31:
	ldr	x9, [x9, _VM_MAYWRITE@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	bic	w9, w2, w9
	str	w9, [x19]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_VM_WRITE,4,2                   ; @VM_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't map eager buffers as writable (flags=%lx)\n"

	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_VM_MAYWRITE,4,2                ; @VM_MAYWRITE
	.comm	_MM,4,2                         ; @MM
l_.str.1:                               ; @.str.1
	.asciz	"FAIL: reqlen %lx > %zx\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_ipath_file_vm_ops,4,2          ; @ipath_file_vm_ops
	.comm	_VM_RESERVED,4,2                ; @VM_RESERVED
	.comm	_VM_DONTEXPAND,4,2              ; @VM_DONTEXPAND
	.no_dead_strip	_mmap_kvaddr
.subsections_via_symbols
