	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tty_reopen
_tty_reopen:                            ## @tty_reopen
	.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
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movq	_TTY_CLOSING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%rbx), %r14
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_2:
	movq	(%r15), %rax
	movq	_TTY_DRIVER_TYPE_PTY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	movq	8(%r15), %rax
	movq	_PTY_TYPE_MASTER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	cmpq	$0, 16(%rbx)
	jne	LBB0_1
## %bb.5:
	movq	24(%rbx), %rax
	incl	(%rax)
LBB0_6:
	incq	16(%rbx)
	movq	%r15, 8(%rbx)
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	_TTY_LDISC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TTY_CLOSING,4,2                ## @TTY_CLOSING
	.comm	_EIO,4,2                        ## @EIO
	.comm	_TTY_DRIVER_TYPE_PTY,8,3        ## @TTY_DRIVER_TYPE_PTY
	.comm	_PTY_TYPE_MASTER,8,3            ## @PTY_TYPE_MASTER
	.comm	_TTY_LDISC,4,2                  ## @TTY_LDISC
	.no_dead_strip	_tty_reopen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tty_reopen
_tty_reopen:                            ; @tty_reopen
	.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, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x8, _TTY_CLOSING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TTY_CLOSING@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x20, x19, #4
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_2
LBB0_1:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_2:
	ldr	x8, [x21]
Lloh6:
	adrp	x9, _TTY_DRIVER_TYPE_PTY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TTY_DRIVER_TYPE_PTY@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	ldr	x8, [x21, #8]
Lloh9:
	adrp	x9, _PTY_TYPE_MASTER@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PTY_TYPE_MASTER@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_1
; %bb.5:
	ldr	x8, [x19, #24]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_6:
	ldr	x8, [x19, #16]
	add	x8, x8, #1
	stp	x21, x8, [x19, #8]
	mov	x0, x19
	bl	_mutex_lock
Lloh12:
	adrp	x8, _TTY_LDISC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TTY_LDISC@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
LBB0_7:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_TTY_CLOSING,4,2                ; @TTY_CLOSING
	.comm	_EIO,4,2                        ; @EIO
	.comm	_TTY_DRIVER_TYPE_PTY,8,3        ; @TTY_DRIVER_TYPE_PTY
	.comm	_PTY_TYPE_MASTER,8,3            ; @PTY_TYPE_MASTER
	.comm	_TTY_LDISC,4,2                  ; @TTY_LDISC
	.no_dead_strip	_tty_reopen
.subsections_via_symbols
