	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amu_release_controlling_tty    ## -- Begin function amu_release_controlling_tty
	.p2align	4, 0x90
_amu_release_controlling_tty:           ## @amu_release_controlling_tty
	.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	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_open
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	movq	_stdin@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	xorl	%edi, %edi
	callq	_close
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_dup2
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	movl	$1, %edi
	callq	_close
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_dup2
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	movl	$2, %edi
	callq	_close
	movl	%ebx, %edi
	movl	$2, %esi
	callq	_dup2
	movl	%ebx, %edi
	callq	_close
	jmp	LBB0_3
LBB0_1:
	movq	_XLOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_plog
LBB0_3:
	movq	_XLOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_plog                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/null"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_XLOG_WARNING,4,2               ## @XLOG_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"Could not open /dev/null for rw: %m"

	.comm	_stdin,4,2                      ## @stdin
	.comm	_stdout,4,2                     ## @stdout
	.comm	_stderr,4,2                     ## @stderr
	.comm	_XLOG_ERROR,4,2                 ## @XLOG_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"unable to release controlling tty"

	.comm	_ENOTTY,8,3                     ## @ENOTTY
	.comm	_ENXIO,8,3                      ## @ENXIO
	.comm	_TIOCNOTTY,4,2                  ## @TIOCNOTTY
	.comm	_XLOG_INFO,4,2                  ## @XLOG_INFO
	.comm	_errno,8,3                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amu_release_controlling_tty    ; -- Begin function amu_release_controlling_tty
	.p2align	2
_amu_release_controlling_tty:           ; @amu_release_controlling_tty
	.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	x8, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_open
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	x19, x0
Lloh5:
	adrp	x8, _stdin@GOTPAGE
Lloh6:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_fflush
	mov	w0, #0
	bl	_close
	mov	x0, x19
	mov	w1, #0
	bl	_dup2
Lloh8:
	adrp	x8, _stdout@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_fflush
	mov	w0, #1
	bl	_close
	mov	x0, x19
	mov	w1, #1
	bl	_dup2
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_fflush
	mov	w0, #2
	bl	_close
	mov	x0, x19
	mov	w1, #2
	bl	_dup2
	mov	x0, x19
	bl	_close
	b	LBB0_3
LBB0_2:
Lloh14:
	adrp	x8, _XLOG_WARNING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _XLOG_WARNING@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_plog
LBB0_3:
Lloh19:
	adrp	x8, _XLOG_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _XLOG_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_plog
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/null"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_XLOG_WARNING,4,2               ; @XLOG_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"Could not open /dev/null for rw: %m"

	.comm	_stdin,4,2                      ; @stdin
	.comm	_stdout,4,2                     ; @stdout
	.comm	_stderr,4,2                     ; @stderr
	.comm	_XLOG_ERROR,4,2                 ; @XLOG_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"unable to release controlling tty"

	.comm	_ENOTTY,8,3                     ; @ENOTTY
	.comm	_ENXIO,8,3                      ; @ENXIO
	.comm	_TIOCNOTTY,4,2                  ; @TIOCNOTTY
	.comm	_XLOG_INFO,4,2                  ; @XLOG_INFO
	.comm	_errno,8,3                      ; @errno
.subsections_via_symbols
