	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rs_open
_rs_open:                               ## @rs_open
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	(%rdi), %eax
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movq	_SERIAL_MAX_NUM_LINES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_2
## %bb.3:
	movq	%rdi, %rbx
	movq	_timer_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	cmpl	$1, 4(%rbx)
	jne	LBB0_5
## %bb.4:
	movq	_serial_timer@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_init_timer
	movq	%rbx, (%r14)
	movq	_rs_poll@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_SERIAL_TIMER_VALUE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_mod_timer
LBB0_5:
	movq	_timer_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_2:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SERIAL_MAX_NUM_LINES,4,2       ## @SERIAL_MAX_NUM_LINES
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_timer_lock,4,2                 ## @timer_lock
	.comm	_serial_timer,16,3              ## @serial_timer
	.comm	_rs_poll,4,2                    ## @rs_poll
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_SERIAL_TIMER_VALUE,8,3         ## @SERIAL_TIMER_VALUE
	.no_dead_strip	_rs_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rs_open
_rs_open:                               ; @rs_open
	.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
	ldr	w8, [x0]
	tbnz	w8, #31, LBB0_5
; %bb.1:
Lloh0:
	adrp	x9, _SERIAL_MAX_NUM_LINES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SERIAL_MAX_NUM_LINES@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_5
; %bb.2:
	mov	x19, x0
Lloh3:
	adrp	x0, _timer_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _timer_lock@GOTPAGEOFF]
	bl	_spin_lock
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.3:
Lloh5:
	adrp	x20, _serial_timer@GOTPAGE
Lloh6:
	ldr	x20, [x20, _serial_timer@GOTPAGEOFF]
	mov	x0, x20
	bl	_init_timer
	str	x19, [x20]
Lloh7:
	adrp	x8, _rs_poll@GOTPAGE
Lloh8:
	ldr	x8, [x8, _rs_poll@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _jiffies@GOTPAGE
Lloh11:
	ldr	x9, [x9, _jiffies@GOTPAGEOFF]
	str	w8, [x20, #8]
Lloh12:
	ldr	x8, [x9]
Lloh13:
	adrp	x9, _SERIAL_TIMER_VALUE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SERIAL_TIMER_VALUE@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	bl	_mod_timer
LBB0_4:
Lloh16:
	adrp	x0, _timer_lock@GOTPAGE
Lloh17:
	ldr	x0, [x0, _timer_lock@GOTPAGEOFF]
	bl	_spin_unlock
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x8, _ENODEV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SERIAL_MAX_NUM_LINES,4,2       ; @SERIAL_MAX_NUM_LINES
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_timer_lock,4,2                 ; @timer_lock
	.comm	_serial_timer,16,3              ; @serial_timer
	.comm	_rs_poll,4,2                    ; @rs_poll
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_SERIAL_TIMER_VALUE,8,3         ; @SERIAL_TIMER_VALUE
	.no_dead_strip	_rs_open
.subsections_via_symbols
