	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__pthread_barrier_destroy       ## -- Begin function _pthread_barrier_destroy
	.p2align	4, 0x90
__pthread_barrier_destroy:              ## @_pthread_barrier_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.2:
	movq	_THR_PSHARED_PTR@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%rbx, %r13
	cmpq	%r12, %rbx
	jne	LBB0_4
## %bb.3:
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	___thr_pshared_offpage
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_14
LBB0_4:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	__get_curthread
	movq	%rax, %r12
	leaq	24(%r13), %r15
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_THR_UMUTEX_LOCK
	cmpl	$0, (%r13)
	jne	LBB0_10
## %bb.5:
	movl	$1, (%r13)
	cmpq	$0, 8(%r13)
	jg	LBB0_9
## %bb.6:
	leaq	28(%r13), %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 16(%r13)
	je	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	__thr_ucond_wait
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_THR_UMUTEX_LOCK
	cmpq	$0, 8(%r13)
	jle	LBB0_7
LBB0_9:
	movl	$0, (%r13)
LBB0_10:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_THR_UMUTEX_UNLOCK
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	$0, (%r14)
	jmp	LBB0_13
LBB0_15:
	movl	$0, (%r13)
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_THR_UMUTEX_UNLOCK
	movq	$0, (%r14)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -56(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_17
## %bb.16:
	movq	%r13, %rdi
	callq	_free
	jmp	LBB0_18
LBB0_17:
	movq	%r14, %rdi
	callq	___thr_pshared_destroy
LBB0_18:
	xorl	%r15d, %r15d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_THR_PSHARED_PTR,8,3            ## @THR_PSHARED_PTR
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__pthread_barrier_destroy       ; -- Begin function _pthread_barrier_destroy
	.p2align	2
__pthread_barrier_destroy:              ; @_pthread_barrier_destroy
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
	ldr	x24, [x0]
	cbz	x24, LBB0_11
; %bb.2:
Lloh0:
	adrp	x8, _THR_PSHARED_PTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _THR_PSHARED_PTR@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
	mov	x20, x24
	cmp	x24, x25
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #0
	bl	___thr_pshared_offpage
	mov	x20, x0
	cbz	x0, LBB0_14
LBB0_4:
	bl	__get_curthread
	mov	x22, x0
	add	x21, x20, #24
	mov	x1, x21
	bl	_THR_UMUTEX_LOCK
	ldr	w8, [x20]
	cbnz	w8, LBB0_10
; %bb.5:
	mov	w8, #1
	str	w8, [x20]
	ldr	x8, [x20, #8]
	cmp	x8, #0
	b.gt	LBB0_9
; %bb.6:
	add	x23, x20, #28
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	mov	x1, x21
	mov	x2, #0
	mov	w3, #0
	bl	__thr_ucond_wait
	mov	x0, x22
	mov	x1, x21
	bl	_THR_UMUTEX_LOCK
	ldr	x8, [x20, #8]
	cmp	x8, #0
	b.le	LBB0_7
LBB0_9:
	str	wzr, [x20]
LBB0_10:
	mov	x0, x22
	mov	x1, x21
	bl	_THR_UMUTEX_UNLOCK
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_14:
	str	xzr, [x19]
	b	LBB0_13
LBB0_15:
	str	wzr, [x20]
	mov	x0, x22
	mov	x1, x21
	bl	_THR_UMUTEX_UNLOCK
	str	xzr, [x19]
	cmp	x24, x25
	b.eq	LBB0_17
; %bb.16:
	mov	x0, x20
	bl	_free
	b	LBB0_18
LBB0_17:
	mov	x0, x19
	bl	___thr_pshared_destroy
LBB0_18:
	mov	w0, #0
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_THR_PSHARED_PTR,8,3            ; @THR_PSHARED_PTR
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
