	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__thr_mutex_destroy             ## -- Begin function _thr_mutex_destroy
	.p2align	4, 0x90
__thr_mutex_destroy:                    ## @_thr_mutex_destroy
	.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	(%rdi), %rbx
	movq	_THR_MUTEX_DESTROYED@GOTPCREL(%rip), %r12
	xorl	%r15d, %r15d
	cmpq	(%r12), %rbx
	jb	LBB0_14
## %bb.1:
	je	LBB0_6
## %bb.2:
	movq	%rdi, %r14
	movq	_THR_PSHARED_PTR@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_7
## %bb.3:
	movq	%rbx, %rdi
	callq	_PMUTEX_OWNER_ID
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%rbx), %rax
	movq	_UMUTEX_RB_NOTRECOV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
LBB0_5:
	movq	(%r12), %rax
	movq	%rax, (%r14)
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	__get_curthread
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_mutex_assert_not_owned
	movq	%rbx, %rdi
	callq	___thr_free
	jmp	LBB0_14
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_7:
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	___thr_pshared_offpage
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_UMUTEX_RB_OWNERDEAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.9:
	xorl	%eax, %eax
	callq	__get_curthread
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_mutex_assert_not_owned
LBB0_10:
	movq	%r14, %rdi
	callq	___thr_pshared_destroy
LBB0_11:
	movq	(%r12), %rax
	movq	%rax, (%r14)
	jmp	LBB0_14
LBB0_12:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %r15d
LBB0_14:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_THR_MUTEX_DESTROYED,8,3        ## @THR_MUTEX_DESTROYED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_THR_PSHARED_PTR,8,3            ## @THR_PSHARED_PTR
	.comm	_UMUTEX_RB_OWNERDEAD,8,3        ## @UMUTEX_RB_OWNERDEAD
	.comm	_UMUTEX_RB_NOTRECOV,8,3         ## @UMUTEX_RB_NOTRECOV
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__thr_mutex_destroy             ; -- Begin function _thr_mutex_destroy
	.p2align	2
__thr_mutex_destroy:                    ; @_thr_mutex_destroy
	.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
	ldr	x20, [x0]
Lloh0:
	adrp	x21, _THR_MUTEX_DESTROYED@GOTPAGE
Lloh1:
	ldr	x21, [x21, _THR_MUTEX_DESTROYED@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x20, x8
	b.lo	LBB0_6
; %bb.1:
	b.eq	LBB0_7
; %bb.2:
	mov	x19, x0
Lloh2:
	adrp	x8, _THR_PSHARED_PTR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _THR_PSHARED_PTR@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x20, x8
	b.eq	LBB0_8
; %bb.3:
	mov	x0, x20
	bl	_PMUTEX_OWNER_ID
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _UMUTEX_RB_NOTRECOV@GOTPAGE
Lloh6:
	ldr	x9, [x9, _UMUTEX_RB_NOTRECOV@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
LBB0_5:
	ldr	x8, [x21]
	str	x8, [x19]
	bl	__get_curthread
	mov	x1, x20
	bl	_mutex_assert_not_owned
	mov	x0, x20
	bl	___thr_free
LBB0_6:
	mov	w0, #0
	b	LBB0_15
LBB0_7:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_8:
	mov	x0, x19
	mov	w1, #0
	bl	___thr_pshared_offpage
	cbz	x0, LBB0_12
; %bb.9:
	mov	x20, x0
	ldr	x8, [x0]
Lloh10:
	adrp	x9, _UMUTEX_RB_OWNERDEAD@GOTPAGE
Lloh11:
	ldr	x9, [x9, _UMUTEX_RB_OWNERDEAD@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.10:
	bl	__get_curthread
	mov	x1, x20
	bl	_mutex_assert_not_owned
LBB0_11:
	mov	x0, x19
	bl	___thr_pshared_destroy
LBB0_12:
	mov	w0, #0
	ldr	x8, [x21]
	str	x8, [x19]
	b	LBB0_15
LBB0_13:
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
LBB0_15:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_THR_MUTEX_DESTROYED,8,3        ; @THR_MUTEX_DESTROYED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_THR_PSHARED_PTR,8,3            ; @THR_PSHARED_PTR
	.comm	_UMUTEX_RB_OWNERDEAD,8,3        ; @UMUTEX_RB_OWNERDEAD
	.comm	_UMUTEX_RB_NOTRECOV,8,3         ; @UMUTEX_RB_NOTRECOV
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
