	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function corkscrew_rx
_corkscrew_rx:                          ## @corkscrew_rx
	.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	%rdi, %r14
	movslq	(%rdi), %r13
	movq	_corkscrew_debug@GOTPCREL(%rip), %rax
	cmpl	$6, (%rax)
	jl	LBB0_2
## %bb.1:
	movq	_EL3_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r13, %rdi
	callq	_inw
	movl	%eax, %ebx
	movq	_RxStatus@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r13, %rdi
	callq	_inw
	movswl	%ax, %edx
	movswl	%bx, %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
LBB0_2:
	movq	_RxStatus@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r13, %rdi
	callq	_inw
	testw	%ax, %ax
	jle	LBB0_29
## %bb.3:
	movq	_EL3_STATUS@GOTPCREL(%rip), %r15
	movq	_CmdInProgress@GOTPCREL(%rip), %r12
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_RxStatus@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r13, %rdi
	callq	_inw
	testw	%ax, %ax
	jle	LBB0_29
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_21 Depth 2
                                        ##     Child Loop BB0_26 Depth 2
	movzwl	%ax, %r14d
	testl	$16384, %r14d                   ## imm = 0x4000
	jne	LBB0_5
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%r14d, %ebx
	andl	$8191, %ebx                     ## imm = 0x1FFF
	leal	7(%rbx), %edi
	callq	_dev_alloc_skb
	movq	%rax, %rcx
	movq	_corkscrew_debug@GOTPCREL(%rip), %rax
	cmpl	$5, (%rax)
	jl	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_pr_debug
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	testq	%rcx, %rcx
	je	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rcx, %r14
	movq	%rcx, %rdi
	movl	$2, %esi
	callq	_skb_reserve
	movq	_RX_FIFO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	%r13, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	%ebx, %esi
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	callq	_skb_put
	movl	%ebx, %edx
	addl	$3, %edx
	shrl	$2, %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_insl
	movq	_RxDiscard@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EL3_CMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r13, %rsi
	callq	_outw
	movq	%r14, %rbx
	movq	%r14, %rdi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_eth_type_trans
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_netif_rx
	incl	16(%r14)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addw	%ax, 8(%r14)
	movl	$-200, %ebx
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r15), %rdi
	addq	%r13, %rdi
	callq	_inw
	testw	%ax, (%r12)
	je	LBB0_28
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=2
	leal	1(%rbx), %eax
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jne	LBB0_21
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_RxErrors@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r13, %rdi
	callq	_inb
	movl	%eax, %ebx
	movq	_corkscrew_debug@GOTPCREL(%rip), %rax
	cmpl	$3, (%rax)
	jl	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movzbl	%bl, %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	incl	36(%r14)
	testb	$1, %bl
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	testb	$2, %bl
	jne	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	testb	$4, %bl
	jne	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	testb	$8, %bl
	jne	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	testb	$16, %bl
	jne	LBB0_16
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	32(%r14)
	testb	$2, %bl
	je	LBB0_11
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	20(%r14)
	testb	$4, %bl
	je	LBB0_13
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	28(%r14)
	testb	$8, %bl
	je	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	24(%r14)
	testb	$16, %bl
	je	LBB0_25
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	20(%r14)
	jmp	LBB0_25
LBB0_23:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_corkscrew_debug@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_4 Depth=1
	movswl	4(%r14), %esi
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_pr_debug
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_RxDiscard@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EL3_CMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r13, %rsi
	callq	_outw
	incl	12(%r14)
	movl	$-200, %ebx
	.p2align	4, 0x90
LBB0_26:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r15), %rdi
	addq	%r13, %rdi
	callq	_inw
	testw	%ax, (%r12)
	je	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=2
	leal	1(%rbx), %eax
	testl	%ebx, %ebx
	movl	%eax, %ebx
	jne	LBB0_26
	jmp	LBB0_28
LBB0_29:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_corkscrew_debug,4,2            ## @corkscrew_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"   In rx_packet(), status %4.4x, rx_status %4.4x.\n"

	.comm	_EL3_STATUS,8,3                 ## @EL3_STATUS
	.comm	_RxStatus,8,3                   ## @RxStatus
	.comm	_RxErrors,8,3                   ## @RxErrors
L_.str.1:                               ## @.str.1
	.asciz	" Rx error: status %2.2x.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Receiving packet size %d status %4.4x.\n"

	.comm	_RX_FIFO,8,3                    ## @RX_FIFO
	.comm	_RxDiscard,4,2                  ## @RxDiscard
	.comm	_EL3_CMD,8,3                    ## @EL3_CMD
	.comm	_CmdInProgress,2,1              ## @CmdInProgress
L_.str.3:                               ## @.str.3
	.asciz	"%s: Couldn't allocate a sk_buff of size %d.\n"

	.no_dead_strip	_corkscrew_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function corkscrew_rx
_corkscrew_rx:                          ; @corkscrew_rx
	.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, x0
	ldrsw	x26, [x0]
Lloh0:
	adrp	x8, _corkscrew_debug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _corkscrew_debug@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x28, _EL3_STATUS@GOTPAGE
Lloh4:
	ldr	x28, [x28, _EL3_STATUS@GOTPAGEOFF]
Lloh5:
	adrp	x22, _RxStatus@GOTPAGE
Lloh6:
	ldr	x22, [x22, _RxStatus@GOTPAGEOFF]
	cmp	w8, #6
	b.lt	LBB0_2
; %bb.1:
	ldr	x8, [x28]
	add	x0, x8, x26
	bl	_inw
	mov	x20, x0
	ldr	x8, [x22]
	add	x0, x8, x26
	bl	_inw
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_debug
LBB0_2:
	ldr	x8, [x22]
	add	x0, x8, x26
	bl	_inw
	cmp	w0, #1
	b.lt	LBB0_27
; %bb.3:
Lloh9:
	adrp	x25, _RxDiscard@GOTPAGE
Lloh10:
	ldr	x25, [x25, _RxDiscard@GOTPAGEOFF]
Lloh11:
	adrp	x27, _EL3_CMD@GOTPAGE
Lloh12:
	ldr	x27, [x27, _EL3_CMD@GOTPAGEOFF]
Lloh13:
	adrp	x21, _CmdInProgress@GOTPAGE
Lloh14:
	ldr	x21, [x21, _CmdInProgress@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x22]
	add	x0, x8, x26
	bl	_inw
	cmp	w0, #0
	b.le	LBB0_27
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;     Child Loop BB0_26 Depth 2
	tbnz	w0, #14, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x20, x25
	and	w25, w0, #0xffff
	and	w23, w25, #0x1fff
	add	w0, w23, #7
	bl	_dev_alloc_skb
	mov	x24, x0
Lloh15:
	adrp	x8, _corkscrew_debug@GOTPAGE
Lloh16:
	ldr	x8, [x8, _corkscrew_debug@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w8, #5
	b.lt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	str	x25, [sp]
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	bl	_pr_debug
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	cbz	x24, LBB0_23
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x24
	mov	w1, #2
	bl	_skb_reserve
Lloh20:
	adrp	x8, _RX_FIFO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RX_FIFO@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	add	x25, x8, x26
	mov	x0, x24
	mov	x1, x23
	bl	_skb_put
	mov	x1, x0
	add	w8, w23, #3
	lsr	w2, w8, #2
	mov	x0, x25
	bl	_insl
	mov	x25, x20
	ldr	w0, [x20]
	ldr	x8, [x27]
	add	x1, x8, x26
	bl	_outw
	mov	x0, x24
	mov	x1, x19
	bl	_eth_type_trans
	str	w0, [x24]
	mov	x0, x24
	bl	_netif_rx
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
	ldrh	w8, [x19, #8]
	add	w8, w8, w23
	strh	w8, [x19, #8]
	mov	w23, #-200
LBB0_10:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x28]
	add	x0, x8, x26
	bl	_inw
	ldrh	w8, [x21]
	and	w8, w0, w8
	cmp	w8, #0
	ccmp	w23, #0, #4, ne
	add	w23, w23, #1
	b.ne	LBB0_10
	b	LBB0_4
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh23:
	adrp	x8, _RxErrors@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RxErrors@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	add	x0, x8, x26
	bl	_inb
	mov	x23, x0
Lloh26:
	adrp	x8, _corkscrew_debug@GOTPAGE
Lloh27:
	ldr	x8, [x8, _corkscrew_debug@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	cmp	w8, #3
	b.lt	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh29:
	adrp	x0, l_.str.1@PAGE
Lloh30:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	bl	_pr_debug
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #36]
	add	w8, w8, #1
	str	w8, [x19, #36]
	tbnz	w23, #0, LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	tbnz	w23, #1, LBB0_19
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	tbnz	w23, #2, LBB0_20
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	tbnz	w23, #3, LBB0_21
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	tbnz	w23, #4, LBB0_22
	b	LBB0_25
LBB0_18:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
	tbz	w23, #1, LBB0_15
LBB0_19:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #20]
	add	w8, w8, #1
	str	w8, [x19, #20]
	tbz	w23, #2, LBB0_16
LBB0_20:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #28]
	add	w8, w8, #1
	str	w8, [x19, #28]
	tbz	w23, #3, LBB0_17
LBB0_21:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
	tbz	w23, #4, LBB0_25
LBB0_22:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #20]
	add	w8, w8, #1
	str	w8, [x19, #20]
	b	LBB0_25
LBB0_23:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh31:
	adrp	x8, _corkscrew_debug@GOTPAGE
Lloh32:
	ldr	x8, [x8, _corkscrew_debug@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	mov	x25, x20
	cbz	w8, LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_5 Depth=1
	ldrsh	w1, [x19, #4]
	str	x23, [sp]
Lloh34:
	adrp	x0, l_.str.3@PAGE
Lloh35:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_debug
LBB0_25:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x25]
	ldr	x8, [x27]
	add	x1, x8, x26
	bl	_outw
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	mov	w23, #-200
LBB0_26:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x28]
	add	x0, x8, x26
	bl	_inw
	ldrh	w8, [x21]
	and	w8, w0, w8
	cmp	w8, #0
	ccmp	w23, #0, #4, ne
	add	w23, w23, #1
	b.ne	LBB0_26
	b	LBB0_4
LBB0_27:
	mov	w0, #0
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_corkscrew_debug,4,2            ; @corkscrew_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"   In rx_packet(), status %4.4x, rx_status %4.4x.\n"

	.comm	_EL3_STATUS,8,3                 ; @EL3_STATUS
	.comm	_RxStatus,8,3                   ; @RxStatus
	.comm	_RxErrors,8,3                   ; @RxErrors
l_.str.1:                               ; @.str.1
	.asciz	" Rx error: status %2.2x.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Receiving packet size %d status %4.4x.\n"

	.comm	_RX_FIFO,8,3                    ; @RX_FIFO
	.comm	_RxDiscard,4,2                  ; @RxDiscard
	.comm	_EL3_CMD,8,3                    ; @EL3_CMD
	.comm	_CmdInProgress,2,1              ; @CmdInProgress
l_.str.3:                               ; @.str.3
	.asciz	"%s: Couldn't allocate a sk_buff of size %d.\n"

	.no_dead_strip	_corkscrew_rx
.subsections_via_symbols
