	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function go32_terminal_ours
_go32_terminal_ours:                    ## @go32_terminal_ours
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_terminal_is_ours@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_device_mode
	movq	_inf_terminal_mode@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%ecx, %ecx
	cmpl	$-1, %eax
	setne	%cl
	movq	_inf_mode_valid@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movl	$1, (%rbx)
	movq	_errno@GOTPCREL(%rip), %rbx
	movq	$0, (%rbx)
	movq	_child_cmd@GOTPCREL(%rip), %rdi
	callq	_redir_to_debugger
	cmpl	$-1, %eax
	je	LBB0_3
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	movq	_child_cmd@GOTPCREL(%rip), %rdi
	callq	_redir_to_child
	movq	(%rbx), %rdi
	callq	_safe_strerror
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_error                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_terminal_is_ours,4,2           ## @terminal_is_ours
	.comm	_inf_terminal_mode,4,2          ## @inf_terminal_mode
	.comm	_inf_mode_valid,4,2             ## @inf_mode_valid
	.comm	_errno,8,3                      ## @errno
	.comm	_child_cmd,4,2                  ## @child_cmd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot redirect standard handles for debugger: %s."

	.no_dead_strip	_go32_terminal_ours
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function go32_terminal_ours
_go32_terminal_ours:                    ; @go32_terminal_ours
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _terminal_is_ours@GOTPAGE
Lloh1:
	ldr	x19, [x19, _terminal_is_ours@GOTPAGEOFF]
	ldr	w8, [x19]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	w0, #0
	mov	w1, #0
	bl	_device_mode
Lloh2:
	adrp	x8, _inf_terminal_mode@GOTPAGE
Lloh3:
	ldr	x8, [x8, _inf_terminal_mode@GOTPAGEOFF]
Lloh4:
	str	w0, [x8]
	cmn	w0, #1
	cset	w8, ne
Lloh5:
	adrp	x9, _inf_mode_valid@GOTPAGE
Lloh6:
	ldr	x9, [x9, _inf_mode_valid@GOTPAGEOFF]
Lloh7:
	str	w8, [x9]
	mov	w8, #1
	str	w8, [x19]
Lloh8:
	adrp	x19, _errno@GOTPAGE
Lloh9:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	str	xzr, [x19]
Lloh10:
	adrp	x0, _child_cmd@GOTPAGE
Lloh11:
	ldr	x0, [x0, _child_cmd@GOTPAGEOFF]
	bl	_redir_to_debugger
	cmn	w0, #1
	b.eq	LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh12:
	adrp	x0, _child_cmd@GOTPAGE
Lloh13:
	ldr	x0, [x0, _child_cmd@GOTPAGEOFF]
	bl	_redir_to_child
	ldr	x0, [x19]
	bl	_safe_strerror
	mov	x1, x0
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_error
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_terminal_is_ours,4,2           ; @terminal_is_ours
	.comm	_inf_terminal_mode,4,2          ; @inf_terminal_mode
	.comm	_inf_mode_valid,4,2             ; @inf_mode_valid
	.comm	_errno,8,3                      ; @errno
	.comm	_child_cmd,4,2                  ; @child_cmd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot redirect standard handles for debugger: %s."

	.no_dead_strip	_go32_terminal_ours
.subsections_via_symbols
