	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function attach_thread
_attach_thread:                         ## @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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movq	%rdx, %r15
	movq	%rsi, %r14
	movl	%edi, %r12d
	xorl	%eax, %eax
	callq	_check_thread_signals
	movl	%r12d, %edi
	callq	_add_thread
	movq	%rax, %rbx
	movl	$4, %edi
	callq	_xmalloc
	movl	%eax, (%rbx)
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.1:
	movl	%r12d, %edi
	callq	_target_pid_to_str
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_printf_unfiltered
LBB0_2:
	movq	(%r15), %rax
	movq	_TD_THR_UNKNOWN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	movq	_TD_THR_ZOMBIE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_td_thr_event_enable_p
	movq	%rax, %rbx
	movq	_TD_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_6
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%r12d, %edi
	callq	_target_pid_to_str
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_thread_db_err_str
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	movq	%rax, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_error                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[New %s]\n"

	.comm	_TD_THR_UNKNOWN,8,3             ## @TD_THR_UNKNOWN
	.comm	_TD_THR_ZOMBIE,8,3              ## @TD_THR_ZOMBIE
	.comm	_TD_OK,8,3                      ## @TD_OK
L_.str.1:                               ## @.str.1
	.asciz	"Cannot enable thread event reporting for %s: %s"

	.no_dead_strip	_attach_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function attach_thread
_attach_thread:                         ; @attach_thread
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_check_thread_signals
	mov	x0, x19
	bl	_add_thread
	mov	x23, x0
	mov	w0, #4
	bl	_xmalloc
	str	w0, [x23]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	cbz	w22, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_target_pid_to_str
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf_unfiltered
LBB0_2:
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _TD_THR_UNKNOWN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TD_THR_UNKNOWN@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _TD_THR_ZOMBIE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _TD_THR_ZOMBIE@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x20
	mov	w1, #1
	bl	_td_thr_event_enable_p
Lloh8:
	adrp	x8, _TD_OK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TD_OK@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x20, x0
	mov	x0, x19
	bl	_target_pid_to_str
	mov	x19, x0
	mov	x0, x20
	bl	_thread_db_err_str
	mov	x2, x0
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_error
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[New %s]\n"

	.comm	_TD_THR_UNKNOWN,8,3             ; @TD_THR_UNKNOWN
	.comm	_TD_THR_ZOMBIE,8,3              ; @TD_THR_ZOMBIE
	.comm	_TD_OK,8,3                      ; @TD_OK
l_.str.1:                               ; @.str.1
	.asciz	"Cannot enable thread event reporting for %s: %s"

	.no_dead_strip	_attach_thread
.subsections_via_symbols
