	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function child_attach
_child_attach:                          ## @child_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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	testq	%rdi, %rdi
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_error_no_arg
LBB0_2:
	movq	_SE_DEBUG_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_set_process_privilege
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf_unfiltered
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf_unfiltered
LBB0_4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_DebugActiveProcess
	movq	_saw_create@GOTPCREL(%rip), %rcx
	movq	$0, (%rcx)
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movq	_CW_CYGWIN_PID_TO_WINPID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_cygwin_internal
	movq	%rax, %r15
	testq	%rax, %rax
	jle	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_DebugActiveProcess
	testq	%rax, %rax
	jne	LBB0_8
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
	callq	_error
LBB0_8:
	xorl	%eax, %eax
	callq	_has_detach_ability
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DebugSetProcessKillOnExit
LBB0_10:
	movq	_attach_flag@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	testl	%r14d, %r14d
	je	LBB0_15
## %bb.11:
	xorl	%edi, %edi
	callq	_get_exec_file
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_pid_to_ptid
	movl	%eax, %edi
	callq	_target_pid_to_str
	leaq	L_.str.4(%rip), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_printf_unfiltered
	jmp	LBB0_14
LBB0_13:
	movq	%r15, %rdi
	callq	_pid_to_ptid
	movl	%eax, %edi
	callq	_target_pid_to_str
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_printf_unfiltered
LBB0_14:
	movq	_gdb_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gdb_flush
LBB0_15:
	movq	%r15, %rdi
	callq	_do_initial_child_stuff
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_target_terminal_ours           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"process-id to attach"

	.comm	_SE_DEBUG_NAME,4,2              ## @SE_DEBUG_NAME
	.comm	_TRUE,4,2                       ## @TRUE
L_.str.1:                               ## @.str.1
	.asciz	"Warning: Failed to get SE_DEBUG_NAME privilege\n"

L_.str.2:                               ## @.str.2
	.asciz	"This can cause attach to fail on Windows NT/2K/XP\n"

	.comm	_saw_create,8,3                 ## @saw_create
	.comm	_CW_CYGWIN_PID_TO_WINPID,4,2    ## @CW_CYGWIN_PID_TO_WINPID
L_.str.3:                               ## @.str.3
	.asciz	"Can't attach to process."

	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_attach_flag,4,2                ## @attach_flag
L_.str.4:                               ## @.str.4
	.asciz	"Attaching to program `%s', %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"Attaching to %s\n"

	.comm	_gdb_stdout,4,2                 ## @gdb_stdout
	.no_dead_strip	_child_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function child_attach
_child_attach:                          ; @child_attach
	.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	x20, x1
	mov	x19, x0
	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:
Lloh2:
	adrp	x8, _SE_DEBUG_NAME@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SE_DEBUG_NAME@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _TRUE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_set_process_privilege
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf_unfiltered
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf_unfiltered
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_strtoul
	mov	x19, x0
	bl	_DebugActiveProcess
Lloh12:
	adrp	x8, _saw_create@GOTPAGE
Lloh13:
	ldr	x8, [x8, _saw_create@GOTPAGEOFF]
Lloh14:
	str	xzr, [x8]
	cbnz	x0, LBB0_8
; %bb.5:
Lloh15:
	adrp	x8, _CW_CYGWIN_PID_TO_WINPID@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CW_CYGWIN_PID_TO_WINPID@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_cygwin_internal
	mov	x19, x0
	cmp	x0, #1
	b.lt	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_DebugActiveProcess
	cbnz	x0, LBB0_8
LBB0_7:
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_error
LBB0_8:
	bl	_has_detach_ability
	cbz	x0, LBB0_10
; %bb.9:
Lloh20:
	adrp	x8, _FALSE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_DebugSetProcessKillOnExit
LBB0_10:
Lloh23:
	adrp	x8, _attach_flag@GOTPAGE
Lloh24:
	ldr	x8, [x8, _attach_flag@GOTPAGEOFF]
	mov	w9, #1
Lloh25:
	str	w9, [x8]
	cbz	w20, LBB0_15
; %bb.11:
	mov	w0, #0
	bl	_get_exec_file
	cbz	x0, LBB0_13
; %bb.12:
	mov	x20, x0
	mov	x0, x19
	bl	_pid_to_ptid
	bl	_target_pid_to_str
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x20, x0, [sp]
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_13:
	mov	x0, x19
	bl	_pid_to_ptid
	bl	_target_pid_to_str
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh28:
	adrp	x0, l_.str.5@PAGE
Lloh29:
	add	x0, x0, l_.str.5@PAGEOFF
LBB0_14:
	bl	_printf_unfiltered
Lloh30:
	adrp	x8, _gdb_stdout@GOTPAGE
Lloh31:
	ldr	x8, [x8, _gdb_stdout@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_gdb_flush
LBB0_15:
	mov	x0, x19
	bl	_do_initial_child_stuff
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_target_terminal_ours
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"process-id to attach"

	.comm	_SE_DEBUG_NAME,4,2              ; @SE_DEBUG_NAME
	.comm	_TRUE,4,2                       ; @TRUE
l_.str.1:                               ; @.str.1
	.asciz	"Warning: Failed to get SE_DEBUG_NAME privilege\n"

l_.str.2:                               ; @.str.2
	.asciz	"This can cause attach to fail on Windows NT/2K/XP\n"

	.comm	_saw_create,8,3                 ; @saw_create
	.comm	_CW_CYGWIN_PID_TO_WINPID,4,2    ; @CW_CYGWIN_PID_TO_WINPID
l_.str.3:                               ; @.str.3
	.asciz	"Can't attach to process."

	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_attach_flag,4,2                ; @attach_flag
l_.str.4:                               ; @.str.4
	.asciz	"Attaching to program `%s', %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"Attaching to %s\n"

	.comm	_gdb_stdout,4,2                 ; @gdb_stdout
	.no_dead_strip	_child_attach
.subsections_via_symbols
