	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lomac_thread_userret
_lomac_thread_userret:                  ## @lomac_thread_userret
	.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	(%rdi), %r14
	movl	8(%r14), %edi
	callq	_PSLOT
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_mtx_lock
	movq	_MAC_LOMAC_FLAG_UPDATE@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	andl	4(%r12), %ebx
	movq	%r12, %rdi
	callq	_mtx_unlock
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.1:
	xorl	%eax, %eax
	callq	_crget
	movq	%rax, %r15
	movq	_Giant@GOTPCREL(%rip), %rdi
	callq	_mtx_lock
	movq	%r14, %rdi
	callq	_PROC_LOCK
	movq	%r12, %rdi
	callq	_mtx_lock
	movl	(%r13), %eax
	testl	%eax, 4(%r12)
	je	LBB0_3
## %bb.2:
	movq	%r12, %rbx
	addq	$4, %rbx
	movq	(%r14), %r13
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_crcopy
	movq	%r15, %rdi
	callq	_crhold
	movl	(%r15), %edi
	callq	_SLOT
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_lomac_copy
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_proc_set_cred
	movq	%r13, %rdi
	callq	_crfree
	movq	%r12, %rdi
	callq	_mtx_unlock
	movq	%r14, %rdi
	callq	_PROC_UNLOCK
	movq	_curthread@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mac_proc_vm_revoke
	jmp	LBB0_4
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r15, %rdi
	callq	_crfree
	movq	%r12, %rdi
	callq	_mtx_unlock
	movq	%r14, %rdi
	callq	_PROC_UNLOCK
LBB0_4:
	movq	_Giant@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtx_unlock                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC_LOMAC_FLAG_UPDATE,4,2      ## @MAC_LOMAC_FLAG_UPDATE
	.comm	_Giant,4,2                      ## @Giant
	.comm	_curthread,4,2                  ## @curthread
	.no_dead_strip	_lomac_thread_userret
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lomac_thread_userret
_lomac_thread_userret:                  ; @lomac_thread_userret
	.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
	ldr	x19, [x0]
	ldr	w0, [x19, #8]
	bl	_PSLOT
	mov	x20, x0
	bl	_mtx_lock
	mov	x21, x20
	ldr	w8, [x21, #4]!
Lloh0:
	adrp	x23, _MAC_LOMAC_FLAG_UPDATE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MAC_LOMAC_FLAG_UPDATE@GOTPAGEOFF]
	ldr	w9, [x23]
	and	w22, w9, w8
	mov	x0, x20
	bl	_mtx_unlock
	cbz	w22, LBB0_3
; %bb.1:
	bl	_crget
	mov	x22, x0
Lloh2:
	adrp	x0, _Giant@GOTPAGE
Lloh3:
	ldr	x0, [x0, _Giant@GOTPAGEOFF]
	bl	_mtx_lock
	mov	x0, x19
	bl	_PROC_LOCK
	mov	x0, x20
	bl	_mtx_lock
	ldr	w8, [x20, #4]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	ldr	x23, [x19]
	mov	x0, x22
	mov	x1, x23
	bl	_crcopy
	mov	x0, x22
	bl	_crhold
	ldr	w0, [x22]
	bl	_SLOT
	mov	x1, x0
	mov	x0, x21
	bl	_lomac_copy
	mov	x0, x19
	mov	x1, x22
	bl	_proc_set_cred
	mov	x0, x23
	bl	_crfree
	mov	x0, x20
	bl	_mtx_unlock
	mov	x0, x19
	bl	_PROC_UNLOCK
Lloh4:
	adrp	x8, _curthread@GOTPAGE
Lloh5:
	ldr	x8, [x8, _curthread@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_mac_proc_vm_revoke
	b	LBB0_5
LBB0_3:
	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_4:
	mov	x0, x22
	bl	_crfree
	mov	x0, x20
	bl	_mtx_unlock
	mov	x0, x19
	bl	_PROC_UNLOCK
LBB0_5:
Lloh7:
	adrp	x0, _Giant@GOTPAGE
Lloh8:
	ldr	x0, [x0, _Giant@GOTPAGEOFF]
	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
	b	_mtx_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC_LOMAC_FLAG_UPDATE,4,2      ; @MAC_LOMAC_FLAG_UPDATE
	.comm	_Giant,4,2                      ; @Giant
	.comm	_curthread,4,2                  ; @curthread
	.no_dead_strip	_lomac_thread_userret
.subsections_via_symbols
