	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rumptest_threadjoin            ## -- Begin function rumptest_threadjoin
	.p2align	4, 0x90
_rumptest_threadjoin:                   ## @rumptest_threadjoin
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movq	_PRI_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_KTHREAD_MUSTJOIN@GOTPCREL(%rip), %rax
	movq	_KTHREAD_MPSAFE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_jointhread@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rax
	movq	%rax, (%rsp)
	leaq	-8(%rbp), %r9
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_kthread_create
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_panic
LBB0_2:
	movq	-8(%rbp), %rdi
	callq	_kthread_join
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_panic
LBB0_4:
	movq	_testit@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	je	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_panic
LBB0_6:
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PRI_NONE,4,2                   ## @PRI_NONE
	.comm	_KTHREAD_MUSTJOIN,4,2           ## @KTHREAD_MUSTJOIN
	.comm	_KTHREAD_MPSAFE,4,2             ## @KTHREAD_MPSAFE
	.comm	_jointhread,4,2                 ## @jointhread
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"jointest"

L_.str.1:                               ## @.str.1
	.asciz	"thread creation failed: %d"

L_.str.2:                               ## @.str.2
	.asciz	"thread join failed: %d"

	.comm	_testit,4,2                     ## @testit
L_.str.3:                               ## @.str.3
	.asciz	"new thread did not run"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rumptest_threadjoin            ; -- Begin function rumptest_threadjoin
	.p2align	2
_rumptest_threadjoin:                   ; @rumptest_threadjoin
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _PRI_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PRI_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _KTHREAD_MUSTJOIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KTHREAD_MUSTJOIN@GOTPAGEOFF]
Lloh5:
	adrp	x9, _KTHREAD_MPSAFE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _KTHREAD_MPSAFE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh9:
	adrp	x8, _jointhread@GOTPAGE
Lloh10:
	ldr	x8, [x8, _jointhread@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x6, l_.str@PAGE
Lloh13:
	add	x6, x6, l_.str@PAGEOFF
	add	x5, sp, #8
	mov	x2, #0
	mov	x4, #0
	bl	_kthread_create
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_2
; %bb.1:
	str	x0, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
LBB0_2:
	ldr	x0, [sp, #8]
	bl	_kthread_join
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_4
; %bb.3:
	str	x0, [sp]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_panic
LBB0_4:
Lloh18:
	adrp	x8, _testit@GOTPAGE
Lloh19:
	ldr	x8, [x8, _testit@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, #1
	b.eq	LBB0_6
; %bb.5:
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_panic
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_PRI_NONE,4,2                   ; @PRI_NONE
	.comm	_KTHREAD_MUSTJOIN,4,2           ; @KTHREAD_MUSTJOIN
	.comm	_KTHREAD_MPSAFE,4,2             ; @KTHREAD_MPSAFE
	.comm	_jointhread,4,2                 ; @jointhread
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"jointest"

l_.str.1:                               ; @.str.1
	.asciz	"thread creation failed: %d"

l_.str.2:                               ; @.str.2
	.asciz	"thread join failed: %d"

	.comm	_testit,4,2                     ; @testit
l_.str.3:                               ; @.str.3
	.asciz	"new thread did not run"

.subsections_via_symbols
