	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memguard_fudge                 ## -- Begin function memguard_fudge
	.p2align	4, 0x90
_memguard_fudge:                        ## @memguard_fudge
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_vm_memguard_divisor@GOTPCREL(%rip), %r15
	movl	$10, (%r15)
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_TUNABLE_INT_FETCH
	movq	%r12, %rdi
	callq	_vm_map_max
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_vm_map_min
	subl	%eax, %ebx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	addl	%ecx, %ebx
	movl	(%r15), %esi
	testl	%esi, %esi
	jle	LBB0_2
## %bb.1:
	movl	%ebx, %eax
	cltd
	idivl	%esi
	testl	%eax, %eax
	jne	LBB0_3
LBB0_2:
	movl	$10, (%r15)
	movl	$10, %esi
LBB0_3:
	movq	_vm_cnt@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, %eax
	cltd
	idivl	%esi
	imull	%ecx, %eax
	movq	_memguard_physlimit@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	%ebx, %eax
	cltd
	idivl	%esi
	movl	%eax, %edi
	callq	_round_page
	movl	%eax, %ecx
	movl	(%r12), %esi
	leal	(%rsi,%rsi), %edi
	cltd
	idivl	%edi
	imull	%r15d, %esi
	addl	%esi, %esi
	cmpl	%r15d, %eax
	cmovlel	%ecx, %esi
	movslq	%esi, %rdx
	leaq	(%rdx,%r14), %rsi
	movslq	%ebx, %rdi
	xorl	%ebx, %ebx
	cmpq	%rdi, %rsi
	cmoval	%ebx, %edx
	movq	_memguard_mapsize@GOTPCREL(%rip), %rbx
	movl	%ecx, (%rbx)
	cmpl	%r15d, %eax
	jg	LBB0_5
## %bb.4:
	cmpq	%rdi, %rsi
	jbe	LBB0_6
LBB0_5:
	movl	%edx, (%rbx)
LBB0_6:
	movslq	%edx, %rax
	addq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vm_memguard_divisor,4,2        ## @vm_memguard_divisor
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vm.memguard.divisor"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_vm_cnt,4,2                     ## @vm_cnt
	.comm	_memguard_physlimit,4,2         ## @memguard_physlimit
	.comm	_memguard_mapsize,4,2           ## @memguard_mapsize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_memguard_fudge                 ; -- Begin function memguard_fudge
	.p2align	2
_memguard_fudge:                        ; @memguard_fudge
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x20, _vm_memguard_divisor@GOTPAGE
Lloh1:
	ldr	x20, [x20, _vm_memguard_divisor@GOTPAGEOFF]
	mov	w24, #10
	str	w24, [x20]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_TUNABLE_INT_FETCH
	mov	x0, x21
	bl	_vm_map_max
	mov	x22, x0
	mov	x0, x21
	bl	_vm_map_min
Lloh4:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh5:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x23]
	sub	w9, w22, w0
	add	w21, w9, w8
	ldr	w9, [x20]
	cmp	w9, #1
	sdiv	w10, w21, w9
	ccmp	w10, #0, #4, ge
	b.ne	LBB0_2
; %bb.1:
	str	w24, [x20]
	mov	w9, #10
LBB0_2:
Lloh6:
	adrp	x10, _vm_cnt@GOTPAGE
Lloh7:
	ldr	x10, [x10, _vm_cnt@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x10]
	sdiv	w10, w20, w9
	mul	w8, w10, w8
Lloh9:
	adrp	x10, _memguard_physlimit@GOTPAGE
Lloh10:
	ldr	x10, [x10, _memguard_physlimit@GOTPAGEOFF]
Lloh11:
	str	w8, [x10]
	sdiv	w0, w21, w9
	bl	_round_page
	ldr	w8, [x23]
	lsl	w9, w8, #1
	sdiv	w12, w0, w9
	mul	w8, w20, w8
	lsl	w8, w8, #1
	cmp	w12, w20
	csel	w9, w8, w0, gt
Lloh12:
	adrp	x8, _memguard_mapsize@GOTPAGE
Lloh13:
	ldr	x8, [x8, _memguard_mapsize@GOTPAGEOFF]
	str	w0, [x8]
	add	x10, x19, w9, sxtw
	sxtw	x11, w21
	cmp	x10, x11
	csel	w9, wzr, w9, hi
	cmp	w12, w20
	b.gt	LBB0_4
; %bb.3:
	cmp	x10, x11
	b.ls	LBB0_5
LBB0_4:
	str	w9, [x8]
LBB0_5:
	add	x0, x19, w9, sxtw
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_vm_memguard_divisor,4,2        ; @vm_memguard_divisor
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vm.memguard.divisor"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_vm_cnt,4,2                     ; @vm_cnt
	.comm	_memguard_physlimit,4,2         ; @memguard_physlimit
	.comm	_memguard_mapsize,4,2           ; @memguard_mapsize
.subsections_via_symbols
