	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tty_release                    ## -- Begin function tty_release
	.p2align	4, 0x90
_tty_release:                           ## @tty_release
	.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
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_lock
	movq	(%rbx), %rax
	movq	32(%rbx), %r15
	decq	%rax
	movq	%rax, (%rbx)
	je	LBB0_1
## %bb.4:
	cmpq	_pty_slave@GOTPCREL(%rip), %r15
	jne	LBB0_8
## %bb.5:
	cmpq	$1, %rax
	jne	LBB0_8
## %bb.6:
	movq	24(%rbx), %rbx
	movq	%r14, %rdi
	callq	_unlock
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.7:
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_lock
	movq	%rbx, %rdi
	callq	_tty_poll_wakeup
LBB0_8:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_unlock                         ## TAILCALL
LBB0_1:
	movq	8(%r15), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_3:
	movq	(%r15), %rax
	movq	8(%rbx), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	%r14, %rdi
	callq	_unlock
	leaq	40(%rbx), %rdi
	callq	_cond_destroy
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pty_slave,16,3                 ## @pty_slave
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tty_release                    ; -- Begin function tty_release
	.p2align	2
_tty_release:                           ; @tty_release
	.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
	add	x20, x0, #16
	mov	x0, x20
	bl	_lock
	ldr	x8, [x19]
	ldr	x21, [x19, #32]
	subs	x8, x8, #1
	str	x8, [x19]
	b.eq	LBB0_5
; %bb.1:
Lloh0:
	adrp	x9, _pty_slave@GOTPAGE
Lloh1:
	ldr	x9, [x9, _pty_slave@GOTPAGEOFF]
	cmp	x21, x9
	ccmp	x8, #1, #0, eq
	b.ne	LBB0_4
; %bb.2:
	ldr	x19, [x19, #24]
	mov	x0, x20
	bl	_unlock
	cbz	x19, LBB0_8
; %bb.3:
	add	x20, x19, #16
	mov	x0, x20
	bl	_lock
	mov	x0, x19
	bl	_tty_poll_wakeup
LBB0_4:
	mov	x0, x20
	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
	b	_unlock
LBB0_5:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x19
	blr	x8
LBB0_7:
	ldr	x8, [x21]
	ldr	x9, [x19, #8]
	str	xzr, [x8, x9, lsl #3]
	mov	x0, x20
	bl	_unlock
	add	x0, x19, #40
	bl	_cond_destroy
	mov	x0, x19
	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
	b	_free
LBB0_8:
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_pty_slave,16,3                 ; @pty_slave
.subsections_via_symbols
