	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function child_detach
_child_detach:                          ## @child_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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	xorl	%eax, %eax
	callq	_has_detach_ability
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_delete_command
	movq	_DBG_CONTINUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$-1, %esi
	callq	_child_continue
	movq	_current_event@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_DebugActiveProcessStop
	movl	$1, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	(%r14), %r14d
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movq	%rax, %rdx
	callq	_error
	xorl	%ebx, %ebx
LBB0_4:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DebugSetProcessKillOnExit
	testl	%r15d, %r15d
	jne	LBB0_6
	jmp	LBB0_8
LBB0_1:
	movl	$1, %ebx
	testl	%r15d, %r15d
	je	LBB0_8
LBB0_6:
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.7:
	xorl	%edi, %edi
	callq	_get_exec_file
	testq	%rax, %rax
	leaq	L_.str.1(%rip), %rsi
	cmovneq	%rax, %rsi
	movq	_current_event@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rdi
	callq	_printf_unfiltered
	movq	_gdb_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gdb_flush
LBB0_8:
	movq	_null_ptid@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_inferior_ptid@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_child_ops@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_unpush_target                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DBG_CONTINUE,4,2               ## @DBG_CONTINUE
	.comm	_current_event,4,2              ## @current_event
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't detach process %lu (error %lu)"

	.comm	_FALSE,4,2                      ## @FALSE
L_.str.1:                               ## @.str.1
	.space	1

L_.str.2:                               ## @.str.2
	.asciz	"Detaching from program: %s, Pid %lu\n"

	.comm	_gdb_stdout,4,2                 ## @gdb_stdout
	.comm	_null_ptid,4,2                  ## @null_ptid
	.comm	_inferior_ptid,4,2              ## @inferior_ptid
	.comm	_child_ops,4,2                  ## @child_ops
	.no_dead_strip	_child_detach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function child_detach
_child_detach:                          ; @child_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, x1
	bl	_has_detach_ability
Lloh0:
	adrp	x21, _current_event@GOTPAGE
Lloh1:
	ldr	x21, [x21, _current_event@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, #0
	mov	w1, #0
	bl	_delete_command
Lloh2:
	adrp	x8, _DBG_CONTINUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DBG_CONTINUE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	w1, #-1
	bl	_child_continue
	ldr	w0, [x21]
	bl	_DebugActiveProcessStop
	cbz	w0, LBB0_4
; %bb.2:
	mov	w20, #1
	b	LBB0_5
LBB0_3:
	mov	w20, #1
	cbnz	w19, LBB0_6
	b	LBB0_8
LBB0_4:
	ldr	w20, [x21]
	bl	_GetLastError
	mov	x2, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_error
	mov	w20, #0
LBB0_5:
Lloh7:
	adrp	x8, _FALSE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_DebugSetProcessKillOnExit
	cbz	w19, LBB0_8
LBB0_6:
	cbz	w20, LBB0_8
; %bb.7:
	mov	w0, #0
	bl	_get_exec_file
Lloh10:
	adrp	x8, l_.str.1@PAGE
Lloh11:
	add	x8, x8, l_.str.1@PAGEOFF
	cmp	x0, #0
	csel	x1, x8, x0, eq
	ldr	w2, [x21]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf_unfiltered
Lloh14:
	adrp	x8, _gdb_stdout@GOTPAGE
Lloh15:
	ldr	x8, [x8, _gdb_stdout@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_gdb_flush
LBB0_8:
Lloh17:
	adrp	x8, _null_ptid@GOTPAGE
Lloh18:
	ldr	x8, [x8, _null_ptid@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _inferior_ptid@GOTPAGE
Lloh21:
	ldr	x9, [x9, _inferior_ptid@GOTPAGEOFF]
Lloh22:
	str	w8, [x9]
Lloh23:
	adrp	x0, _child_ops@GOTPAGE
Lloh24:
	ldr	x0, [x0, _child_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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_DBG_CONTINUE,4,2               ; @DBG_CONTINUE
	.comm	_current_event,4,2              ; @current_event
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't detach process %lu (error %lu)"

	.comm	_FALSE,4,2                      ; @FALSE
l_.str.1:                               ; @.str.1
	.space	1

l_.str.2:                               ; @.str.2
	.asciz	"Detaching from program: %s, Pid %lu\n"

	.comm	_gdb_stdout,4,2                 ; @gdb_stdout
	.comm	_null_ptid,4,2                  ; @null_ptid
	.comm	_inferior_ptid,4,2              ; @inferior_ptid
	.comm	_child_ops,4,2                  ; @child_ops
	.no_dead_strip	_child_detach
.subsections_via_symbols
