	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fbsd_attach_lwp                ## -- Begin function fbsd_attach_lwp
	.p2align	4, 0x90
_fbsd_attach_lwp:                       ## @fbsd_attach_lwp
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	_PT_ATTACH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ptrace
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movq	_errno@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_strerror
	movl	(%r12), %r8d
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%ebx, %edx
	movq	%rax, %rcx
	callq	_fprintf
	movl	(%r15), %edi
	callq	_fflush
	movq	_using_threads@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_5
## %bb.2:
	movl	$127, %edi
	callq	__exit
LBB0_3:
	movl	%ebx, %edi
	callq	_add_process
	movq	%rax, %rbx
	movl	%r14d, %edi
	movq	%rax, %rsi
	callq	_add_thread
	movq	_stopping_threads@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_5
## %bb.4:
	movl	$1, (%rbx)
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PT_ATTACH,4,2                  ## @PT_ATTACH
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot attach to process %d: %s (%d)\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_using_threads,4,2              ## @using_threads
	.comm	_stopping_threads,4,2           ## @stopping_threads
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fbsd_attach_lwp                ; -- Begin function fbsd_attach_lwp
	.p2align	2
_fbsd_attach_lwp:                       ; @fbsd_attach_lwp
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PT_ATTACH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PT_ATTACH@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	mov	w2, #0
	mov	w3, #0
	bl	_ptrace
	cbz	x0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x21, _stderr@GOTPAGE
Lloh4:
	ldr	x21, [x21, _stderr@GOTPAGEOFF]
	ldr	w20, [x21]
Lloh5:
	adrp	x22, _errno@GOTPAGE
Lloh6:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_strerror
	mov	x3, x0
	ldr	w4, [x22]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_fprintf
	ldr	w0, [x21]
	bl	_fflush
Lloh9:
	adrp	x8, _using_threads@GOTPAGE
Lloh10:
	ldr	x8, [x8, _using_threads@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cbnz	w8, LBB0_5
; %bb.2:
	mov	w0, #127
	bl	__exit
LBB0_3:
	mov	x0, x19
	bl	_add_process
	mov	x19, x0
	mov	x0, x20
	mov	x1, x19
	bl	_add_thread
Lloh12:
	adrp	x8, _stopping_threads@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stopping_threads@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cbnz	w8, LBB0_5
; %bb.4:
	mov	w8, #1
	str	w8, [x19]
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PT_ATTACH,4,2                  ; @PT_ATTACH
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot attach to process %d: %s (%d)\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_using_threads,4,2              ; @using_threads
	.comm	_stopping_threads,4,2           ; @stopping_threads
.subsections_via_symbols
