	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function irtty_start_dev
_irtty_start_dev:                       ## @irtty_start_dev
	.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	%rdi, %rbx
	movq	_irtty_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %rax
	movq	_IRTTY_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %edi
LBB0_3:
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_irtty_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_ESTALE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_5:
	movq	8(%rbx), %rbx
	movq	(%rbx), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_7:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_irtty_stop_receiver
	movq	_irtty_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_irtty_mutex,4,2                ## @irtty_mutex
	.comm	_IRTTY_MAGIC,8,3                ## @IRTTY_MAGIC
	.comm	_ESTALE,4,2                     ## @ESTALE
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_irtty_start_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function irtty_start_dev
_irtty_start_dev:                       ; @irtty_start_dev
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, _irtty_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _irtty_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	x19, [x19]
	cbz	x19, LBB0_3
; %bb.1:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _IRTTY_MAGIC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IRTTY_MAGIC@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_4
LBB0_2:
Lloh5:
	adrp	x0, _irtty_mutex@GOTPAGE
Lloh6:
	ldr	x0, [x0, _irtty_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh7:
	adrp	x8, _ESTALE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ESTALE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_3:
	mov	w0, #1
	bl	_unlikely
	cbnz	x0, LBB0_2
LBB0_4:
	ldr	x19, [x19, #8]
	ldr	x8, [x19]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	blr	x8
LBB0_6:
Lloh10:
	adrp	x8, _FALSE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_irtty_stop_receiver
Lloh13:
	adrp	x0, _irtty_mutex@GOTPAGE
Lloh14:
	ldr	x0, [x0, _irtty_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_irtty_mutex,4,2                ; @irtty_mutex
	.comm	_IRTTY_MAGIC,8,3                ; @IRTTY_MAGIC
	.comm	_ESTALE,4,2                     ; @ESTALE
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_irtty_start_dev
.subsections_via_symbols
