	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sol_thread_wait
_sol_thread_wait:                       ## @sol_thread_wait
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movl	%edi, %r13d
	movq	_inferior_ptid@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_save_inferior_ptid
	movq	%rax, %r15
	movl	(%r14), %ebx
	movq	_main_ph@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PIDGET
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_thread_to_lwp
	movl	%eax, (%r14)
	movl	%eax, %edi
	callq	_PIDGET
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_procfs_first_available
	movl	%eax, (%r14)
LBB0_2:
	movl	%r13d, %edi
	callq	_PIDGET
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movl	%r13d, %edi
	movl	$-2, %esi
	callq	_thread_to_lwp
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_PIDGET
	cmpl	$-2, %eax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_error
LBB0_6:
	movq	_info_verbose@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.7:
	movl	%ebx, %edi
	callq	_PIDGET
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.8:
	movl	%r13d, %edi
	callq	_GET_THREAD
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_warning
	jmp	LBB0_9
LBB0_3:
	movl	%r13d, %ebx
LBB0_9:
	movq	_procfs_ops@GOTPCREL(%rip), %rax
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	*(%rax)
	movl	%eax, %ebx
	movq	(%r12), %rax
	movq	_TARGET_WAITKIND_EXITED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.10:
	movl	%ebx, %edi
	callq	_lwp_to_thread
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_PIDGET
	cmpl	$-1, %eax
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	cmovel	%r14d, %ebx
	movl	%ebx, %edi
	callq	_is_thread
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_ptid_equal
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	movl	%ebx, %edi
	callq	_in_thread_list
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movl	%ebx, %edi
	callq	_target_pid_to_str
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_printf_filtered
	movl	%ebx, %edi
	callq	_add_thread
LBB0_14:
	movq	%r15, %rdi
	callq	_do_cleanups
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_inferior_ptid,4,2              ## @inferior_ptid
	.comm	_main_ph,4,2                    ## @main_ph
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"This version of Solaris can't start inactive threads."

	.comm	_info_verbose,8,3               ## @info_verbose
L_.str.1:                               ## @.str.1
	.asciz	"Specified thread %ld seems to have terminated"

	.comm	_procfs_ops,8,3                 ## @procfs_ops
	.comm	_TARGET_WAITKIND_EXITED,8,3     ## @TARGET_WAITKIND_EXITED
L_.str.2:                               ## @.str.2
	.asciz	"[New %s]\n"

	.no_dead_strip	_sol_thread_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sol_thread_wait
_sol_thread_wait:                       ; @sol_thread_wait
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x24, _inferior_ptid@GOTPAGE
Lloh1:
	ldr	x24, [x24, _inferior_ptid@GOTPAGEOFF]
	ldr	w20, [x24]
	bl	_save_inferior_ptid
	mov	x19, x0
	ldr	w23, [x24]
Lloh2:
	adrp	x8, _main_ph@GOTPAGE
Lloh3:
	ldr	x8, [x8, _main_ph@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_PIDGET
	mov	x1, x0
	mov	x0, x23
	bl	_thread_to_lwp
	str	w0, [x24]
	bl	_PIDGET
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
	bl	_procfs_first_available
	str	w0, [x24]
LBB0_2:
	mov	x0, x22
	bl	_PIDGET
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.3:
	mov	x0, x22
	mov	w1, #-2
	bl	_thread_to_lwp
	mov	x23, x0
	bl	_PIDGET
	cmn	w0, #2
	b.ne	LBB0_5
; %bb.4:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
LBB0_5:
Lloh7:
	adrp	x8, _info_verbose@GOTPAGE
Lloh8:
	ldr	x8, [x8, _info_verbose@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.6:
	mov	x0, x23
	bl	_PIDGET
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.7:
	mov	x0, x22
	bl	_GET_THREAD
	mov	x1, x0
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warning
	b	LBB0_9
LBB0_8:
	mov	x23, x22
LBB0_9:
Lloh12:
	adrp	x8, _procfs_ops@GOTPAGE
Lloh13:
	ldr	x8, [x8, _procfs_ops@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	mov	x0, x23
	mov	x1, x21
	blr	x8
	mov	x22, x0
	ldr	x8, [x21]
Lloh15:
	adrp	x9, _TARGET_WAITKIND_EXITED@GOTPAGE
Lloh16:
	ldr	x9, [x9, _TARGET_WAITKIND_EXITED@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_14
; %bb.10:
	mov	x0, x22
	bl	_lwp_to_thread
	mov	x21, x0
	bl	_PIDGET
	cmn	w0, #1
	csel	w22, w20, w21, eq
	mov	x0, x22
	bl	_is_thread
	cbz	x0, LBB0_14
; %bb.11:
	mov	x0, x22
	mov	x1, x20
	bl	_ptid_equal
	cbnz	w0, LBB0_14
; %bb.12:
	mov	x0, x22
	bl	_in_thread_list
	cbnz	w0, LBB0_14
; %bb.13:
	mov	x0, x22
	bl	_target_pid_to_str
	mov	x1, x0
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf_filtered
	mov	x0, x22
	bl	_add_thread
LBB0_14:
	mov	x0, x19
	bl	_do_cleanups
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_inferior_ptid,4,2              ; @inferior_ptid
	.comm	_main_ph,4,2                    ; @main_ph
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"This version of Solaris can't start inactive threads."

	.comm	_info_verbose,8,3               ; @info_verbose
l_.str.1:                               ; @.str.1
	.asciz	"Specified thread %ld seems to have terminated"

	.comm	_procfs_ops,8,3                 ; @procfs_ops
	.comm	_TARGET_WAITKIND_EXITED,8,3     ; @TARGET_WAITKIND_EXITED
l_.str.2:                               ; @.str.2
	.asciz	"[New %s]\n"

	.no_dead_strip	_sol_thread_wait
.subsections_via_symbols
