	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function maybe_attach_thread
_maybe_attach_thread:                   ## @maybe_attach_thread
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_all_threads@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	cmpq	8(%rax), %rdi
	jne	LBB0_3
## %bb.1:
	callq	_get_thread_process
	cmpl	$0, (%rax)
	je	LBB0_2
LBB0_3:
	movl	4(%r15), %esi
	movq	_all_threads@GOTPCREL(%rip), %rdi
	callq	_find_inferior_id
	testq	%rax, %rax
	jne	LBB0_9
## %bb.4:
	movq	_debug_threads@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %ecx
	movl	4(%r15), %edx
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
LBB0_6:
	movl	(%r15), %edi
	movl	4(%r15), %esi
	callq	_linux_attach_lwp
	movl	4(%r15), %esi
	movq	_all_threads@GOTPCREL(%rip), %rdi
	callq	_find_inferior_id
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%rax, %rdi
	callq	_inferior_target_data
	movq	%rax, %rbx
	jmp	LBB0_8
LBB0_2:
	movq	%rax, %rbx
	movl	4(%r15), %esi
	movq	_all_threads@GOTPCREL(%rip), %rdi
	callq	_change_inferior_id
LBB0_8:
	movl	4(%r15), %edi
	callq	_new_thread_notify
	movl	4(%r15), %eax
	movl	%eax, 8(%rbx)
	movl	(%r15), %eax
	movl	%eax, 4(%rbx)
	movl	$1, (%rbx)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_td_thr_event_enable
	movq	_TD_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%r15), %ebx
	movq	%rax, %rdi
	callq	_thread_db_err_str
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movq	%rax, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_error                          ## TAILCALL
LBB0_10:
	movl	(%r15), %edx
	movl	4(%r15), %esi
	leaq	L_.str.1(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_warning                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_all_threads,16,3               ## @all_threads
	.comm	_debug_threads,8,3              ## @debug_threads
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attaching to thread %ld (LWP %d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Could not attach to thread %ld (LWP %d)\n"

	.comm	_TD_OK,8,3                      ## @TD_OK
L_.str.2:                               ## @.str.2
	.asciz	"Cannot enable thread event reporting for %d: %s"

	.no_dead_strip	_maybe_attach_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function maybe_attach_thread
_maybe_attach_thread:                   ; @maybe_attach_thread
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _all_threads@GOTPAGE
Lloh1:
	ldr	x8, [x8, _all_threads@GOTPAGEOFF]
	ldp	x0, x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	bl	_get_thread_process
	ldr	w8, [x0]
	cbz	w8, LBB0_7
LBB0_2:
	ldr	w1, [x19, #4]
Lloh2:
	adrp	x0, _all_threads@GOTPAGE
Lloh3:
	ldr	x0, [x0, _all_threads@GOTPAGEOFF]
	bl	_find_inferior_id
	cbnz	x0, LBB0_9
; %bb.3:
Lloh4:
	adrp	x8, _debug_threads@GOTPAGE
Lloh5:
	ldr	x8, [x8, _debug_threads@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldp	w3, w2, [x19]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
LBB0_5:
	ldp	w0, w1, [x19]
	bl	_linux_attach_lwp
	ldr	w1, [x19, #4]
Lloh12:
	adrp	x0, _all_threads@GOTPAGE
Lloh13:
	ldr	x0, [x0, _all_threads@GOTPAGEOFF]
	bl	_find_inferior_id
	cbz	x0, LBB0_11
; %bb.6:
	bl	_inferior_target_data
	mov	x21, x0
	b	LBB0_8
LBB0_7:
	mov	x21, x0
	ldr	w1, [x19, #4]
Lloh14:
	adrp	x0, _all_threads@GOTPAGE
Lloh15:
	ldr	x0, [x0, _all_threads@GOTPAGEOFF]
	bl	_change_inferior_id
LBB0_8:
	ldr	w0, [x19, #4]
	bl	_new_thread_notify
	ldr	d0, [x19]
	stur	d0, [x21, #4]
	mov	w8, #1
	str	w8, [x21]
	mov	x0, x20
	mov	w1, #1
	bl	_td_thr_event_enable
Lloh16:
	adrp	x8, _TD_OK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TD_OK@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldr	w19, [x19]
	bl	_thread_db_err_str
	mov	x2, x0
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_error
LBB0_11:
	ldp	w2, w1, [x19]
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_warning
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_all_threads,16,3               ; @all_threads
	.comm	_debug_threads,8,3              ; @debug_threads
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attaching to thread %ld (LWP %d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Could not attach to thread %ld (LWP %d)\n"

	.comm	_TD_OK,8,3                      ; @TD_OK
l_.str.2:                               ; @.str.2
	.asciz	"Cannot enable thread event reporting for %d: %s"

	.no_dead_strip	_maybe_attach_thread
.subsections_via_symbols
