	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdbstub_getnextthread          ## -- Begin function gdbstub_getnextthread
	.p2align	4, 0x90
_gdbstub_getnextthread:                 ## @gdbstub_getnextthread
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testl	%edi, %edi
	jle	LBB0_1
## %bb.2:
	movq	__lwp_thr_objects@GOTPCREL(%rip), %rcx
	movl	4(%rcx), %esi
	subl	(%rcx), %esi
	leal	1(%rsi), %edx
	xorl	%eax, %eax
	cmpl	%edi, %edx
	jle	LBB0_7
## %bb.3:
	movq	8(%rcx), %rcx
	movl	%edi, %edx
	movslq	%esi, %rsi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, %rsi
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	1(%rdx), %rdi
	cmpq	$0, (%rcx,%rdx,8)
	movq	%rdi, %rdx
	je	LBB0_4
## %bb.6:
	movl	%edi, %eax
LBB0_7:
	popq	%rbp
	retq
LBB0_1:
	movl	$1, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__lwp_thr_objects,16,3          ## @_lwp_thr_objects
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdbstub_getnextthread          ; -- Begin function gdbstub_getnextthread
	.p2align	2
_gdbstub_getnextthread:                 ; @gdbstub_getnextthread
	.cfi_startproc
; %bb.0:
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, __lwp_thr_objects@GOTPAGE
Lloh1:
	ldr	x8, [x8, __lwp_thr_objects@GOTPAGEOFF]
	ldp	w9, w10, [x8]
	sub	w9, w10, w9
	add	w10, w9, #1
	cmp	w10, w0
	b.le	LBB0_6
; %bb.2:
	ldr	x8, [x8, #8]
	sxtw	x9, w9
	mov	w10, w0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x9, x10
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, x10, #1
	ldr	x11, [x8, x10, lsl #3]
	mov	x10, x0
	cbz	x11, LBB0_3
; %bb.5:
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
LBB0_6:
	mov	w0, #0
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
LBB0_7:
	mov	w0, #1
                                        ; kill: def $w0 killed $w0 killed $x0
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	__lwp_thr_objects,16,3          ; @_lwp_thr_objects
.subsections_via_symbols
