	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_serial_recv                    ## -- Begin function serial_recv
	.p2align	4, 0x90
_serial_recv:                           ## @serial_recv
	.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	_rbuf_head@GOTPCREL(%rip), %rdx
	movq	_rbuf_tail@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	xorl	%ebx, %ebx
	cmpq	%rax, (%rdx)
	je	LBB0_5
## %bb.1:
	movq	_rbuf@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rdx,%rax,4), %ebx
	incq	%rax
	movq	_RBUF_SIZE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_2
## %bb.3:
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_4
LBB0_2:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_4:
	movq	%rdx, (%rcx)
	xorl	%eax, %eax
	callq	_rbuf_check_rts_lo
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rbuf_head,8,3                  ## @rbuf_head
	.comm	_rbuf_tail,8,3                  ## @rbuf_tail
	.comm	_rbuf,8,3                       ## @rbuf
	.comm	_RBUF_SIZE,8,3                  ## @RBUF_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_serial_recv                    ; -- Begin function serial_recv
	.p2align	2
_serial_recv:                           ; @serial_recv
	.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
Lloh0:
	adrp	x8, _rbuf_head@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rbuf_head@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x8]
Lloh3:
	adrp	x8, _rbuf_tail@GOTPAGE
Lloh4:
	ldr	x8, [x8, _rbuf_tail@GOTPAGEOFF]
	ldr	x9, [x8]
	cmp	x10, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w19, #0
	b	LBB0_3
LBB0_2:
Lloh5:
	adrp	x10, _rbuf@GOTPAGE
Lloh6:
	ldr	x10, [x10, _rbuf@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	ldr	w19, [x10, x9, lsl #2]
	add	x9, x9, #1
Lloh8:
	adrp	x10, _RBUF_SIZE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _RBUF_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	udiv	x11, x9, x10
	msub	x9, x11, x10, x9
	str	x9, [x8]
	bl	_rbuf_check_rts_lo
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_rbuf_head,8,3                  ; @rbuf_head
	.comm	_rbuf_tail,8,3                  ; @rbuf_tail
	.comm	_rbuf,8,3                       ; @rbuf
	.comm	_RBUF_SIZE,8,3                  ; @RBUF_SIZE
.subsections_via_symbols
