	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function procfs_detach
_procfs_detach:                         ## @procfs_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	callq	_get_exec_file
	testq	%rax, %rax
	leaq	L_.str(%rip), %rbx
	cmovneq	%rax, %rbx
	movq	_inferior_ptid@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_target_pid_to_str
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_printf_unfiltered
	movq	_gdb_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gdb_flush
LBB0_2:
	testq	%r14, %r14
	je	LBB0_5
## %bb.3:
	movq	%r14, %rdi
	callq	_atoi
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_nto_node
	movl	%eax, %r14d
	movq	_inferior_ptid@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PIDGET
	movl	%r14d, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_SignalKill
LBB0_5:
	movq	_ctl_fd@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_close
	movl	$-1, (%rbx)
	xorl	%eax, %eax
	callq	_init_thread_list
	movq	_null_ptid@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_inferior_ptid@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_attach_flag@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_procfs_ops@GOTPCREL(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_unpush_target                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

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

	.comm	_inferior_ptid,4,2              ## @inferior_ptid
	.comm	_gdb_stdout,4,2                 ## @gdb_stdout
	.comm	_ctl_fd,4,2                     ## @ctl_fd
	.comm	_null_ptid,4,2                  ## @null_ptid
	.comm	_attach_flag,8,3                ## @attach_flag
	.comm	_procfs_ops,4,2                 ## @procfs_ops
	.no_dead_strip	_procfs_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function procfs_detach
_procfs_detach:                         ; @procfs_detach
	.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, x0
Lloh0:
	adrp	x21, _inferior_ptid@GOTPAGE
Lloh1:
	ldr	x21, [x21, _inferior_ptid@GOTPAGEOFF]
	cbz	w1, LBB0_2
; %bb.1:
	mov	w0, #0
	bl	_get_exec_file
Lloh2:
	adrp	x8, l_.str@PAGE
Lloh3:
	add	x8, x8, l_.str@PAGEOFF
	cmp	x0, #0
	csel	x20, x8, x0, eq
	ldr	w0, [x21]
	bl	_target_pid_to_str
	mov	x2, x0
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_printf_unfiltered
Lloh6:
	adrp	x8, _gdb_stdout@GOTPAGE
Lloh7:
	ldr	x8, [x8, _gdb_stdout@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_gdb_flush
LBB0_2:
	cbz	x19, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_atoi
	cbz	w0, LBB0_5
; %bb.4:
	mov	x19, x0
	bl	_nto_node
	mov	x20, x0
	ldr	w0, [x21]
	bl	_PIDGET
	mov	x1, x0
	mov	x0, x20
	mov	w2, #0
	mov	x3, x19
	mov	w4, #0
	mov	w5, #0
	bl	_SignalKill
LBB0_5:
Lloh9:
	adrp	x19, _ctl_fd@GOTPAGE
Lloh10:
	ldr	x19, [x19, _ctl_fd@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_close
	mov	w8, #-1
	str	w8, [x19]
	bl	_init_thread_list
Lloh11:
	adrp	x8, _null_ptid@GOTPAGE
Lloh12:
	ldr	x8, [x8, _null_ptid@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x21]
Lloh14:
	adrp	x8, _attach_flag@GOTPAGE
Lloh15:
	ldr	x8, [x8, _attach_flag@GOTPAGEOFF]
Lloh16:
	str	xzr, [x8]
Lloh17:
	adrp	x0, _procfs_ops@GOTPAGE
Lloh18:
	ldr	x0, [x0, _procfs_ops@GOTPAGEOFF]
	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	_unpush_target
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

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

	.comm	_inferior_ptid,4,2              ; @inferior_ptid
	.comm	_gdb_stdout,4,2                 ; @gdb_stdout
	.comm	_ctl_fd,4,2                     ; @ctl_fd
	.comm	_null_ptid,4,2                  ; @null_ptid
	.comm	_attach_flag,8,3                ; @attach_flag
	.comm	_procfs_ops,4,2                 ; @procfs_ops
	.no_dead_strip	_procfs_detach
.subsections_via_symbols
