	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_free_ldt                       ## -- Begin function free_ldt
	.p2align	4, 0x90
_free_ldt:                              ## @free_ldt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_ptrace_ldt@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_5
## %bb.1:
	movl	(%r14), %eax
	movq	_LDT_DIRECT_ENTRIES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_5
## %bb.2:
	movq	_LDT_ENTRIES_PER_PAGE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	testl	%eax, %eax
	jle	LBB0_5
## %bb.3:
	movl	%eax, %ebx
	incq	%rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %eax
	movq	8(%r14), %rcx
	movq	(%rcx,%rax,8), %rdi
	callq	_free_page
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_4
LBB0_5:
	movl	$0, (%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ptrace_ldt,4,2                 ## @ptrace_ldt
	.comm	_LDT_DIRECT_ENTRIES,4,2         ## @LDT_DIRECT_ENTRIES
	.comm	_LDT_ENTRIES_PER_PAGE,4,2       ## @LDT_ENTRIES_PER_PAGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_free_ldt                       ; -- Begin function free_ldt
	.p2align	2
_free_ldt:                              ; @free_ldt
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _ptrace_ldt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ptrace_ldt@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbnz	w8, LBB0_5
; %bb.1:
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _LDT_DIRECT_ENTRIES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LDT_DIRECT_ENTRIES@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_5
; %bb.2:
Lloh6:
	adrp	x9, _LDT_ENTRIES_PER_PAGE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LDT_ENTRIES_PER_PAGE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	add	x20, x8, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w20, #2
	ldr	x9, [x19, #8]
	ldr	x0, [x9, w8, uxtw #3]
	bl	_free_page
	sub	x20, x20, #1
	cmp	x20, #1
	b.hi	LBB0_4
LBB0_5:
	str	wzr, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ptrace_ldt,4,2                 ; @ptrace_ldt
	.comm	_LDT_DIRECT_ENTRIES,4,2         ; @LDT_DIRECT_ENTRIES
	.comm	_LDT_ENTRIES_PER_PAGE,4,2       ; @LDT_ENTRIES_PER_PAGE
.subsections_via_symbols
