	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function remote_get_threadlist
_remote_get_threadlist:                 ## @remote_get_threadlist
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	%edi, %r13d
	xorl	%eax, %eax
	callq	_get_remote_state
	movq	%rax, %r14
	movl	(%rax), %edi
	callq	_alloca
	movq	%rax, %rbx
	movl	(%r14), %edi
	callq	_alloca
	movq	%rax, %r15
	leal	1(%r12), %edx
	movq	_BUF_THREAD_ID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	imull	%ecx, %edx
	addl	$10, %edx
	movl	(%r14), %eax
	cmpl	%eax, %edx
	jl	LBB0_2
## %bb.1:
	cltd
	idivl	%ecx
	movl	%eax, %r12d
	addl	$-2, %r12d
LBB0_2:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rcx
	callq	_pack_threadlist_request
	movq	%rbx, %rdi
	callq	_putpkt
	movl	(%r14), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_getpkt
	addq	$2, %r15
	leaq	_remote_get_threadlist.echo_nextthread(%rip), %r14
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%r14, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	%r8, %r15
	callq	_parse_threadlist_response
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, (%rbx)
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_threadmatch
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	(%rbx), %ecx
	movl	$1, %eax
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.7:
	cmpl	%r12d, %ecx
	jle	LBB0_10
## %bb.8:
	movl	$0, (%rbx)
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_9
LBB0_5:
	cmpl	$1, (%r15)
	je	LBB0_10
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
LBB0_9:
	callq	_warning
	xorl	%eax, %eax
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_remote_get_threadlist.echo_nextthread,4,2 ## @remote_get_threadlist.echo_nextthread
	.comm	_BUF_THREAD_ID_SIZE,4,2         ## @BUF_THREAD_ID_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HMM: threadlist did not echo arg thread, dropping it\n"

L_.str.1:                               ## @.str.1
	.asciz	"RMT ERROR : failed to get remote thread list\n"

L_.str.2:                               ## @.str.2
	.asciz	"RMT ERROR: threadlist response longer than requested\n"

	.no_dead_strip	_remote_get_threadlist
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function remote_get_threadlist
_remote_get_threadlist:                 ; @remote_get_threadlist
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x5
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x25, x0
	bl	_get_remote_state
	mov	x24, x0
	ldr	w0, [x0]
	bl	_alloca
	mov	x27, x0
	ldr	w0, [x24]
	bl	_alloca
	mov	x26, x0
Lloh0:
	adrp	x8, _BUF_THREAD_ID_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BUF_THREAD_ID_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	madd	w9, w8, w21, w8
	add	w10, w9, #10
	ldr	w9, [x24]
	cmp	w10, w9
	b.lt	LBB0_2
; %bb.1:
	sdiv	w8, w9, w8
	sub	w21, w8, #2
LBB0_2:
	mov	x0, x27
	mov	x1, x25
	mov	x2, x21
	mov	x3, x22
	bl	_pack_threadlist_request
	mov	x0, x27
	bl	_putpkt
	ldr	w1, [x24]
	mov	x0, x26
	mov	w2, #0
	bl	_getpkt
	add	x0, x26, #2
Lloh3:
	adrp	x24, _remote_get_threadlist.echo_nextthread@PAGE
Lloh4:
	add	x24, x24, _remote_get_threadlist.echo_nextthread@PAGEOFF
	mov	x1, x21
	mov	x2, x24
	mov	x3, x23
	mov	x4, x20
	bl	_parse_threadlist_response
	str	w0, [x19]
	mov	x0, x24
	mov	x1, x22
	bl	_threadmatch
	cbz	w0, LBB0_6
; %bb.3:
	ldr	w8, [x19]
	cmp	w8, #0
	b.le	LBB0_7
; %bb.4:
	cmp	w8, w21
	b.le	LBB0_8
; %bb.5:
	str	wzr, [x19]
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_6:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_10
LBB0_7:
	ldr	w8, [x20]
	cmp	w8, #1
	b.ne	LBB0_9
LBB0_8:
	mov	w0, #1
	b	LBB0_11
LBB0_9:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_10:
	bl	_warning
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_remote_get_threadlist.echo_nextthread,4,2 ; @remote_get_threadlist.echo_nextthread
	.comm	_BUF_THREAD_ID_SIZE,4,2         ; @BUF_THREAD_ID_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HMM: threadlist did not echo arg thread, dropping it\n"

l_.str.1:                               ; @.str.1
	.asciz	"RMT ERROR : failed to get remote thread list\n"

l_.str.2:                               ; @.str.2
	.asciz	"RMT ERROR: threadlist response longer than requested\n"

	.no_dead_strip	_remote_get_threadlist
.subsections_via_symbols
