	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _set_pages_array
__set_pages_array:                      ## @_set_pages_array
	.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
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %r13
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, %r12d
	xorl	%ebx, %ebx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rbx,8), %rdi
	callq	_PageHighMem
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13,%rbx,8), %rdi
	callq	_page_to_pfn
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shlq	%cl, %rax
	movq	(%r14), %rsi
	addq	%rax, %rsi
	movq	%rax, %rdi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	callq	_reserve_memtype
	testq	%rax, %rax
	je	LBB0_5
	jmp	LBB0_10
LBB0_6:
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %ebx
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
LBB0_7:
	movq	__PAGE_CACHE_UC_MINUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	___pgprot
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_cpa_set_pages_array
	testl	%eax, %eax
	je	LBB0_8
LBB0_10:
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.11:
	movl	%ebx, %r14d
	xorl	%ebx, %ebx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r15
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	je	LBB0_15
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rbx,8), %rdi
	callq	_PageHighMem
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r13,%rbx,8), %rdi
	callq	_page_to_pfn
	movzbl	(%r15), %ecx
	shlq	%cl, %rax
	movq	(%r12), %rsi
	addq	%rax, %rsi
	movq	%rax, %rdi
	callq	_free_memtype
	jmp	LBB0_14
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_16:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	__PAGE_CACHE_WC@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	cmpq	%r15, (%rax)
	jne	LBB0_16
## %bb.9:
	movq	%r15, %rdi
	callq	___pgprot
	movl	%eax, %r15d
	movq	__PAGE_CACHE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	___pgprot
	movq	_CPA_PAGES_ARRAY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	%r13, (%rsp)
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%eax, %ecx
	xorl	%r8d, %r8d
	callq	_change_page_attr_set_clr
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	__PAGE_CACHE_UC_MINUS,8,3       ## @_PAGE_CACHE_UC_MINUS
	.comm	__PAGE_CACHE_WC,8,3             ## @_PAGE_CACHE_WC
	.comm	__PAGE_CACHE_MASK,8,3           ## @_PAGE_CACHE_MASK
	.comm	_CPA_PAGES_ARRAY,4,2            ## @CPA_PAGES_ARRAY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	__set_pages_array
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _set_pages_array
__set_pages_array:                      ; @_set_pages_array
	.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, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	cmp	w1, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x24, #0
	mov	w25, w20
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	cmp	x25, x24
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, x24, lsl #3]
	bl	_PageHighMem
	cbnz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x19, x24, lsl #3]
	bl	_page_to_pfn
	ldr	x8, [x22]
	lsl	x0, x0, x8
	ldr	x8, [x23]
	add	x1, x0, x8
	mov	x2, x21
	mov	x3, #0
	bl	_reserve_memtype
	cbz	x0, LBB0_2
	b	LBB0_8
LBB0_5:
	mov	x24, x20
	b	LBB0_7
LBB0_6:
	mov	w24, #0
LBB0_7:
Lloh4:
	adrp	x8, __PAGE_CACHE_UC_MINUS@GOTPAGE
Lloh5:
	ldr	x8, [x8, __PAGE_CACHE_UC_MINUS@GOTPAGEOFF]
Lloh6:
	ldr	x0, [x8]
	bl	___pgprot
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_cpa_set_pages_array
	cbz	w0, LBB0_15
LBB0_8:
	cbz	w24, LBB0_13
; %bb.9:
	mov	w20, w24
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x19, x19, #8
	subs	x20, x20, #1
	b.eq	LBB0_13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19]
	bl	_PageHighMem
	cbnz	x0, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [x19]
	bl	_page_to_pfn
	ldr	x8, [x22]
	lsl	x0, x0, x8
	ldr	x8, [x23]
	add	x1, x0, x8
	bl	_free_memtype
	b	LBB0_10
LBB0_13:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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_15:
Lloh10:
	adrp	x8, __PAGE_CACHE_WC@GOTPAGE
Lloh11:
	ldr	x8, [x8, __PAGE_CACHE_WC@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x8, x21
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x21
	bl	___pgprot
	mov	x21, x0
Lloh13:
	adrp	x8, __PAGE_CACHE_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, __PAGE_CACHE_MASK@GOTPAGEOFF]
Lloh15:
	ldr	x0, [x8]
	bl	___pgprot
	mov	x3, x0
Lloh16:
	adrp	x8, _CPA_PAGES_ARRAY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CPA_PAGES_ARRAY@GOTPAGEOFF]
Lloh18:
	ldr	w5, [x8]
	mov	x0, #0
	mov	x1, x20
	mov	x2, x21
	mov	w4, #0
	mov	x6, x19
	bl	_change_page_attr_set_clr
	cbnz	w0, LBB0_8
	b	LBB0_14
LBB0_17:
	mov	w0, #0
	b	LBB0_14
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	__PAGE_CACHE_UC_MINUS,8,3       ; @_PAGE_CACHE_UC_MINUS
	.comm	__PAGE_CACHE_WC,8,3             ; @_PAGE_CACHE_WC
	.comm	__PAGE_CACHE_MASK,8,3           ; @_PAGE_CACHE_MASK
	.comm	_CPA_PAGES_ARRAY,4,2            ; @CPA_PAGES_ARRAY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	__set_pages_array
.subsections_via_symbols
