	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rx_enable
_rx_enable:                             ## @rx_enable
	.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
	movl	%esi, %ebx
	movq	%rdi, %r15
	movslq	%esi, %rdi
	callq	_DBGINFO
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	cmpl	$65536, %ebx                    ## imm = 0x10000
	jb	LBB0_5
## %bb.1:
	testl	$196608, %ebx                   ## imm = 0x30000
	jne	LBB0_3
## %bb.2:
	movl	%ebx, %eax
	shrl	$16, %eax
	movq	_DMABUFSIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	ja	LBB0_3
## %bb.4:
	movl	%eax, (%r15)
	xorl	%eax, %eax
	cmpl	$8388608, %ebx                  ## imm = 0x800000
	setb	%al
	movl	%eax, 4(%r15)
	movq	%r15, %rdi
	callq	_rx_stop
LBB0_5:
	movq	16(%r15), %rax
	andl	$3, %ebx
	je	LBB0_10
## %bb.6:
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	cmpl	$2, %ebx
	jne	LBB0_12
## %bb.9:
	movq	_RCR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_rd_reg16
	movq	_BIT3@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_wr_reg16
	jmp	LBB0_12
LBB0_10:
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%r15, %rdi
	callq	_rx_stop
	jmp	LBB0_12
LBB0_3:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_7:
	movq	%r15, %rdi
	callq	_rx_start
LBB0_12:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMABUFSIZE,4,2                 ## @DMABUFSIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RCR,4,2                        ## @RCR
	.comm	_BIT3,4,2                       ## @BIT3
	.no_dead_strip	_rx_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rx_enable
_rx_enable:                             ; @rx_enable
	.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	x21, x1
	mov	x20, x0
	sxtw	x0, w21
	bl	_DBGINFO
	add	x19, x20, #8
	mov	x0, x19
	bl	_spin_lock_irqsave
	cmp	w21, #16, lsl #12               ; =65536
	b.lo	LBB0_4
; %bb.1:
	tst	w21, #0x30000
	b.ne	LBB0_10
; %bb.2:
	lsr	w8, w21, #16
Lloh0:
	adrp	x9, _DMABUFSIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMABUFSIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.hi	LBB0_10
; %bb.3:
	cmp	w21, #2048, lsl #12             ; =8388608
	cset	w9, lo
	stp	w8, w9, [x20]
	mov	x0, x20
	bl	_rx_stop
LBB0_4:
	ldr	x9, [x20, #16]
	ands	w8, w21, #0x3
	b.eq	LBB0_8
; %bb.5:
	cbz	x9, LBB0_11
; %bb.6:
	cmp	w8, #2
	b.ne	LBB0_12
; %bb.7:
Lloh3:
	adrp	x8, _RCR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RCR@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_rd_reg16
Lloh6:
	adrp	x8, _BIT3@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BIT3@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w2, w8, w0
	mov	x0, x20
	mov	x1, x21
	bl	_wr_reg16
	b	LBB0_12
LBB0_8:
	cbz	x9, LBB0_12
; %bb.9:
	mov	x0, x20
	bl	_rx_stop
	b	LBB0_12
LBB0_10:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_11:
	mov	x0, x20
	bl	_rx_start
LBB0_12:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_13:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DMABUFSIZE,4,2                 ; @DMABUFSIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RCR,4,2                        ; @RCR
	.comm	_BIT3,4,2                       ; @BIT3
	.no_dead_strip	_rx_enable
.subsections_via_symbols
