	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function data_rc
_data_rc:                               ## @data_rc
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.1:
	movq	%rsi, %rbx
	movl	32(%r14), %esi
	callq	_TransmitBufferFree
	movq	24(%r14), %r15
	movq	(%r15), %rax
	movq	(%rax,%rbx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.2:
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	cmpq	(%r14), %rax
	jne	LBB0_10
## %bb.3:
	movq	32(%r15), %r13
	leaq	(%rbx,%rbx,2), %r12
	movq	(%r13,%r12,8), %rsi
	movq	8(%r13,%r12,8), %rdx
	leaq	L_.str(%rip), %rdi
	callq	_dprintf
	movl	$1, %edi
	movl	%eax, %esi
	callq	_dbug
	movq	8(%r13,%r12,8), %rdx
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.4:
	leaq	(,%r12,8), %rax
	addq	%r13, %rax
	movq	16(%r13,%r12,8), %r8
	movq	(%rax), %rsi
	leaq	(%rsi,%rsi,2), %rcx
	testb	$4, (%r8,%rcx,4)
	jne	LBB0_9
## %bb.5:
	movq	24(%r15), %rdi
	cmpq	$0, (%rdi,%rbx,8)
	je	LBB0_9
## %bb.6:
	movq	%rax, %r12
	shll	$16, %ebx
	movl	(%r14), %edx
	shll	$8, %edx
	orl	%ebx, %edx
	orl	16(%r15), %edx
	xorl	%esi, %esi
	cmpq	$0, 16(%r14)
	je	LBB0_8
## %bb.7:
	movq	_EXT_CONTROLLER@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
LBB0_8:
	orl	%esi, %edx
	movq	8(%r14), %rdi
	movq	__DATA_B3_R@GOTPCREL(%rip), %rbx
	movq	_CONFIRM@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rbx), %esi
	movl	4(%r8,%rcx,4), %r9d
	movl	8(%r8,%rcx,4), %ecx
	movl	$0, (%rsp)
	leaq	L_.str.1(%rip), %r8
	callq	_sendf
	movq	%r12, %rax
	movq	(%r12), %rsi
	movq	8(%r12), %rdx
LBB0_9:
	incq	%rsi
	movq	%rsi, (%rax)
	movq	_MAX_DATA_B3@GOTPCREL(%rip), %rdi
	xorl	%ecx, %ecx
	cmpq	(%rdi), %rsi
	cmovneq	%rsi, %rcx
	movq	%rcx, (%rax)
	decq	%rdx
	movq	%rdx, 8(%rax)
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"data_out=%d, data_pending=%d"

	.comm	_EXT_CONTROLLER,4,2             ## @EXT_CONTROLLER
	.comm	__DATA_B3_R,4,2                 ## @_DATA_B3_R
	.comm	_CONFIRM,4,2                    ## @CONFIRM
L_.str.1:                               ## @.str.1
	.asciz	"ww"

	.comm	_MAX_DATA_B3,8,3                ## @MAX_DATA_B3
	.no_dead_strip	_data_rc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function data_rc
_data_rc:                               ; @data_rc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x1
	ldr	w1, [x19, #32]
	bl	_TransmitBufferFree
	ldr	x22, [x19, #24]
	ldr	x8, [x22]
	ldr	x23, [x8, x20, lsl #3]
	cbz	x23, LBB0_8
; %bb.2:
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x23, lsl #3]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
	ldr	x24, [x22, #32]
	mov	w8, #24
	madd	x20, x23, x8, x24
	ldr	x1, [x20]
	mov	x21, x20
	ldr	x2, [x21, #8]!
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintf
	mov	x1, x0
	mov	w0, #1
	bl	_dbug
	ldr	x9, [x21]
	cbz	x9, LBB0_8
; %bb.4:
	mov	w8, #24
	madd	x8, x23, x8, x24
	ldr	x10, [x8, #16]
	ldr	x8, [x20]
	mov	w11, #12
	mul	x11, x8, x11
	ldrb	w11, [x10, x11]
	tbnz	w11, #2, LBB0_7
; %bb.5:
	ldr	x11, [x22, #24]
	ldr	x11, [x11, x23, lsl #3]
	cbz	x11, LBB0_7
; %bb.6:
	ldr	w9, [x19]
	lsl	w9, w9, #8
	orr	w9, w9, w23, lsl #16
	ldr	w11, [x22, #16]
Lloh2:
	adrp	x12, _EXT_CONTROLLER@GOTPAGE
Lloh3:
	ldr	x12, [x12, _EXT_CONTROLLER@GOTPAGEOFF]
	orr	w9, w11, w9
Lloh4:
	ldr	w11, [x12]
	ldp	x0, x12, [x19, #8]
	cmp	x12, #0
	csel	w11, wzr, w11, eq
	orr	w2, w9, w11
Lloh5:
	adrp	x9, __DATA_B3_R@GOTPAGE
Lloh6:
	ldr	x9, [x9, __DATA_B3_R@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x11, _CONFIRM@GOTPAGE
Lloh9:
	ldr	x11, [x11, _CONFIRM@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	orr	w1, w11, w9
	mov	w9, #12
	madd	x8, x8, x9, x10
	ldp	w5, w3, [x8, #4]
Lloh11:
	adrp	x4, l_.str.1@PAGE
Lloh12:
	add	x4, x4, l_.str.1@PAGEOFF
	mov	w6, #0
	bl	_sendf
	ldr	x8, [x20]
	ldr	x9, [x21]
LBB0_7:
	add	x10, x8, #1
	str	x10, [x20]
Lloh13:
	adrp	x11, _MAX_DATA_B3@GOTPAGE
Lloh14:
	ldr	x11, [x11, _MAX_DATA_B3@GOTPAGEOFF]
Lloh15:
	ldr	x11, [x11]
	cmp	x10, x11
	csinc	x8, xzr, x8, eq
	str	x8, [x20]
	sub	x8, x9, #1
	str	x8, [x21]
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"data_out=%d, data_pending=%d"

	.comm	_EXT_CONTROLLER,4,2             ; @EXT_CONTROLLER
	.comm	__DATA_B3_R,4,2                 ; @_DATA_B3_R
	.comm	_CONFIRM,4,2                    ; @CONFIRM
l_.str.1:                               ; @.str.1
	.asciz	"ww"

	.comm	_MAX_DATA_B3,8,3                ; @MAX_DATA_B3
	.no_dead_strip	_data_rc
.subsections_via_symbols
