	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bsr_mmap
_bsr_mmap:                              ## @bsr_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	(%rsi), %r14
	subq	8(%rsi), %r14
	movq	(%rdi), %r15
	movl	16(%rsi), %edi
	callq	_pgprot_noncached
	movl	%eax, 16(%rbx)
	movq	(%r15), %rcx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, %rcx
	jae	LBB0_3
## %bb.1:
	cmpq	%rdx, %r14
	jne	LBB0_3
## %bb.2:
	movq	8(%rbx), %rsi
	movl	8(%r15), %edx
	sarl	$12, %edx
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_remap_4k_pfn
	testl	%eax, %eax
	je	LBB0_6
LBB0_7:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_3:
	cmpq	%rcx, %r14
	jbe	LBB0_4
## %bb.10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_4:
	movq	8(%rbx), %rsi
	movl	8(%r15), %edx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %edx
	movq	%rbx, %rdi
	movq	%r14, %rcx
	movl	%eax, %r8d
	callq	_io_remap_pfn_range
	testl	%eax, %eax
	jne	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_bsr_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bsr_mmap
_bsr_mmap:                              ; @bsr_mmap
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldp	x8, x9, [x1]
	sub	x20, x8, x9
	ldr	x21, [x0]
	ldr	w0, [x1, #16]
	bl	_pgprot_noncached
	mov	x4, x0
	str	w0, [x19, #16]
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	x20, x9, #0, lo
	b.eq	LBB0_3
; %bb.1:
	cmp	x20, x8
	b.ls	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
	ldr	x1, [x19, #8]
	ldr	w8, [x21, #8]
	asr	w2, w8, #12
	mov	x0, x19
	mov	x3, x4
	bl	_remap_4k_pfn
	cbnz	w0, LBB0_5
	b	LBB0_7
LBB0_4:
	ldr	x1, [x19, #8]
	ldr	w8, [x21, #8]
Lloh5:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	asr	w2, w8, w9
	mov	x0, x19
	mov	x3, x20
	bl	_io_remap_pfn_range
	cbz	w0, LBB0_7
LBB0_5:
Lloh8:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_bsr_mmap
.subsections_via_symbols
