	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_event
_check_event:                           ## @check_event
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	callq	_read_pc_pid
	movq	_DECR_PC_AFTER_BREAK@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rax
	movq	_td_create_bp_addr@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_td_death_bp_addr@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	-56(%rbp), %r14
	movq	_TD_OK@GOTPCREL(%rip), %r12
	leaq	-48(%rbp), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_error
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_thread_agent@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_td_ta_event_getmsg_p
	cmpq	(%r12), %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_TD_NOMSG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_16
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdi
	callq	_thread_db_err_str
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_error
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-52(%rbp), %edi
	movq	%r15, %rsi
	callq	_td_thr_get_info_p
	cmpq	(%r12), %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdi
	callq	_thread_db_err_str
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_error
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %r13d
	movl	%ebx, %edi
	callq	_GET_PID
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_BUILD_THREAD
	movl	%eax, %ebx
	movl	-56(%rbp), %eax
	cmpl	$128, %eax
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$129, %eax
	jne	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	callq	_in_thread_list
	testl	%eax, %eax
	jne	LBB0_3
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	-52(%rbp), %esi
	movl	%ebx, %edi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_attach_thread
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	callq	_in_thread_list
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_error
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_detach_thread
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_DECR_PC_AFTER_BREAK,8,3        ## @DECR_PC_AFTER_BREAK
	.comm	_td_create_bp_addr,8,3          ## @td_create_bp_addr
	.comm	_td_death_bp_addr,8,3           ## @td_death_bp_addr
	.comm	_thread_agent,4,2               ## @thread_agent
	.comm	_TD_OK,8,3                      ## @TD_OK
	.comm	_TD_NOMSG,8,3                   ## @TD_NOMSG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot get thread event message: %s"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot get thread info: %s"

L_.str.2:                               ## @.str.2
	.asciz	"Spurious thread death event."

L_.str.3:                               ## @.str.3
	.asciz	"Spurious thread event."

	.no_dead_strip	_check_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_event
_check_event:                           ; @check_event
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x0
	bl	_read_pc_pid
Lloh0:
	adrp	x8, _DECR_PC_AFTER_BREAK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DECR_PC_AFTER_BREAK@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _td_create_bp_addr@GOTPAGE
Lloh4:
	ldr	x9, [x9, _td_create_bp_addr@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _td_death_bp_addr@GOTPAGE
Lloh7:
	ldr	x10, [x10, _td_death_bp_addr@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	sub	x8, x0, x8
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_15
; %bb.1:
Lloh9:
	adrp	x25, _thread_agent@GOTPAGE
Lloh10:
	ldr	x25, [x25, _thread_agent@GOTPAGEOFF]
Lloh11:
	adrp	x26, _TD_OK@GOTPAGE
Lloh12:
	ldr	x26, [x26, _TD_OK@GOTPAGEOFF]
Lloh13:
	adrp	x20, l_.str.2@PAGE
Lloh14:
	add	x20, x20, l_.str.2@PAGEOFF
Lloh15:
	adrp	x21, l_.str.3@PAGE
Lloh16:
	add	x21, x21, l_.str.3@PAGEOFF
Lloh17:
	adrp	x22, l_.str.1@PAGE
Lloh18:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh19:
	adrp	x27, _TD_NOMSG@GOTPAGE
Lloh20:
	ldr	x27, [x27, _TD_NOMSG@GOTPAGEOFF]
Lloh21:
	adrp	x23, l_.str@PAGE
Lloh22:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_error
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	add	x1, sp, #24
	bl	_td_ta_event_getmsg_p
	ldr	x8, [x26]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x27]
	cmp	x0, x8
	b.eq	LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_thread_db_err_str
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
	mov	x0, x23
	bl	_error
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [sp, #28]
	add	x1, sp, #16
	bl	_td_thr_get_info_p
	ldr	x8, [x26]
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_thread_db_err_str
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
	mov	x0, x22
	bl	_error
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w24, [sp, #16]
	mov	x0, x19
	bl	_GET_PID
	mov	x1, x0
	mov	x0, x24
	bl	_BUILD_THREAD
	mov	x19, x0
	ldr	w8, [sp, #24]
	cmp	w8, #128
	b.eq	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #129
	b.ne	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_in_thread_list
	cbnz	w0, LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [sp, #28]
	add	x2, sp, #16
	mov	x0, x19
	mov	w3, #1
	bl	_attach_thread
	b	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_in_thread_list
	cbnz	w0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_error
LBB0_14:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	w1, #1
	bl	_detach_thread
	b	LBB0_3
LBB0_15:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DECR_PC_AFTER_BREAK,8,3        ; @DECR_PC_AFTER_BREAK
	.comm	_td_create_bp_addr,8,3          ; @td_create_bp_addr
	.comm	_td_death_bp_addr,8,3           ; @td_death_bp_addr
	.comm	_thread_agent,4,2               ; @thread_agent
	.comm	_TD_OK,8,3                      ; @TD_OK
	.comm	_TD_NOMSG,8,3                   ; @TD_NOMSG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot get thread event message: %s"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot get thread info: %s"

l_.str.2:                               ; @.str.2
	.asciz	"Spurious thread death event."

l_.str.3:                               ; @.str.3
	.asciz	"Spurious thread event."

	.no_dead_strip	_check_event
.subsections_via_symbols
