	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xpc_setup_rsvd_page            ## -- Begin function xpc_setup_rsvd_page
	.p2align	4, 0x90
_xpc_setup_rsvd_page:                   ## @xpc_setup_rsvd_page
	.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
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_preempt_disable
	xorl	%eax, %eax
	callq	_smp_processor_id
	movl	%eax, %edi
	callq	_xp_cpu_to_nasid
	movl	%eax, %edi
	callq	_xpc_get_rsvd_page_pa
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_preempt_enable
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_xp_socket_pa
	movl	%eax, %edi
	callq	___va
	movq	%rax, %r14
	movl	4(%rax), %eax
	cmpl	$2, (%r14)
	jg	LBB0_4
## %bb.3:
	movzbl	%al, %eax
	movl	%eax, 4(%r14)
LBB0_4:
	movq	_xp_partition_id@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	setne	%dil
	callq	_BUG_ON
	movl	4(%r14), %edx
	movq	_xp_max_npartitions@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%edx, %edx
	js	LBB0_6
## %bb.5:
	cmpl	%ecx, %edx
	jge	LBB0_6
## %bb.7:
	movq	_XPC_RP_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movl	%ecx, 8(%r14)
	cmpl	$1, (%r14)
	jne	LBB0_8
## %bb.9:
	movl	$128, 12(%r14)
	movl	$128, %edi
	jmp	LBB0_10
LBB0_1:
	movq	_xpc_part@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ESRCH@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_15
LBB0_6:
	movq	_xpc_part@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_15
LBB0_8:
	movl	12(%r14), %edi
LBB0_10:
	movq	_xpc_nasid_mask_nbytes@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	movq	_BITS_PER_BYTE@GOTPCREL(%rip), %rax
	imull	(%rax), %edi
	callq	_BITS_TO_LONGS
	movq	_xpc_nasid_mask_nlongs@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	%r14, %rdi
	callq	_XPC_RP_PART_NASIDS
	movq	_xpc_part_nasids@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	%r14, %rdi
	callq	_XPC_RP_MACH_NASIDS
	movq	_xpc_mach_nasids@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_xpc_arch_ops@GOTPCREL(%rip), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.11:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	cmpq	16(%r14), %rax
	jne	LBB0_14
LBB0_13:
	incq	%rax
LBB0_14:
	movq	%rax, 16(%r14)
	movq	_xpc_rsvd_page@GOTPCREL(%rip), %rax
	movq	%r14, (%rax)
	xorl	%r15d, %r15d
LBB0_15:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_xpc_part,4,2                   ## @xpc_part
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SAL failed to locate the reserved page\n"

	.comm	_ESRCH,4,2                      ## @ESRCH
	.comm	_xp_partition_id,4,2            ## @xp_partition_id
	.comm	_xp_max_npartitions,4,2         ## @xp_max_npartitions
L_.str.1:                               ## @.str.1
	.asciz	"the reserved page's partid of %d is outside supported range (< 0 || >= %d)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_XPC_RP_VERSION,4,2             ## @XPC_RP_VERSION
	.comm	_xpc_nasid_mask_nbytes,4,2      ## @xpc_nasid_mask_nbytes
	.comm	_BITS_PER_BYTE,4,2              ## @BITS_PER_BYTE
	.comm	_xpc_nasid_mask_nlongs,4,2      ## @xpc_nasid_mask_nlongs
	.comm	_xpc_part_nasids,4,2            ## @xpc_part_nasids
	.comm	_xpc_mach_nasids,4,2            ## @xpc_mach_nasids
	.comm	_xpc_arch_ops,8,3               ## @xpc_arch_ops
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_xpc_rsvd_page,8,3              ## @xpc_rsvd_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xpc_setup_rsvd_page            ; -- Begin function xpc_setup_rsvd_page
	.p2align	2
_xpc_setup_rsvd_page:                   ; @xpc_setup_rsvd_page
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	bl	_preempt_disable
	bl	_smp_processor_id
	bl	_xp_cpu_to_nasid
	bl	_xpc_get_rsvd_page_pa
	mov	x19, x0
	bl	_preempt_enable
	cbz	x19, LBB0_7
; %bb.1:
	mov	x0, x19
	bl	_xp_socket_pa
	bl	___va
	mov	x19, x0
	ldp	w9, w8, [x0]
	cmp	w9, #2
	b.gt	LBB0_3
; %bb.2:
	and	w8, w8, #0xff
	str	w8, [x19, #4]
LBB0_3:
Lloh0:
	adrp	x9, _xp_partition_id@GOTPAGE
Lloh1:
	ldr	x9, [x9, _xp_partition_id@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, ne
	bl	_BUG_ON
	ldr	w9, [x19, #4]
Lloh3:
	adrp	x8, _xp_max_npartitions@GOTPAGE
Lloh4:
	ldr	x8, [x8, _xp_max_npartitions@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tbnz	w9, #31, LBB0_8
; %bb.4:
	cmp	w9, w8
	b.ge	LBB0_8
; %bb.5:
Lloh6:
	adrp	x9, _XPC_RP_VERSION@GOTPAGE
Lloh7:
	ldr	x9, [x9, _XPC_RP_VERSION@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	str	w9, [x19, #24]
	str	w8, [x19, #8]
	ldr	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_10
; %bb.6:
	mov	w8, #128
	str	w8, [x19, #12]
	b	LBB0_11
LBB0_7:
Lloh9:
	adrp	x8, _xpc_part@GOTPAGE
Lloh10:
	ldr	x8, [x8, _xpc_part@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _ESRCH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh16:
	adrp	x10, _xpc_part@GOTPAGE
Lloh17:
	ldr	x10, [x10, _xpc_part@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x10]
	stp	x9, x8, [sp]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_10:
	ldr	w8, [x19, #12]
LBB0_11:
Lloh23:
	adrp	x9, _xpc_nasid_mask_nbytes@GOTPAGE
Lloh24:
	ldr	x9, [x9, _xpc_nasid_mask_nbytes@GOTPAGEOFF]
Lloh25:
	str	w8, [x9]
Lloh26:
	adrp	x9, _BITS_PER_BYTE@GOTPAGE
Lloh27:
	ldr	x9, [x9, _BITS_PER_BYTE@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	mul	w0, w9, w8
	bl	_BITS_TO_LONGS
Lloh29:
	adrp	x8, _xpc_nasid_mask_nlongs@GOTPAGE
Lloh30:
	ldr	x8, [x8, _xpc_nasid_mask_nlongs@GOTPAGEOFF]
Lloh31:
	str	w0, [x8]
	mov	x0, x19
	bl	_XPC_RP_PART_NASIDS
Lloh32:
	adrp	x8, _xpc_part_nasids@GOTPAGE
Lloh33:
	ldr	x8, [x8, _xpc_part_nasids@GOTPAGEOFF]
Lloh34:
	str	w0, [x8]
	mov	x0, x19
	bl	_XPC_RP_MACH_NASIDS
Lloh35:
	adrp	x8, _xpc_mach_nasids@GOTPAGE
Lloh36:
	ldr	x8, [x8, _xpc_mach_nasids@GOTPAGEOFF]
Lloh37:
	str	w0, [x8]
Lloh38:
	adrp	x8, _xpc_arch_ops@GOTPAGE
Lloh39:
	ldr	x8, [x8, _xpc_arch_ops@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cbnz	w0, LBB0_16
; %bb.12:
Lloh41:
	adrp	x8, _jiffies@GOTPAGE
Lloh42:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh43:
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.13:
	ldr	x9, [x19, #16]
	cmp	x8, x9
	b.ne	LBB0_15
LBB0_14:
	add	x8, x8, #1
LBB0_15:
	mov	w0, #0
	str	x8, [x19, #16]
Lloh44:
	adrp	x8, _xpc_rsvd_page@GOTPAGE
Lloh45:
	ldr	x8, [x8, _xpc_rsvd_page@GOTPAGEOFF]
Lloh46:
	str	x19, [x8]
LBB0_16:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotStr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotStr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotStr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_xpc_part,4,2                   ; @xpc_part
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SAL failed to locate the reserved page\n"

	.comm	_ESRCH,4,2                      ; @ESRCH
	.comm	_xp_partition_id,4,2            ; @xp_partition_id
	.comm	_xp_max_npartitions,4,2         ; @xp_max_npartitions
l_.str.1:                               ; @.str.1
	.asciz	"the reserved page's partid of %d is outside supported range (< 0 || >= %d)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_XPC_RP_VERSION,4,2             ; @XPC_RP_VERSION
	.comm	_xpc_nasid_mask_nbytes,4,2      ; @xpc_nasid_mask_nbytes
	.comm	_BITS_PER_BYTE,4,2              ; @BITS_PER_BYTE
	.comm	_xpc_nasid_mask_nlongs,4,2      ; @xpc_nasid_mask_nlongs
	.comm	_xpc_part_nasids,4,2            ; @xpc_part_nasids
	.comm	_xpc_mach_nasids,4,2            ; @xpc_mach_nasids
	.comm	_xpc_arch_ops,8,3               ; @xpc_arch_ops
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_xpc_rsvd_page,8,3              ; @xpc_rsvd_page
.subsections_via_symbols
