	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function put_rxbuf_data
_put_rxbuf_data:                        ## @put_rxbuf_data
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.3:
	movq	%rdi, %rbx
	leaq	16(%r14), %r12
	movq	%r12, %rdi
	callq	_tty_port_tty_get
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%r15, %rdi
	callq	_tty_throttled
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_tty_kref_put
	movl	$-1, %eax
	jmp	LBB0_10
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_hso_dbg
	movl	$-2, %eax
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_hso_dbg
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_tty_buffer_request_room
	movl	(%rbx), %edx
	cmpl	%edx, %eax
	jge	LBB0_7
## %bb.8:
	movq	8(%r14), %rax
	movq	(%rax), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_9
LBB0_7:
	movl	4(%rbx), %esi
	movq	%r12, %rdi
	callq	_tty_insert_flip_string
	movq	%r12, %rdi
	callq	_tty_flip_buffer_push
LBB0_9:
	movq	%r15, %rdi
	callq	_tty_kref_put
	movq	(%r14), %r15
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_hso_urb_to_index
	movq	$0, (%r15,%rax,8)
	xorl	%eax, %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"serial = NULL\n"

L_.str.1:                               ## @.str.1
	.asciz	"data to push to tty\n"

L_.str.2:                               ## @.str.2
	.asciz	"dropping data, %d bytes lost\n"

	.no_dead_strip	_put_rxbuf_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function put_rxbuf_data
_put_rxbuf_data:                        ; @put_rxbuf_data
	.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
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_5
; %bb.2:
	mov	x19, x0
	add	x22, x20, #16
	mov	x0, x22
	bl	_tty_port_tty_get
	mov	x21, x0
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x21
	bl	_tty_throttled
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x21
	bl	_tty_kref_put
	mov	w0, #-1
	b	LBB0_10
LBB0_5:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_hso_dbg
	mov	w0, #-2
	b	LBB0_10
LBB0_6:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_hso_dbg
	ldr	w1, [x19]
	mov	x0, x22
	bl	_tty_buffer_request_room
	ldr	w2, [x19]
	cmp	w0, w2
	b.ge	LBB0_8
; %bb.7:
	ldr	x8, [x20, #8]
	ldr	x0, [x8]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
	b	LBB0_9
LBB0_8:
	ldr	w1, [x19, #4]
	mov	x0, x22
	bl	_tty_insert_flip_string
	mov	x0, x22
	bl	_tty_flip_buffer_push
LBB0_9:
	mov	x0, x21
	bl	_tty_kref_put
	ldr	x21, [x20]
	mov	x0, x20
	mov	x1, x19
	bl	_hso_urb_to_index
	mov	x8, x0
	mov	w0, #0
	str	xzr, [x21, x8, lsl #3]
LBB0_10:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"serial = NULL\n"

l_.str.1:                               ; @.str.1
	.asciz	"data to push to tty\n"

l_.str.2:                               ; @.str.2
	.asciz	"dropping data, %d bytes lost\n"

	.no_dead_strip	_put_rxbuf_data
.subsections_via_symbols
