	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sg_pager_alloc
_sg_pager_alloc:                        ## @sg_pager_alloc
	.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	_PAGE_MASK@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_3
LBB0_1:
	xorl	%r12d, %r12d
LBB0_2:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%ecx, %r15d
	movl	(%rdi), %r8d
	testl	%r8d, %r8d
	jle	LBB0_8
## %bb.4:
	movq	8(%rdi), %r9
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r9,%rcx,8), %eax
	cltd
	idivl	%r10d
	testl	%edx, %edx
	jne	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%r9,%rcx,8), %eax
	cltd
	idivl	%r10d
	testl	%edx, %edx
	jne	LBB0_2
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cltq
	addq	%rax, %rbx
	incq	%rcx
	cmpq	%rcx, %r8
	jne	LBB0_5
	jmp	LBB0_9
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %edi
	callq	_round_page
	movl	%eax, %r14d
	movl	%r15d, %edi
	callq	_OFF_TO_IDX
	movq	%rax, %r12
	movl	%r14d, %edi
	callq	_OFF_TO_IDX
	movq	%rax, %r13
	addq	%r12, %r13
	cmpq	%rbx, %r13
	jg	LBB0_1
## %bb.11:
	movl	%r15d, %edi
	callq	_OFF_TO_IDX
	cmpq	%rax, %r13
	jl	LBB0_1
## %bb.13:
	movl	%r14d, %edi
	callq	_OFF_TO_IDX
	cmpq	%rax, %r13
	jl	LBB0_1
## %bb.15:
	movq	_OBJT_SG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_vm_object_allocate
	movq	%rax, %r12
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_sglist_hold
	movl	%eax, 4(%r12)
	movq	%r12, %rdi
	callq	_TAILQ_INIT
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_OBJT_SG,4,2                    ## @OBJT_SG
	.no_dead_strip	_sg_pager_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sg_pager_alloc
_sg_pager_alloc:                        ; @sg_pager_alloc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w3
	b.eq	LBB0_3
LBB0_1:
	mov	x20, #0
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x21, x3
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x20, #0
	ldr	x10, [x19, #8]
Lloh3:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	add	x10, x10, #4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w11, [x10, #-4]
	sdiv	w12, w11, w9
	msub	w11, w12, w9, w11
	cbnz	w11, LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w12, [x10]
	sdiv	w11, w12, w9
	msub	w12, w11, w9, w12
	cbnz	w12, LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, w11, sxtw
	add	x10, x10, #8
	subs	x8, x8, #1
	b.ne	LBB0_5
	b	LBB0_9
LBB0_8:
	mov	x20, #0
LBB0_9:
	mov	x0, x1
	bl	_round_page
	mov	x22, x0
	mov	x0, x21
	bl	_OFF_TO_IDX
	mov	x23, x0
	mov	x0, x22
	bl	_OFF_TO_IDX
	add	x23, x0, x23
	cmp	x23, x20
	b.gt	LBB0_1
; %bb.10:
	mov	x0, x21
	bl	_OFF_TO_IDX
	cmp	x23, x0
	b.lt	LBB0_1
; %bb.11:
	mov	x0, x22
	bl	_OFF_TO_IDX
	cmp	x23, x0
	b.lt	LBB0_1
; %bb.12:
Lloh6:
	adrp	x8, _OBJT_SG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OBJT_SG@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_vm_object_allocate
	mov	x20, x0
	mov	x0, x19
	bl	_sglist_hold
	str	w0, [x20, #4]
	mov	x0, x20
	bl	_TAILQ_INIT
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_OBJT_SG,4,2                    ; @OBJT_SG
	.no_dead_strip	_sg_pager_alloc
.subsections_via_symbols
