	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mbcs_gscr_mmap
_mbcs_gscr_mmap:                        ## @mbcs_gscr_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
	cmpq	$0, (%rsi)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_2:
	movq	%rsi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %r15
	movl	8(%rsi), %edi
	callq	_pgprot_noncached
	movl	%eax, 8(%rbx)
	movl	12(%rbx), %r14d
	movl	(%r15), %edi
	callq	___pa
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	8(%rbx), %r8d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_remap_pfn_range
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%eax, %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_mbcs_gscr_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mbcs_gscr_mmap
_mbcs_gscr_mmap:                        ; @mbcs_gscr_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
	ldr	x8, [x1]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x19, x1
	ldr	x8, [x0]
	ldr	x21, [x8]
	ldr	w0, [x1, #8]
	bl	_pgprot_noncached
	str	w0, [x19, #8]
	ldr	w20, [x19, #12]
	ldr	w0, [x21]
	bl	___pa
Lloh2:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	asr	w2, w0, w8
Lloh5:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	ldr	w4, [x19, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_remap_pfn_range
	cbz	x0, LBB0_5
; %bb.3:
Lloh8:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_mbcs_gscr_mmap
.subsections_via_symbols
