	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_user_ldt_free                  ## -- Begin function user_ldt_free
	.p2align	4, 0x90
_user_ldt_free:                         ## @user_ldt_free
	.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, %r15
	movq	(%rdi), %rbx
	movq	_dt_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_lock
	movq	8(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_4
## %bb.1:
	xorl	%eax, %eax
	callq	_critical_enter
	movq	$0, 8(%rbx)
	xorl	%eax, %eax
	callq	_atomic_thread_fence_rel
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_bzero
	movq	_curthread@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_3
## %bb.2:
	movq	_GNULL_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SEL_KPL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GSEL
	movl	%eax, %edi
	callq	_lldt
LBB0_3:
	xorl	%eax, %eax
	callq	_critical_exit
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_user_ldt_deref                 ## TAILCALL
LBB0_4:
	movq	_dt_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtx_unlock                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_dt_lock,4,2                    ## @dt_lock
	.comm	_curthread,8,3                  ## @curthread
	.comm	_GNULL_SEL,4,2                  ## @GNULL_SEL
	.comm	_SEL_KPL,4,2                    ## @SEL_KPL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_user_ldt_free                  ; -- Begin function user_ldt_free
	.p2align	2
_user_ldt_free:                         ; @user_ldt_free
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x0, _dt_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _dt_lock@GOTPAGEOFF]
	bl	_mtx_lock
	ldr	x19, [x21, #8]
	cbz	x19, LBB0_4
; %bb.1:
	bl	_critical_enter
	str	xzr, [x21, #8]
	bl	_atomic_thread_fence_rel
	mov	x0, x21
	mov	w1, #4
	bl	_bzero
Lloh2:
	adrp	x8, _curthread@GOTPAGE
Lloh3:
	ldr	x8, [x8, _curthread@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x8, x20
	b.ne	LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _GNULL_SEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GNULL_SEL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _SEL_KPL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SEL_KPL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_GSEL
	bl	_lldt
LBB0_3:
	bl	_critical_exit
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_user_ldt_deref
LBB0_4:
Lloh11:
	adrp	x0, _dt_lock@GOTPAGE
Lloh12:
	ldr	x0, [x0, _dt_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mtx_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_dt_lock,4,2                    ; @dt_lock
	.comm	_curthread,8,3                  ; @curthread
	.comm	_GNULL_SEL,4,2                  ; @GNULL_SEL
	.comm	_SEL_KPL,4,2                    ; @SEL_KPL
.subsections_via_symbols
