	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hw_cfg_huge_frame
_hw_cfg_huge_frame:                     ## @hw_cfg_huge_frame
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	cmpq	$0, 24(%rsi)
	je	LBB0_2
## %bb.1:
	movq	_KS8842_SWITCH_CTRL_2_OFFSET@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	16(%rbx), %rdi
	callq	_readw
	movq	_RX_HUGE_FRAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rbx), %ecx
	movq	_SWITCH_HUGE_PACKET@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movl	%edi, %edx
	orl	%eax, %edx
	notl	%edi
	andl	%eax, %edi
	testl	%ecx, %ecx
	cmovnel	%edx, %edi
	movq	(%r15), %rsi
	addq	16(%rbx), %rsi
	callq	_writew
LBB0_2:
	movq	_RX_HUGE_FRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_DMA_RX_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, (%rbx)
	je	LBB0_4
## %bb.3:
	orl	%eax, 8(%rbx)
	movq	_dev_rcv_special@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	notl	%eax
	andl	%eax, 8(%rbx)
	cmpl	$2, 4(%rbx)
	jl	LBB0_5
## %bb.6:
	movq	_port_rcv_packets@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_dev_rcv_packets@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KS8842_SWITCH_CTRL_2_OFFSET,8,3 ## @KS8842_SWITCH_CTRL_2_OFFSET
	.comm	_RX_HUGE_FRAME,4,2              ## @RX_HUGE_FRAME
	.comm	_SWITCH_HUGE_PACKET,4,2         ## @SWITCH_HUGE_PACKET
	.comm	_DMA_RX_ERROR,4,2               ## @DMA_RX_ERROR
	.comm	_dev_rcv_special,4,2            ## @dev_rcv_special
	.comm	_port_rcv_packets,4,2           ## @port_rcv_packets
	.comm	_dev_rcv_packets,4,2            ## @dev_rcv_packets
	.no_dead_strip	_hw_cfg_huge_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hw_cfg_huge_frame
_hw_cfg_huge_frame:                     ; @hw_cfg_huge_frame
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x1, #24]
Lloh0:
	adrp	x21, _RX_HUGE_FRAME@GOTPAGE
Lloh1:
	ldr	x21, [x21, _RX_HUGE_FRAME@GOTPAGEOFF]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x20, #16]
Lloh2:
	adrp	x22, _KS8842_SWITCH_CTRL_2_OFFSET@GOTPAGE
Lloh3:
	ldr	x22, [x22, _KS8842_SWITCH_CTRL_2_OFFSET@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readw
	ldr	w8, [x20]
	ldr	w9, [x21]
Lloh4:
	adrp	x10, _SWITCH_HUGE_PACKET@GOTPAGE
Lloh5:
	ldr	x10, [x10, _SWITCH_HUGE_PACKET@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	orr	w11, w10, w0
	bic	w10, w0, w10
	tst	w9, w8
	csel	w0, w10, w11, eq
	ldr	x8, [x20, #16]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writew
LBB0_2:
	ldr	w9, [x20]
	ldr	w10, [x21]
Lloh7:
	adrp	x8, _DMA_RX_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DMA_RX_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w10, w9
	b.eq	LBB0_4
; %bb.3:
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	str	w8, [x20, #8]
Lloh10:
	adrp	x8, _dev_rcv_special@GOTPAGE
Lloh11:
	ldr	x8, [x8, _dev_rcv_special@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
	ldp	w10, w9, [x20, #4]
	bic	w8, w9, w8
	str	w8, [x20, #8]
Lloh12:
	adrp	x8, _dev_rcv_packets@GOTPAGE
Lloh13:
	ldr	x8, [x8, _dev_rcv_packets@GOTPAGEOFF]
Lloh14:
	adrp	x9, _port_rcv_packets@GOTPAGE
Lloh15:
	ldr	x9, [x9, _port_rcv_packets@GOTPAGEOFF]
	cmp	w10, #1
	csel	x8, x9, x8, gt
LBB0_5:
	ldr	w8, [x8]
	str	w8, [x19]
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_KS8842_SWITCH_CTRL_2_OFFSET,8,3 ; @KS8842_SWITCH_CTRL_2_OFFSET
	.comm	_RX_HUGE_FRAME,4,2              ; @RX_HUGE_FRAME
	.comm	_SWITCH_HUGE_PACKET,4,2         ; @SWITCH_HUGE_PACKET
	.comm	_DMA_RX_ERROR,4,2               ; @DMA_RX_ERROR
	.comm	_dev_rcv_special,4,2            ; @dev_rcv_special
	.comm	_port_rcv_packets,4,2           ; @port_rcv_packets
	.comm	_dev_rcv_packets,4,2            ; @dev_rcv_packets
	.no_dead_strip	_hw_cfg_huge_frame
.subsections_via_symbols
