	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function thread_rec
_thread_rec:                            ## @thread_rec
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_thread_head@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%rdi, (%rbx)
	jne	LBB0_1
## %bb.3:
	testl	%esi, %esi
	je	LBB0_12
## %bb.4:
	cmpl	$0, 8(%rbx)
	jne	LBB0_12
## %bb.5:
	testl	%esi, %esi
	jle	LBB0_8
## %bb.6:
	movq	_current_event@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	je	LBB0_8
## %bb.7:
	movl	16(%rbx), %edi
	callq	_SuspendThread
	incl	%eax
	jmp	LBB0_10
LBB0_8:
	testl	%esi, %esi
	jns	LBB0_11
## %bb.9:
	movl	$-1, %eax
LBB0_10:
	movl	%eax, 8(%rbx)
LBB0_11:
	movl	$1, 12(%rbx)
LBB0_12:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_thread_head,32,3               ## @thread_head
	.comm	_current_event,8,3              ## @current_event
	.no_dead_strip	_thread_rec
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function thread_rec
_thread_rec:                            ; @thread_rec
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _thread_head@GOTPAGE
Lloh1:
	ldr	x19, [x19, _thread_head@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x19, [x19, #24]
	cbz	x19, LBB0_12
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x19]
	cmp	x8, x0
	b.ne	LBB0_1
; %bb.3:
	cbz	w1, LBB0_12
; %bb.4:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_12
; %bb.5:
	cmp	w1, #1
	b.lt	LBB0_8
; %bb.6:
Lloh2:
	adrp	x8, _current_event@GOTPAGE
Lloh3:
	ldr	x8, [x8, _current_event@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_8
; %bb.7:
	ldr	w0, [x19, #16]
	bl	_SuspendThread
	add	w8, w0, #1
	b	LBB0_10
LBB0_8:
	tbz	w1, #31, LBB0_11
; %bb.9:
	mov	w8, #-1
LBB0_10:
	str	w8, [x19, #8]
LBB0_11:
	mov	w8, #1
	str	w8, [x19, #12]
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_thread_head,32,3               ; @thread_head
	.comm	_current_event,8,3              ; @current_event
	.no_dead_strip	_thread_rec
.subsections_via_symbols
