	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vx_attach
_vx_attach:                             ## @vx_attach
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	$0, -40(%rbp)
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_error_no_arg
LBB0_2:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_strtoul
	movq	%rax, %r15
	movq	-40(%rbp), %rax
	cmpq	%rbx, %rax
	je	LBB0_4
## %bb.3:
	cmpb	$0, (%rax)
	je	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_error
LBB0_5:
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_local_hex_string
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_printf_unfiltered
LBB0_7:
	leaq	-48(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	%r15, -48(%rbp)
	movq	_PTRACE_ATTACH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_net_ptrace_clnt_call
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.9:
	cmpl	$-1, -32(%rbp)
	je	LBB0_10
LBB0_11:
	movq	%r15, %rdi
	callq	_pid_to_ptid
	movq	_inferior_ptid@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_vx_run_ops@GOTPCREL(%rip), %rdi
	callq	_push_target
	movq	_vx_running@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_xfree
LBB0_13:
	movq	$0, (%rbx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_rpcerr@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_error
	cmpl	$-1, -32(%rbp)
	jne	LBB0_11
LBB0_10:
	movl	-28(%rbp), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str.3(%rip), %rdi
	callq	_perror_with_name
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"process-id to attach"

L_.str.1:                               ## @.str.1
	.asciz	"Invalid process-id -- give a single number in decimal or 0xhex"

L_.str.2:                               ## @.str.2
	.asciz	"Attaching pid %s.\n"

	.comm	_PTRACE_ATTACH,4,2              ## @PTRACE_ATTACH
	.comm	_rpcerr,8,3                     ## @rpcerr
	.comm	_errno,4,2                      ## @errno
L_.str.3:                               ## @.str.3
	.asciz	"Attaching remote process"

	.comm	_inferior_ptid,4,2              ## @inferior_ptid
	.comm	_vx_run_ops,4,2                 ## @vx_run_ops
	.comm	_vx_running,8,3                 ## @vx_running
	.no_dead_strip	_vx_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vx_attach
_vx_attach:                             ; @vx_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x0
	str	xzr, [sp, #24]
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error_no_arg
LBB0_2:
	add	x1, sp, #24
	mov	x0, x21
	mov	w2, #0
	bl	_strtoul
	mov	x19, x0
	ldr	x8, [sp, #24]
	cmp	x8, x21
	b.eq	LBB0_4
; %bb.3:
	ldrb	w8, [x8]
	cbz	w8, LBB0_5
LBB0_4:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_error
LBB0_5:
	cbz	w20, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_local_hex_string
	mov	x1, x0
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf_unfiltered
LBB0_7:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	str	x19, [sp, #16]
Lloh6:
	adrp	x8, _PTRACE_ATTACH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PTRACE_ATTACH@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, sp, #16
	add	x2, sp, #8
	bl	_net_ptrace_clnt_call
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.8:
Lloh9:
	adrp	x8, _rpcerr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _rpcerr@GOTPAGEOFF]
Lloh11:
	ldr	x0, [x8]
	bl	_error
LBB0_9:
	ldr	w8, [sp, #8]
	cmn	w8, #1
	b.ne	LBB0_11
; %bb.10:
	ldr	w8, [sp, #12]
Lloh12:
	adrp	x9, _errno@GOTPAGE
Lloh13:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh14:
	str	w8, [x9]
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror_with_name
LBB0_11:
	mov	x0, x19
	bl	_pid_to_ptid
Lloh17:
	adrp	x8, _inferior_ptid@GOTPAGE
Lloh18:
	ldr	x8, [x8, _inferior_ptid@GOTPAGEOFF]
Lloh19:
	str	w0, [x8]
Lloh20:
	adrp	x0, _vx_run_ops@GOTPAGE
Lloh21:
	ldr	x0, [x0, _vx_run_ops@GOTPAGEOFF]
	bl	_push_target
Lloh22:
	adrp	x19, _vx_running@GOTPAGE
Lloh23:
	ldr	x19, [x19, _vx_running@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_13
; %bb.12:
	bl	_xfree
LBB0_13:
	str	xzr, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"process-id to attach"

l_.str.1:                               ; @.str.1
	.asciz	"Invalid process-id -- give a single number in decimal or 0xhex"

l_.str.2:                               ; @.str.2
	.asciz	"Attaching pid %s.\n"

	.comm	_PTRACE_ATTACH,4,2              ; @PTRACE_ATTACH
	.comm	_rpcerr,8,3                     ; @rpcerr
	.comm	_errno,4,2                      ; @errno
l_.str.3:                               ; @.str.3
	.asciz	"Attaching remote process"

	.comm	_inferior_ptid,4,2              ; @inferior_ptid
	.comm	_vx_run_ops,4,2                 ; @vx_run_ops
	.comm	_vx_running,8,3                 ; @vx_running
	.no_dead_strip	_vx_attach
.subsections_via_symbols
