	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tbm_lossify
_tbm_lossify:                           ## @tbm_lossify
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_TBM_NOT_ITERATING@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movq	8(%rbx), %rax
	movq	_TBM_HASH@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_Assert
	movl	24(%rbx), %edx
	movl	28(%rbx), %edi
	leaq	-32(%rbp), %r14
	movq	%r14, %rsi
	callq	_pagetable_start_iterate_at
	movl	28(%rbx), %edi
	movq	%r14, %rsi
	callq	_pagetable_iterate
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	_PAGES_PER_CHUNK@GOTPCREL(%rip), %r15
	leaq	-32(%rbp), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	28(%rbx), %edi
	movq	%r14, %rsi
	callq	_pagetable_iterate
	testq	%rax, %rax
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 8(%rax)
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rax), %esi
	movl	%esi, %eax
	cltd
	idivl	(%r15)
	testl	%edx, %edx
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_tbm_mark_page_lossy
	movl	20(%rbx), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, 16(%rbx)
	jg	LBB0_3
## %bb.6:
	movl	-32(%rbp), %eax
	movl	%eax, 24(%rbx)
LBB0_7:
	movl	16(%rbx), %edi
	movl	20(%rbx), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %edi
	jle	LBB0_9
## %bb.8:
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	decl	%ecx
	shrl	$31, %ecx
	leal	(%rax,%rcx), %esi
	decl	%esi
	sarl	%esi
	callq	_Min
	addl	%eax, %eax
	movl	%eax, 20(%rbx)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TBM_NOT_ITERATING,8,3          ## @TBM_NOT_ITERATING
	.comm	_TBM_HASH,8,3                   ## @TBM_HASH
	.comm	_PAGES_PER_CHUNK,4,2            ## @PAGES_PER_CHUNK
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_tbm_lossify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tbm_lossify
_tbm_lossify:                           ; @tbm_lossify
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _TBM_NOT_ITERATING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TBM_NOT_ITERATING@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _TBM_HASH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TBM_HASH@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_Assert
	ldp	w2, w0, [x19, #24]
	add	x1, sp, #8
	bl	_pagetable_start_iterate_at
	ldr	w0, [x19, #28]
	add	x1, sp, #8
	bl	_pagetable_iterate
	cbz	x0, LBB0_7
; %bb.1:
Lloh6:
	adrp	x20, _PAGES_PER_CHUNK@GOTPAGE
Lloh7:
	ldr	x20, [x20, _PAGES_PER_CHUNK@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19, #28]
	add	x1, sp, #8
	bl	_pagetable_iterate
	cbz	x0, LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x0, #8]
	cbnz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x0]
	ldr	w8, [x20]
	sdiv	w9, w1, w8
	msub	w8, w9, w8, w1
	cbz	w8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_tbm_mark_page_lossy
	ldp	w8, w9, [x19, #16]
	cmp	w9, #0
	cinc	w9, w9, lt
	cmp	w8, w9, asr #1
	b.gt	LBB0_2
; %bb.6:
	ldr	w8, [sp, #8]
	str	w8, [x19, #24]
LBB0_7:
	ldp	w0, w8, [x19, #16]
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w0, w8, asr #1
	b.le	LBB0_9
; %bb.8:
Lloh8:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	sub	w9, w8, #1
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w1, w8, #1
	bl	_Min
	lsl	w8, w0, #1
	str	w8, [x19, #20]
LBB0_9:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_TBM_NOT_ITERATING,8,3          ; @TBM_NOT_ITERATING
	.comm	_TBM_HASH,8,3                   ; @TBM_HASH
	.comm	_PAGES_PER_CHUNK,4,2            ; @PAGES_PER_CHUNK
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_tbm_lossify
.subsections_via_symbols
