	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tx_load
_tx_load:                               ## @tx_load
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	testl	%edx, %edx
	je	LBB0_4
## %bb.1:
	movl	%edx, %r12d
	leaq	L_.str(%rip), %rcx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	callq	_DBGDATA
	movl	4(%r14), %r13d
	movl	%r13d, (%r14)
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	incl	%r13d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	cmpl	8(%r14), %r13d
	movq	24(%r14), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	$0, %eax
	cmovel	%eax, %r13d
	movq	_DMABUFSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r12d
	cmovbl	%r12d, %eax
	movl	4(%rcx,%rdx,8), %edi
	movzwl	%ax, %r15d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	addq	%r15, %rbx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpl	%r15d, %r12d
	movq	%r15, %rbx
	sete	%al
	movq	16(%r14), %rcx
	movq	_MGSL_MODE_HDLC@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	sete	%dl
	andb	%al, %dl
	movq	_MGSL_MODE_RAW@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	sete	%al
	orb	%dl, %al
	movzbl	%al, %esi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	%r12d, %r15d
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12,%r14,8), %rdi
	callq	_set_desc_eof
	movq	(%r12,%r14,8), %rdi
	movl	%ebx, %esi
	callq	_set_desc_count
	movw	%bx, (%r12,%r14,8)
	movl	%r15d, %r12d
	subl	%ebx, %r12d
	jne	LBB0_2
## %bb.3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, 4(%rax)
LBB0_4:
	addq	$40, %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	"tx"

	.comm	_DMABUFSIZE,4,2                 ## @DMABUFSIZE
	.comm	_MGSL_MODE_HDLC,8,3             ## @MGSL_MODE_HDLC
	.comm	_MGSL_MODE_RAW,8,3              ## @MGSL_MODE_RAW
	.no_dead_strip	_tx_load
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tx_load
_tx_load:                               ; @tx_load
	.cfi_startproc
; %bb.0:
	cbz	w2, LBB0_4
; %bb.1:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x3, l_.str@PAGE
Lloh1:
	add	x3, x3, l_.str@PAGEOFF
	bl	_DBGDATA
	ldr	w23, [x20, #4]
	str	w23, [x20]
Lloh2:
	adrp	x24, _DMABUFSIZE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _DMABUFSIZE@GOTPAGEOFF]
Lloh4:
	adrp	x25, _MGSL_MODE_HDLC@GOTPAGE
Lloh5:
	ldr	x25, [x25, _MGSL_MODE_HDLC@GOTPAGEOFF]
Lloh6:
	adrp	x26, _MGSL_MODE_RAW@GOTPAGE
Lloh7:
	ldr	x26, [x26, _MGSL_MODE_RAW@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	add	x27, x8, w23, uxtw #3
	add	w8, w23, #1
	ldr	w9, [x20, #8]
	cmp	w8, w9
	csinc	w23, wzr, w23, eq
	ldr	w8, [x24]
	cmp	w19, w8
	csel	w28, w19, w8, lo
	ldr	w0, [x27, #4]
	and	w22, w28, #0xffff
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
	sub	w19, w19, w22
	add	x21, x21, x22
	cmp	w19, #0
	ldr	x8, [x20, #16]
	ldr	x9, [x25]
	ccmp	x8, x9, #0, eq
	ldr	x9, [x26]
	ccmp	x8, x9, #4, ne
	cset	w1, eq
	ldr	x0, [x27]
	bl	_set_desc_eof
	ldr	x0, [x27]
	mov	x1, x22
	bl	_set_desc_count
	strh	w28, [x27]
	cbnz	w19, LBB0_2
; %bb.3:
	str	w23, [x20, #4]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
LBB0_4:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	.cfi_same_value w25
	.cfi_same_value w26
	.cfi_same_value w27
	.cfi_same_value w28
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx"

	.comm	_DMABUFSIZE,4,2                 ; @DMABUFSIZE
	.comm	_MGSL_MODE_HDLC,8,3             ; @MGSL_MODE_HDLC
	.comm	_MGSL_MODE_RAW,8,3              ; @MGSL_MODE_RAW
	.no_dead_strip	_tx_load
.subsections_via_symbols
