	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tty_change_softcar
_tty_change_softcar:                    ## @tty_change_softcar
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_CLOCAL@GOTPCREL(%rip), %rbx
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %r14d
LBB0_2:
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	8(%r15), %rcx
	movl	(%rcx), %eax
	movl	%eax, -32(%rbp)
	movl	(%rbx), %eax
	notl	%eax
	andl	(%rcx), %eax
	orl	%r14d, %eax
	movl	%eax, (%rcx)
	movq	16(%r15), %rcx
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.3:
	leaq	-32(%rbp), %rsi
	movq	%r15, %rdi
	callq	*%rcx
	movq	8(%r15), %rax
	movl	(%rax), %eax
LBB0_4:
	andl	(%rbx), %eax
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	xorl	%ecx, %ecx
	cmpl	%r14d, %eax
	cmovel	%ecx, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CLOCAL,4,2                     ## @CLOCAL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_tty_change_softcar
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tty_change_softcar
_tty_change_softcar:                    ; @tty_change_softcar
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _CLOCAL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _CLOCAL@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w1, #0
	csel	w21, wzr, w8, eq
	bl	_mutex_lock
	ldp	x9, x10, [x19, #8]
	ldr	w8, [x9]
	str	w8, [sp, #8]
	ldr	w8, [x20]
	ldr	w11, [x9]
	bic	w8, w11, w8
	orr	w8, w8, w21
	str	w8, [x9]
	ldr	x9, [x10]
	cbz	x9, LBB0_2
; %bb.1:
	add	x1, sp, #8
	mov	x0, x19
	blr	x9
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
LBB0_2:
	ldr	w9, [x20]
	and	w8, w9, w8
Lloh2:
	adrp	x9, _EINVAL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w21
	csneg	w20, wzr, w9, eq
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CLOCAL,4,2                     ; @CLOCAL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_tty_change_softcar
.subsections_via_symbols
