	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vx_detach
_vx_detach:                             ## @vx_detach
	.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, %ebx
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_error
LBB0_2:
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.3:
	movq	_inferior_ptid@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PIDGET
	movq	%rax, %rdi
	callq	_local_hex_string
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_printf_unfiltered
LBB0_4:
	leaq	-40(%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	_inferior_ptid@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_PIDGET
	movq	%rax, -40(%rbp)
	movq	_PTRACE_DETACH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_net_ptrace_clnt_call
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.6:
	cmpl	$-1, -32(%rbp)
	je	LBB0_7
LBB0_8:
	movq	_null_ptid@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	xorl	%eax, %eax
	callq	_pop_target
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_rpcerr@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_error
	cmpl	$-1, -32(%rbp)
	jne	LBB0_8
LBB0_7:
	movl	-28(%rbp), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str.2(%rip), %rdi
	callq	_perror_with_name
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Argument given to VxWorks \"detach\"."

L_.str.1:                               ## @.str.1
	.asciz	"Detaching pid %s.\n"

	.comm	_inferior_ptid,4,2              ## @inferior_ptid
	.comm	_PTRACE_DETACH,4,2              ## @PTRACE_DETACH
	.comm	_rpcerr,8,3                     ## @rpcerr
	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"Detaching VxWorks process"

	.comm	_null_ptid,4,2                  ## @null_ptid
	.no_dead_strip	_vx_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vx_detach
_vx_detach:                             ; @vx_detach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_error
LBB0_2:
Lloh2:
	adrp	x20, _inferior_ptid@GOTPAGE
Lloh3:
	ldr	x20, [x20, _inferior_ptid@GOTPAGEOFF]
	cbz	w19, LBB0_4
; %bb.3:
	ldr	w0, [x20]
	bl	_PIDGET
	bl	_local_hex_string
	mov	x1, x0
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf_unfiltered
LBB0_4:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	mov	x0, sp
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w0, [x20]
	bl	_PIDGET
	str	x0, [sp, #8]
Lloh6:
	adrp	x8, _PTRACE_DETACH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PTRACE_DETACH@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, sp, #8
	mov	x2, sp
	bl	_net_ptrace_clnt_call
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
Lloh9:
	adrp	x8, _rpcerr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _rpcerr@GOTPAGEOFF]
Lloh11:
	ldr	x0, [x8]
	bl	_error
LBB0_6:
	ldr	w8, [sp]
	cmn	w8, #1
	b.ne	LBB0_8
; %bb.7:
	ldr	w8, [sp, #4]
Lloh12:
	adrp	x9, _errno@GOTPAGE
Lloh13:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh14:
	str	w8, [x9]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror_with_name
LBB0_8:
Lloh17:
	adrp	x8, _null_ptid@GOTPAGE
Lloh18:
	ldr	x8, [x8, _null_ptid@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x20]
	bl	_pop_target
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	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 AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Argument given to VxWorks \"detach\"."

l_.str.1:                               ; @.str.1
	.asciz	"Detaching pid %s.\n"

	.comm	_inferior_ptid,4,2              ; @inferior_ptid
	.comm	_PTRACE_DETACH,4,2              ; @PTRACE_DETACH
	.comm	_rpcerr,8,3                     ; @rpcerr
	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"Detaching VxWorks process"

	.comm	_null_ptid,4,2                  ; @null_ptid
	.no_dead_strip	_vx_detach
.subsections_via_symbols
