	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tioccons
_tioccons:                              ## @tioccons
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	(%r12), %rax
	movq	(%rax), %r13
	movq	_redirected_tty_write@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_redirect_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	movq	_redirect@GOTPCREL(%rip), %r15
	movq	(%r15), %r14
	cmpq	%rbx, %r13
	jne	LBB0_6
## %bb.4:
	movq	$0, (%r15)
	movq	_redirect_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	xorl	%ebx, %ebx
	testq	%r14, %r14
	je	LBB0_9
## %bb.5:
	movq	%r14, %rdi
	callq	_fput
	jmp	LBB0_9
LBB0_1:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	movq	_redirect_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r12, %rdi
	callq	_get_file
	movq	%r12, (%r15)
	movq	_redirect_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_redirected_tty_write,8,3       ## @redirected_tty_write
	.comm	_redirect_lock,4,2              ## @redirect_lock
	.comm	_redirect,8,3                   ## @redirect
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_tioccons
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tioccons
_tioccons:                              ; @tioccons
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x19]
	ldr	x22, [x8]
Lloh3:
	adrp	x8, _redirected_tty_write@GOTPAGE
Lloh4:
	ldr	x8, [x8, _redirected_tty_write@GOTPAGEOFF]
Lloh5:
	ldr	x23, [x8]
Lloh6:
	adrp	x0, _redirect_lock@GOTPAGE
Lloh7:
	ldr	x0, [x0, _redirect_lock@GOTPAGEOFF]
	bl	_spin_lock
Lloh8:
	adrp	x21, _redirect@GOTPAGE
Lloh9:
	ldr	x21, [x21, _redirect@GOTPAGEOFF]
	ldr	x20, [x21]
	cmp	x22, x23
	b.ne	LBB0_5
; %bb.2:
	str	xzr, [x21]
Lloh10:
	adrp	x0, _redirect_lock@GOTPAGE
Lloh11:
	ldr	x0, [x0, _redirect_lock@GOTPAGEOFF]
	bl	_spin_unlock
	cbz	x20, LBB0_9
; %bb.3:
	mov	x0, x20
	bl	_fput
	b	LBB0_9
LBB0_4:
Lloh12:
	adrp	x8, _EPERM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
	cbz	x20, LBB0_8
; %bb.6:
Lloh14:
	adrp	x0, _redirect_lock@GOTPAGE
Lloh15:
	ldr	x0, [x0, _redirect_lock@GOTPAGEOFF]
	bl	_spin_unlock
Lloh16:
	adrp	x8, _EBUSY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_get_file
	str	x19, [x21]
Lloh18:
	adrp	x0, _redirect_lock@GOTPAGE
Lloh19:
	ldr	x0, [x0, _redirect_lock@GOTPAGEOFF]
	bl	_spin_unlock
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_redirected_tty_write,8,3       ; @redirected_tty_write
	.comm	_redirect_lock,4,2              ; @redirect_lock
	.comm	_redirect,8,3                   ; @redirect
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_tioccons
.subsections_via_symbols
