	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks_rcv
_ks_rcv:                                ## @ks_rcv
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movq	_KS_RXFCTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ks_rdreg16
	movl	%eax, %ecx
	sarl	$8, %ecx
	movl	%ecx, (%r15)
	cmpl	$256, %eax                      ## imm = 0x100
	jl	LBB0_4
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	_KS_RXFHSR@GOTPCREL(%rip), %r13
	movq	_KS_RXFHBCR@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_ks_rdreg16
	movl	%eax, (%r12,%rbx,8)
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_ks_rdreg16
	movl	%eax, 4(%r12,%rbx,8)
	incq	%rbx
	movslq	(%r15), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_2
## %bb.3:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_4:
	movq	8(%r15), %rbx
	subl	$1, %ecx
	movl	%ecx, (%r15)
	jae	LBB0_5
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	12(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	16(%r14), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	4(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	addq	$4, %rbx
	movq	_RXFSHR_RXFV@GOTPCREL(%rip), %r13
	movq	_KS_RXQCR@GOTPCREL(%rip), %r12
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r12), %esi
	movq	_RXQCR_RRXEF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	4(%r15), %edx
	movq	%r15, %rdi
	callq	_ks_wrreg16
	incl	(%r14)
	movl	(%r13), %eax
	testl	%eax, -4(%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmoveq	-64(%rbp), %rax                 ## 8-byte Folded Reload
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	incl	(%rax)
	addq	$8, %rbx
	subl	$1, (%r15)
	jb	LBB0_16
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %eax
	testl	%eax, -4(%rbx)
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%rbx), %eax
	movq	_RX_BUF_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	setge	%cl
	testl	%eax, %eax
	setle	%al
	orb	%cl, %al
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=1
	movb	$1, %al
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movzbl	%al, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r12, %r13
	movl	(%rbx), %esi
	addl	$16, %esi
	movq	%r14, %rdi
	callq	_netdev_alloc_skb
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_6
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r12, %rdi
	movl	$2, %esi
	callq	_skb_reserve
	movq	8(%r12), %rsi
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_ks_read_qmu
	movl	(%rbx), %esi
	addl	$-4, %esi
	movq	%r12, %rdi
	callq	_skb_put
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_eth_type_trans
	movl	%eax, (%r12)
	movq	%r12, %rdi
	callq	_netif_rx
	movl	(%rbx), %eax
	movl	8(%r14), %ecx
	addl	%ecx, %eax
	addl	$-4, %eax
	movl	%eax, 8(%r14)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, %r12
	jmp	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	%r13, %r12
	movl	(%r13), %esi
	movq	_RXQCR_RRXEF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	4(%r15), %edx
	movq	%r15, %rdi
	callq	_ks_wrreg16
	movq	%r14, %rax
LBB0_7:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	_RXFSHR_RXFV@GOTPCREL(%rip), %r13
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_KS_RXFCTR,4,2                  ## @KS_RXFCTR
	.comm	_KS_RXFHSR,4,2                  ## @KS_RXFHSR
	.comm	_KS_RXFHBCR,4,2                 ## @KS_RXFHBCR
	.comm	_RXFSHR_RXFV,4,2                ## @RXFSHR_RXFV
	.comm	_RX_BUF_SIZE,4,2                ## @RX_BUF_SIZE
	.comm	_KS_RXQCR,4,2                   ## @KS_RXQCR
	.comm	_RXQCR_RRXEF,4,2                ## @RXQCR_RRXEF
	.no_dead_strip	_ks_rcv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks_rcv
_ks_rcv:                                ; @ks_rcv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x1
	mov	x20, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x8, _KS_RXFCTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KS_RXFCTR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ks_rdreg16
	asr	w8, w0, #8
	str	w8, [x20]
	cmp	w0, #256
	b.lt	LBB0_3
; %bb.1:
	mov	x22, #0
Lloh3:
	adrp	x23, _KS_RXFHSR@GOTPAGE
Lloh4:
	ldr	x23, [x23, _KS_RXFHSR@GOTPAGEOFF]
Lloh5:
	adrp	x24, _KS_RXFHBCR@GOTPAGE
Lloh6:
	ldr	x24, [x24, _KS_RXFHBCR@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x20
	bl	_ks_rdreg16
	str	w0, [x21]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_ks_rdreg16
	str	w0, [x21, #4]
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #8
	cmp	x22, x8
	b.lt	LBB0_2
LBB0_3:
	ldr	x9, [x20, #8]
	sub	w10, w8, #1
	str	w10, [x20]
	cbz	w8, LBB0_13
; %bb.4:
	add	x22, x19, #12
	add	x23, x19, #16
	add	x8, x19, #4
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	add	x25, x9, #4
Lloh7:
	adrp	x26, _RXFSHR_RXFV@GOTPAGE
Lloh8:
	ldr	x26, [x26, _RXFSHR_RXFV@GOTPAGEOFF]
Lloh9:
	adrp	x27, _KS_RXQCR@GOTPAGE
Lloh10:
	ldr	x27, [x27, _KS_RXQCR@GOTPAGEOFF]
Lloh11:
	adrp	x28, _RXQCR_RRXEF@GOTPAGE
Lloh12:
	ldr	x28, [x28, _RXQCR_RRXEF@GOTPAGEOFF]
Lloh13:
	adrp	x24, _RX_BUF_SIZE@GOTPAGE
Lloh14:
	ldr	x24, [x24, _RX_BUF_SIZE@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x27]
	ldr	w8, [x20, #4]
	ldr	w9, [x28]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_ks_wrreg16
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldur	w8, [x25, #-4]
	ldr	w9, [x26]
	tst	w9, w8
	csel	x8, x23, x22, eq
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldr	w8, [x20]
	sub	w9, w8, #1
	str	w9, [x20]
	add	x25, x25, #8
	cbz	w8, LBB0_13
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x25, #-4]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x25]
	ldr	w9, [x24]
	cmp	w8, #1
	ccmp	w8, w9, #0, ge
	cset	w0, ge
	bl	_unlikely
	cbnz	x0, LBB0_5
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #1
	bl	_unlikely
	cbnz	x0, LBB0_5
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x25]
	add	w1, w8, #16
	mov	x0, x19
	bl	_netdev_alloc_skb
	mov	x21, x0
	bl	_likely
	cbz	x0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	mov	w1, #2
	bl	_skb_reserve
	ldr	x1, [x21, #8]
	ldr	w2, [x25]
	mov	x0, x20
	bl	_ks_read_qmu
	ldr	w8, [x25]
	sub	w1, w8, #4
	mov	x0, x21
	bl	_skb_put
	mov	x0, x21
	mov	x1, x19
	bl	_eth_type_trans
	str	w0, [x21]
	mov	x0, x21
	bl	_netif_rx
	ldr	w8, [x25]
	ldr	w9, [x19, #8]
	add	w8, w8, w9
	sub	w8, w8, #4
	str	w8, [x19, #8]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	b	LBB0_6
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x27]
	ldr	w8, [x20, #4]
	ldr	w9, [x28]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_ks_wrreg16
	mov	x8, x19
	b	LBB0_6
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_KS_RXFCTR,4,2                  ; @KS_RXFCTR
	.comm	_KS_RXFHSR,4,2                  ; @KS_RXFHSR
	.comm	_KS_RXFHBCR,4,2                 ; @KS_RXFHBCR
	.comm	_RXFSHR_RXFV,4,2                ; @RXFSHR_RXFV
	.comm	_RX_BUF_SIZE,4,2                ; @RX_BUF_SIZE
	.comm	_KS_RXQCR,4,2                   ; @KS_RXQCR
	.comm	_RXQCR_RRXEF,4,2                ; @RXQCR_RRXEF
	.no_dead_strip	_ks_rcv
.subsections_via_symbols
