	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rx_get_buf
_rx_get_buf:                            ## @rx_get_buf
	.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
	movq	%rdi, %rbx
	movl	(%rdi), %r14d
	movq	8(%rdi), %rax
	movl	(%rax,%r14,4), %edi
	callq	_desc_complete
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	8(%rbx), %rax
	movl	(%rax,%r14,4), %edi
	callq	_desc_count
	movl	%eax, %r15d
	movl	20(%rbx), %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_4
## %bb.3:
	movq	8(%rbx), %rax
	movl	(%rax,%r14,4), %edi
	callq	_desc_residue
	cmpl	$1, %eax
	adcl	$-1, %r15d
LBB0_4:
	movq	8(%rbx), %rax
	movl	(%rax,%r14,4), %esi
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_DBGDATA
	movl	%r15d, %edi
	callq	_DBGINFO
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.5:
	movl	16(%rbx), %edi
	movq	8(%rbx), %rax
	movl	(%rax,%r14,4), %esi
	movl	4(%rbx), %edx
	movl	%r15d, %ecx
	callq	_ldisc_receive_buf
LBB0_6:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r14d, %edx
	callq	_free_rbufs
	movl	$1, %eax
	jmp	LBB0_7
LBB0_1:
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rx"

	.no_dead_strip	_rx_get_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rx_get_buf
_rx_get_buf:                            ; @rx_get_buf
	.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
	mov	x20, x0
	ldr	w19, [x0]
	ldr	x8, [x0, #8]
	ldr	w0, [x8, x19, lsl #2]
	bl	_desc_complete
	cbz	w0, LBB0_6
; %bb.1:
	ldr	x8, [x20, #8]
	ldr	w0, [x8, x19, lsl #2]
	bl	_desc_count
	mov	x21, x0
	ldr	w8, [x20, #20]
	and	w8, w8, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	w0, [x8, x19, lsl #2]
	bl	_desc_residue
	cmp	w0, #0
	cset	w8, ne
	sub	w21, w21, w8
LBB0_3:
	ldr	x8, [x20, #8]
	ldr	w1, [x8, x19, lsl #2]
Lloh0:
	adrp	x3, l_.str@PAGE
Lloh1:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_DBGDATA
	mov	w0, w21
	bl	_DBGINFO
	cbz	w21, LBB0_5
; %bb.4:
	ldr	w0, [x20, #16]
	ldr	x8, [x20, #8]
	ldr	w1, [x8, x19, lsl #2]
	ldr	w2, [x20, #4]
	mov	x3, x21
	bl	_ldisc_receive_buf
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x19
	bl	_free_rbufs
	mov	w0, #1
LBB0_6:
	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
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rx"

	.no_dead_strip	_rx_get_buf
.subsections_via_symbols
