	.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
	movl	%ecx, %r15d
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	64(%rdx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%rdx), %r13d
	movq	16(%rdx), %r14
	imulq	8(%rdx), %r14
	movq	56(%rdx), %rdi
	callq	_cvt_kvaddr
	cmpq	%r12, %rax
	jne	LBB0_2
## %bb.1:
	movq	56(%rbx), %r15
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	imull	(%rax), %r13d
	jmp	LBB0_4
LBB0_2:
	movq	48(%rbx), %rdi
	callq	_cvt_kvaddr
	cmpq	%r12, %rax
	jne	LBB0_11
## %bb.3:
	movq	48(%rbx), %r15
	imull	24(%rbx), %r13d
LBB0_4:
	movq	%r13, %r14
LBB0_5:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
LBB0_6:
	movq	8(%rsi), %rax
	subq	16(%rsi), %rax
	cmpq	%r14, %rax
	jbe	LBB0_9
## %bb.7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_9:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %r15
	movq	%r15, 24(%rsi)
	movq	_qib_file_vm_ops@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rsi)
	movq	_VM_DONTEXPAND@GOTPCREL(%rip), %rax
	movq	_VM_DONTDUMP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, (%rsi)
	movl	$1, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	32(%rbx), %rdi
	callq	_cvt_kvaddr
	cmpq	%r12, %rax
	jne	LBB0_13
## %bb.12:
	movq	32(%rbx), %r15
	imulq	%r13, %r14
	jmp	LBB0_5
LBB0_13:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	imull	%r15d, %edi
	shlq	$2, %rdi
	addq	56(%rbx), %rdi
	callq	_cvt_kvaddr
	cmpq	%r12, %rax
	jne	LBB0_15
## %bb.14:
	movl	(%r13), %r14d
	imull	%r14d, %r15d
	shlq	$2, %r15
	addq	56(%rbx), %r15
	jmp	LBB0_5
LBB0_15:
	movl	24(%rbx), %edi
	imull	%r15d, %edi
	shlq	$2, %rdi
	addq	48(%rbx), %rdi
	callq	_cvt_kvaddr
	cmpq	%r12, %rax
	jne	LBB0_17
## %bb.16:
	movl	24(%rbx), %r14d
	imull	%r14d, %r15d
	shlq	$2, %r15
	addq	48(%rbx), %r15
	jmp	LBB0_5
LBB0_17:
	movl	%r15d, %r15d
	leaq	(,%r15,4), %rdi
	addq	40(%rbx), %rdi
	callq	_cvt_kvaddr
	cmpq	%r12, %rax
	jne	LBB0_19
## %bb.18:
	movq	40(%rbx), %r15
	movl	(%r13), %r14d
	jmp	LBB0_5
LBB0_19:
	imulq	%r14, %r15
	shlq	$2, %r15
	movq	32(%rbx), %rdi
	addq	%r15, %rdi
	callq	_cvt_kvaddr
	movq	%rax, %rcx
	xorl	%eax, %eax
	cmpq	%r12, %rcx
	jne	LBB0_10
## %bb.20:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	(%rsi), %edx
	movq	_VM_WRITE@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_22
## %bb.21:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_qib_devinfo
	movq	_EPERM@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_22:
	addq	32(%rbx), %r15
	movq	_VM_MAYWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edx
	movl	%edx, (%rsi)
	jmp	LBB0_6
	.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	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_qib_file_vm_ops,4,2            ## @qib_file_vm_ops
	.comm	_VM_DONTEXPAND,4,2              ## @VM_DONTEXPAND
	.comm	_VM_DONTDUMP,4,2                ## @VM_DONTDUMP
	.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
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	ldr	w25, [x2]
	ldp	x23, x26, [x2, #8]
	ldp	x0, x24, [x2, #56]
	bl	_cvt_kvaddr
	cmp	x0, x22
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x20, #56]
Lloh0:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mul	w23, w9, w25
	b	LBB0_11
LBB0_2:
	ldr	x0, [x20, #48]
	bl	_cvt_kvaddr
	cmp	x0, x22
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x20, #48]
	ldr	w9, [x20, #24]
	mul	w23, w9, w25
	b	LBB0_11
LBB0_4:
	mul	x23, x26, x23
	ldr	x0, [x20, #32]
	bl	_cvt_kvaddr
	cmp	x0, x22
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x20, #32]
	mul	x23, x23, x25
	b	LBB0_11
LBB0_6:
	ldr	x8, [x20, #56]
Lloh3:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w9, [x25]
	mul	w9, w9, w21
	add	x0, x8, w9, uxtw #2
	bl	_cvt_kvaddr
	cmp	x0, x22
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x20, #56]
	ldr	w23, [x25]
	b	LBB0_10
LBB0_8:
	ldr	x8, [x20, #48]
	ldr	w9, [x20, #24]
	mul	w9, w9, w21
	add	x0, x8, w9, uxtw #2
	bl	_cvt_kvaddr
	cmp	x0, x22
	b.ne	LBB0_16
; %bb.9:
	ldr	x8, [x20, #48]
	ldr	w23, [x20, #24]
LBB0_10:
	mul	w9, w23, w21
	add	x8, x8, w9, uxtw #2
LBB0_11:
	ldp	x9, x10, [x19, #8]
	sub	x9, x9, x10
	cmp	x9, x23
	b.ls	LBB0_14
; %bb.12:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_14:
Lloh7:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	lsr	x8, x8, x9
Lloh10:
	adrp	x9, _qib_file_vm_ops@GOTPAGE
Lloh11:
	ldr	x9, [x9, _qib_file_vm_ops@GOTPAGEOFF]
	stp	x8, x9, [x19, #24]
Lloh12:
	adrp	x8, _VM_DONTEXPAND@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VM_DONTEXPAND@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _VM_DONTDUMP@GOTPAGE
Lloh16:
	ldr	x9, [x9, _VM_DONTDUMP@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19]
	orr	w8, w8, w9
	str	w8, [x19]
	mov	w0, #1
LBB0_15:
	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_16:
	ldr	x8, [x20, #40]
	add	x0, x8, w21, uxtw #2
	bl	_cvt_kvaddr
	cmp	x0, x22
	b.ne	LBB0_18
; %bb.17:
	ldr	x8, [x20, #40]
	ldr	w23, [x25]
	b	LBB0_11
LBB0_18:
	mov	w8, w21
	ldr	x9, [x20, #32]
	mul	x21, x23, x8
	add	x0, x9, x21, lsl #2
	bl	_cvt_kvaddr
	cmp	x0, x22
	b.ne	LBB0_21
; %bb.19:
	ldr	w2, [x19]
Lloh18:
	adrp	x8, _VM_WRITE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VM_WRITE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_22
; %bb.20:
	ldr	w0, [x24]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_qib_devinfo
Lloh23:
	adrp	x8, _EPERM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_13
LBB0_21:
	mov	w0, #0
	b	LBB0_15
LBB0_22:
	ldr	x8, [x20, #32]
	add	x8, x8, x21, lsl #2
Lloh25:
	adrp	x9, _VM_MAYWRITE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _VM_MAYWRITE@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	bic	w9, w2, w9
	str	w9, [x19]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.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	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_qib_file_vm_ops,4,2            ; @qib_file_vm_ops
	.comm	_VM_DONTEXPAND,4,2              ; @VM_DONTEXPAND
	.comm	_VM_DONTDUMP,4,2                ; @VM_DONTDUMP
	.no_dead_strip	_mmap_kvaddr
.subsections_via_symbols
