	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_th_msc_mmap
_intel_th_msc_mmap:                     ## @intel_th_msc_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), %rbx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r13d, %r15d
	negl	%r15d
	subq	8(%rsi), %rbx
	je	LBB0_4
## %bb.1:
	movq	%rsi, %r14
	movq	48(%rsi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	movq	%rbx, %rdi
	callq	_offset_in_page
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	cmpq	$0, 40(%r14)
	je	LBB0_5
LBB0_3:
	xorl	%r15d, %r15d
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_4:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	addq	$16, %r12
	movq	%r12, %rdi
	callq	_atomic_inc_unless_negative
	testl	%eax, %eax
	je	LBB0_3
## %bb.6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	movq	_MSC_MODE_SINGLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	movq	_MSC_MODE_MULTI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_8:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %rbx
	cmpq	8(%rdi), %rbx
	jne	LBB0_10
## %bb.9:
	addq	$20, %rdi
	movl	$1, %esi
	callq	_atomic_set
	jmp	LBB0_12
LBB0_10:
	testl	%r13d, %r13d
	je	LBB0_12
## %bb.11:
	movq	%r12, %rdi
	callq	_atomic_dec
	jmp	LBB0_13
LBB0_12:
	xorl	%r15d, %r15d
LBB0_13:
	movl	32(%r14), %edi
	callq	_pgprot_noncached
	movl	%eax, 32(%r14)
	movq	_VM_DONTEXPAND@GOTPCREL(%rip), %rax
	movq	_VM_DONTCOPY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, 16(%r14)
	movq	_msc_mmap_ops@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r14)
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MSC_MODE_SINGLE,8,3            ## @MSC_MODE_SINGLE
	.comm	_MSC_MODE_MULTI,8,3             ## @MSC_MODE_MULTI
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_VM_DONTEXPAND,4,2              ## @VM_DONTEXPAND
	.comm	_VM_DONTCOPY,4,2                ## @VM_DONTCOPY
	.comm	_msc_mmap_ops,4,2               ## @msc_mmap_ops
	.no_dead_strip	_intel_th_msc_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_th_msc_mmap
_intel_th_msc_mmap:                     ; @intel_th_msc_mmap
	.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
	ldp	x8, x9, [x1]
Lloh0:
	adrp	x25, _EINVAL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _EINVAL@GOTPAGEOFF]
	ldr	w23, [x25]
	neg	w20, w23
	subs	x21, x8, x9
	b.eq	LBB0_4
; %bb.1:
	mov	x19, x1
	ldr	x8, [x1, #48]
	ldr	x8, [x8]
	ldr	x24, [x8]
	mov	x0, x21
	bl	_offset_in_page
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_5
LBB0_3:
	ldr	w8, [x25]
	neg	w20, w8
LBB0_4:
	mov	x0, x20
	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_5:
	add	x22, x24, #16
	mov	x0, x22
	bl	_atomic_inc_unless_negative
	cbz	w0, LBB0_3
; %bb.6:
	ldr	x8, [x24]
Lloh2:
	adrp	x9, _MSC_MODE_SINGLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MSC_MODE_SINGLE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _MSC_MODE_MULTI@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MSC_MODE_MULTI@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_9
; %bb.7:
Lloh8:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	lsr	x8, x21, x8
	ldr	x9, [x24, #8]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	add	x0, x24, #20
	mov	w1, #1
	bl	_atomic_set
	b	LBB0_11
LBB0_9:
	cbz	w23, LBB0_11
; %bb.10:
	mov	x0, x22
	bl	_atomic_dec
	b	LBB0_12
LBB0_11:
	mov	w20, #0
LBB0_12:
	ldr	w0, [x19, #32]
	bl	_pgprot_noncached
Lloh11:
	adrp	x8, _VM_DONTEXPAND@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VM_DONTEXPAND@GOTPAGEOFF]
	str	w0, [x19, #32]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _VM_DONTCOPY@GOTPAGE
Lloh15:
	ldr	x9, [x9, _VM_DONTCOPY@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19, #16]
	orr	w8, w8, w9
	str	w8, [x19, #16]
Lloh17:
	adrp	x8, _msc_mmap_ops@GOTPAGE
Lloh18:
	ldr	x8, [x8, _msc_mmap_ops@GOTPAGEOFF]
	str	x8, [x19, #24]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MSC_MODE_SINGLE,8,3            ; @MSC_MODE_SINGLE
	.comm	_MSC_MODE_MULTI,8,3             ; @MSC_MODE_MULTI
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_VM_DONTEXPAND,4,2              ; @VM_DONTEXPAND
	.comm	_VM_DONTCOPY,4,2                ; @VM_DONTCOPY
	.comm	_msc_mmap_ops,4,2               ; @msc_mmap_ops
	.no_dead_strip	_intel_th_msc_mmap
.subsections_via_symbols
