	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function thread_test
_thread_test:                           ## @thread_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	-36(%rbp), %rdi
	callq	_common_head
	movq	%rax, %r14
	movl	-36(%rbp), %edi
	movq	_KIOENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_ioctl
	movq	%rax, %r15
	movq	_modes@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_nitems
	cmpq	%rbx, %rax
	jbe	LBB0_1
## %bb.2:
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdx
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str.1(%rip), %rdx
LBB0_3:
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_ATF_REQUIRE_MSG
	movq	_thread_test_helper@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %rdi
	xorl	%esi, %esi
	movq	%r14, %rcx
	callq	_pthread_create
	movl	-40(%rbp), %edi
	xorl	%esi, %esi
	callq	_pthread_join
	movl	-36(%rbp), %edi
	movq	_KIODISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_ioctl
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_ATF_REQUIRE_MSG
	movl	-36(%rbp), %edi
	movq	%r14, %rsi
	callq	_common_tail
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KIOENABLE,4,2                  ## @KIOENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to enable kcov %s"

	.comm	_modes,8,3                      ## @modes
L_.str.1:                               ## @.str.1
	.asciz	"unknown mode"

	.comm	_thread_test_helper,4,2         ## @thread_test_helper
	.comm	_KIODISABLE,4,2                 ## @KIODISABLE
L_.str.2:                               ## @.str.2
	.asciz	"Unable to disable kcov"

	.no_dead_strip	_thread_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function thread_test
_thread_test:                           ; @thread_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	add	x0, sp, #8
	bl	_common_head
	mov	x19, x0
	ldr	w0, [sp, #8]
Lloh0:
	adrp	x8, _KIOENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KIOENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_ioctl
	mov	x21, x0
Lloh3:
	adrp	x22, _modes@GOTPAGE
Lloh4:
	ldr	x22, [x22, _modes@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_nitems
	cmp	x0, x20
	b.ls	LBB0_2
; %bb.1:
	ldr	x8, [x22]
	ldr	x8, [x8, x20, lsl #3]
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x8, l_.str.1@PAGE
Lloh6:
	add	x8, x8, l_.str.1@PAGEOFF
LBB0_3:
	cmp	x21, #0
	cset	w0, eq
	str	x8, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ATF_REQUIRE_MSG
Lloh9:
	adrp	x8, _thread_test_helper@GOTPAGE
Lloh10:
	ldr	x8, [x8, _thread_test_helper@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x0, sp, #12
	mov	x1, #0
	mov	x3, x19
	bl	_pthread_create
	ldr	w0, [sp, #12]
	mov	x1, #0
	bl	_pthread_join
	ldr	w0, [sp, #8]
Lloh12:
	adrp	x8, _KIODISABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _KIODISABLE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_ioctl
	cmp	x0, #0
	cset	w0, eq
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_ATF_REQUIRE_MSG
	ldr	w0, [sp, #8]
	mov	x1, x19
	bl	_common_tail
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_KIOENABLE,4,2                  ; @KIOENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to enable kcov %s"

	.comm	_modes,8,3                      ; @modes
l_.str.1:                               ; @.str.1
	.asciz	"unknown mode"

	.comm	_thread_test_helper,4,2         ; @thread_test_helper
	.comm	_KIODISABLE,4,2                 ; @KIODISABLE
l_.str.2:                               ; @.str.2
	.asciz	"Unable to disable kcov"

	.no_dead_strip	_thread_test
.subsections_via_symbols
