	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %r15
	movq	(%rdi), %r14
	movq	_PTE_OBJECT_INVALID@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_2
## %bb.3:
	movq	$0, (%r15)
	movq	8(%r14), %rdi
	callq	_sem_destroy
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	8(%r14), %rdi
	addq	$4, %rdi
	callq	_sem_destroy
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	movl	(%r14), %esi
	xorl	%edx, %edx
	callq	_sem_init
LBB0_7:
	movq	%r14, (%r15)
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	callq	_free
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_PTE_OBJECT_INVALID,8,3         ## @PTE_OBJECT_INVALID
	.comm	_EINVAL,4,2                     ## @EINVAL
.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	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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0]
Lloh0:
	adrp	x8, _PTE_OBJECT_INVALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTE_OBJECT_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x20, x8
	b.eq	LBB0_6
; %bb.2:
	str	xzr, [x19]
	ldr	x0, [x20, #8]
	bl	_sem_destroy
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	x8, [x20, #8]
	add	x0, x8, #4
	bl	_sem_destroy
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.4:
	ldr	x0, [x20, #8]
	ldr	w1, [x20]
	mov	w2, #0
	bl	_sem_init
LBB0_5:
	str	x20, [x19]
	b	LBB0_7
LBB0_6:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
LBB0_7:
	mov	x0, x21
	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
LBB0_8:
	mov	x0, x20
	bl	_free
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PTE_OBJECT_INVALID,8,3         ; @PTE_OBJECT_INVALID
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
