	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function busy_destroy_test
_busy_destroy_test:                     ## @busy_destroy_test
	.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
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	__POSIX2_LINE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	xorl	%edi, %edi
	xorl	%edx, %edx
	movq	%rbx, %r8
	callq	_kvm_openfiles
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	leaq	-52(%rbp), %rdi
	xorl	%esi, %esi
	callq	_ksem_init
	testq	%rax, %rax
	js	LBB0_3
## %bb.5:
	xorl	%eax, %eax
	callq	_fork
	cmpl	$-1, %eax
	je	LBB0_14
## %bb.6:
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_15
## %bb.7:
	movq	_KERN_PROC_PID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rcx
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_kvm_getprocs
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	%rax, %r12
	movq	_SSLEEP@GOTPCREL(%rip), %rbx
	leaq	-56(%rbp), %r13
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_usleep
	movq	_KERN_PROC_PID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	movq	%r13, %rcx
	callq	_kvm_getprocs
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	8(%r12), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	8(%r12), %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_12
LBB0_16:
	movq	%r15, %rdi
	callq	_kvm_close
	movl	-52(%rbp), %edi
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ksem_destroy_should_fail
	movl	-52(%rbp), %edi
	callq	_ksem_post
	movl	%r14d, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_waitpid
	jmp	LBB0_17
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_fail_err
	jmp	LBB0_18
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	callq	_fail_errno
	jmp	LBB0_4
LBB0_14:
	leaq	L_.str.3(%rip), %rdi
	callq	_fail_errno
	movl	-52(%rbp), %edi
	callq	_ksem_destroy
LBB0_4:
	movq	%r15, %rdi
	callq	_kvm_close
	jmp	LBB0_18
LBB0_13:
	movq	%r15, %rdi
	callq	_kvm_geterr
	leaq	L_.str.4(%rip), %rdi
	movq	%rax, %rsi
	callq	_fail_err
	movq	%r15, %rdi
	callq	_kvm_close
LBB0_17:
	movl	-52(%rbp), %edi
	callq	_ksem_destroy
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
LBB0_15:
	movl	-52(%rbp), %edi
	callq	_ksem_wait
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	__POSIX2_LINE_MAX,4,2           ## @_POSIX2_LINE_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/null"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"kvm_openfiles: %s"

L_.str.2:                               ## @.str.2
	.asciz	"ksem_init"

L_.str.3:                               ## @.str.3
	.asciz	"fork"

	.comm	_KERN_PROC_PID,4,2              ## @KERN_PROC_PID
L_.str.4:                               ## @.str.4
	.asciz	"kvm_getprocs: %s"

	.comm	_SSLEEP,8,3                     ## @SSLEEP
L_.str.5:                               ## @.str.5
	.asciz	"sem"

L_.str.6:                               ## @.str.6
	.asciz	"ksem"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_busy_destroy_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function busy_destroy_test
_busy_destroy_test:                     ; @busy_destroy_test
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, __POSIX2_LINE_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, __POSIX2_LINE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
Lloh8:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, #0
	mov	x2, #0
	mov	x4, x20
	bl	_kvm_openfiles
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
	sub	x0, x29, #76
	mov	w1, #0
	bl	_ksem_init
	tbnz	x0, #63, LBB0_12
; %bb.2:
	bl	_fork
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.3:
	mov	x20, x0
	cbz	w0, LBB0_20
; %bb.4:
Lloh13:
	adrp	x24, _KERN_PROC_PID@GOTPAGE
Lloh14:
	ldr	x24, [x24, _KERN_PROC_PID@GOTPAGEOFF]
	ldr	w1, [x24]
	sub	x3, x29, #80
	mov	x0, x19
	mov	x2, x20
	bl	_kvm_getprocs
	cbz	x0, LBB0_15
; %bb.5:
	mov	x23, x0
Lloh15:
	adrp	x25, _SSLEEP@GOTPAGE
Lloh16:
	ldr	x25, [x25, _SSLEEP@GOTPAGEOFF]
Lloh17:
	adrp	x21, l_.str.5@PAGE
Lloh18:
	add	x21, x21, l_.str.5@PAGEOFF
Lloh19:
	adrp	x22, l_.str.6@PAGE
Lloh20:
	add	x22, x22, l_.str.6@PAGEOFF
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #1000
	bl	_usleep
	ldr	w1, [x24]
	sub	x3, x29, #80
	mov	x0, x19
	mov	x2, x20
	bl	_kvm_getprocs
	mov	x23, x0
	cbz	x0, LBB0_15
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x23, #8]
	mov	x1, x21
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x23, #8]
	mov	x1, x22
	bl	_strcmp
	cbnz	x0, LBB0_6
LBB0_10:
	mov	x0, x19
	bl	_kvm_close
	ldur	w0, [x29, #-76]
Lloh21:
	adrp	x8, _EBUSY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_ksem_destroy_should_fail
	ldur	w0, [x29, #-76]
	bl	_ksem_post
	mov	x0, x20
	mov	x1, #0
	mov	w2, #0
	bl	_waitpid
	b	LBB0_16
LBB0_11:
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_fail_err
	b	LBB0_17
LBB0_12:
Lloh26:
	adrp	x0, l_.str.2@PAGE
Lloh27:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_fail_errno
	b	LBB0_14
LBB0_13:
Lloh28:
	adrp	x0, l_.str.3@PAGE
Lloh29:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_fail_errno
	ldur	w0, [x29, #-76]
	bl	_ksem_destroy
LBB0_14:
	mov	x0, x19
	bl	_kvm_close
	b	LBB0_17
LBB0_15:
	mov	x0, x19
	bl	_kvm_geterr
	mov	x1, x0
Lloh30:
	adrp	x0, l_.str.4@PAGE
Lloh31:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_fail_err
	mov	x0, x19
	bl	_kvm_close
LBB0_16:
	ldur	w0, [x29, #-76]
	bl	_ksem_destroy
LBB0_17:
	ldur	x8, [x29, #-72]
Lloh32:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh33:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	sub	sp, x29, #64
	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_19:
	bl	___stack_chk_fail
LBB0_20:
	ldur	w0, [x29, #-76]
	bl	_ksem_wait
	mov	w0, #0
	bl	_exit
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	__POSIX2_LINE_MAX,4,2           ; @_POSIX2_LINE_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/null"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"kvm_openfiles: %s"

l_.str.2:                               ; @.str.2
	.asciz	"ksem_init"

l_.str.3:                               ; @.str.3
	.asciz	"fork"

	.comm	_KERN_PROC_PID,4,2              ; @KERN_PROC_PID
l_.str.4:                               ; @.str.4
	.asciz	"kvm_getprocs: %s"

	.comm	_SSLEEP,8,3                     ; @SSLEEP
l_.str.5:                               ; @.str.5
	.asciz	"sem"

l_.str.6:                               ; @.str.6
	.asciz	"ksem"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_busy_destroy_test
.subsections_via_symbols
