	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hw_set_wol_frame
_hw_set_wol_frame:                      ## @hw_set_wol_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$312, %rsp                      ## imm = 0x138
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -344(%rbp)                 ## 8-byte Spill
	movq	%rcx, -336(%rbp)                ## 8-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	shll	$3, %edx
	cmpl	%r8d, %edx
	cmovgel	%r8d, %edx
	cmpl	$64, %edx
	movl	$64, %ecx
	cmovll	%edx, %ecx
	movl	%ecx, -312(%rbp)                ## 4-byte Spill
	movq	%rax, -48(%rbp)
	shll	$4, %esi
	movq	_KS8841_WOL_FRAME_BYTE0_OFFSET@GOTPCREL(%rip), %rax
	movslq	%esi, %r14
	movq	(%rdi), %rsi
	addq	%r14, %rsi
	addq	(%rax), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	_KS8841_WOL_FRAME_BYTE2_OFFSET@GOTPCREL(%rip), %rax
	movq	%rbx, -320(%rbp)                ## 8-byte Spill
	movq	(%rbx), %rsi
	addq	%r14, %rsi
	addq	(%rax), %rsi
	xorl	%edi, %edi
	callq	_writel
	xorl	%edx, %edx
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	movq	%r14, -328(%rbp)                ## 8-byte Spill
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	testl	%edx, %edx
	je	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	testb	$1, %r15b
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movslq	%r12d, %rax
	movq	-344(%rbp), %rcx                ## 8-byte Reload
	movl	(%rcx,%rax,4), %eax
	movslq	%ebx, %rcx
	incl	%ebx
	movl	%eax, -304(%rbp,%rcx,4)
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	sarl	%r15d
	incl	%r12d
	decl	%edx
	cmpl	-312(%rbp), %r12d               ## 4-byte Folded Reload
	jl	LBB0_1
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, -308(%rbp)                ## 4-byte Spill
	movslq	%r13d, %r13
	movq	-336(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%r13,4), %rbx
	addq	%r13, %r14
	incl	%r13d
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rbx), %r15d
	movq	-320(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rsi
	movq	_KS8841_WOL_FRAME_BYTE0_OFFSET@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	addq	%r14, %rsi
	movl	%r15d, %edi
	callq	_writeb
	testl	%r15d, %r15d
	jne	LBB0_4
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=2
	addl	$8, %r12d
	addq	$4, %rbx
	incq	%r14
	incl	%r13d
	cmpl	-312(%rbp), %r12d               ## 4-byte Folded Reload
	jl	LBB0_3
	jmp	LBB0_12
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$8, %edx
	movq	-328(%rbp), %r14                ## 8-byte Reload
	movl	-308(%rbp), %ebx                ## 4-byte Reload
	cmpl	-312(%rbp), %r12d               ## 4-byte Folded Reload
	jl	LBB0_1
LBB0_9:
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.10:
	andb	$7, %r12b
	movl	%r12d, %ecx
	shll	%cl, %r15d
	notl	%r15d
	movslq	%r13d, %rax
	movq	-336(%rbp), %rcx                ## 8-byte Reload
	andl	-4(%rcx,%rax,4), %r15d
	movq	_KS8841_WOL_FRAME_BYTE0_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	%r14, %rax
	movq	-320(%rbp), %rdx                ## 8-byte Reload
	addq	(%rdx), %rax
	leaq	(%rcx,%rax), %rsi
	decq	%rsi
	movl	%r15d, %edi
	callq	_writeb
	jmp	LBB0_13
LBB0_12:
	movq	-328(%rbp), %r14                ## 8-byte Reload
	movl	-308(%rbp), %ebx                ## 4-byte Reload
LBB0_13:
	leaq	-304(%rbp), %rsi
	movl	%ebx, %edi
	callq	_ether_crc
	movq	_KS8841_WOL_FRAME_CRC_OFFSET@GOTPCREL(%rip), %rcx
	movq	-320(%rbp), %rdx                ## 8-byte Reload
	addq	(%rdx), %r14
	addq	(%rcx), %r14
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_writel
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	addq	$312, %rsp                      ## imm = 0x138
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_KS8841_WOL_FRAME_BYTE0_OFFSET,8,3 ## @KS8841_WOL_FRAME_BYTE0_OFFSET
	.comm	_KS8841_WOL_FRAME_BYTE2_OFFSET,8,3 ## @KS8841_WOL_FRAME_BYTE2_OFFSET
	.comm	_KS8841_WOL_FRAME_CRC_OFFSET,8,3 ## @KS8841_WOL_FRAME_CRC_OFFSET
	.no_dead_strip	_hw_set_wol_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hw_set_wol_frame
_hw_set_wol_frame:                      ; @hw_set_wol_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #384
	.cfi_def_cfa_offset 384
	stp	x28, x27, [sp, #288]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #304]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #320]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #336]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #352]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #368]            ; 16-byte Folded Spill
	add	x29, sp, #368
	.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
	str	x5, [sp]                        ; 8-byte Folded Spill
	mov	x20, x3
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	lsl	w8, w2, #3
	cmp	w8, w4
	csel	w8, w8, w4, lt
	mov	w9, #64
	cmp	w8, #64
	csel	w26, w8, w9, lt
	lsl	w8, w1, #4
	ldr	x9, [x0]
Lloh3:
	adrp	x25, _KS8841_WOL_FRAME_BYTE0_OFFSET@GOTPAGE
Lloh4:
	ldr	x25, [x25, _KS8841_WOL_FRAME_BYTE0_OFFSET@GOTPAGEOFF]
	ldr	x10, [x25]
	sxtw	x21, w8
	add	x8, x9, x21
	add	x1, x8, x10
	mov	w0, #0
	bl	_writel
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _KS8841_WOL_FRAME_BYTE2_OFFSET@GOTPAGE
Lloh6:
	ldr	x9, [x9, _KS8841_WOL_FRAME_BYTE2_OFFSET@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	add	x8, x8, x21
	add	x1, x8, x9
	mov	w0, #0
	bl	_writel
	mov	w8, #0
	mov	w28, #0
	mov	w27, #0
	mov	w22, #0
	mov	w23, #0
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cbz	w8, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	tbz	w23, #0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	ldr	w9, [x9, w28, sxtw #2]
	add	x10, sp, #16
	str	w9, [x10, w22, sxtw #2]
	add	w22, w22, #1
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	asr	w23, w23, #1
	add	w28, w28, #1
	sub	w8, w8, #1
	cmp	w28, w26
	b.lt	LBB0_1
	b	LBB0_9
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x24, x20
	add	x21, x20, w27, sxtw #2
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x20, x8, w27, sxtw
	add	w27, w27, #1
LBB0_6:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w23, [x21]
	ldr	x8, [x19]
	ldr	x9, [x25]
	add	x8, x8, x9
	add	x1, x20, x8
	mov	x0, x23
	bl	_writeb
	cbnz	w23, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	add	w28, w28, #8
	add	x21, x21, #4
	add	x20, x20, #1
	add	w27, w27, #1
	cmp	w28, w26
	b.lt	LBB0_6
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	w8, #8
	mov	x20, x24
	cmp	w28, w26
	b.lt	LBB0_1
LBB0_9:
	cbz	w23, LBB0_11
; %bb.10:
	sub	w8, w27, #1
	ldr	w8, [x20, w8, sxtw #2]
	and	w9, w28, #0x7
	lsl	w9, w23, w9
	bic	w0, w8, w9
	ldr	x8, [x19]
	ldr	x9, [x25]
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	add	x10, x10, w27, sxtw
	add	x8, x10, x8
	add	x8, x8, x9
	sub	x1, x8, #1
	bl	_writeb
LBB0_11:
	add	x1, sp, #16
	mov	x0, x22
	bl	_ether_crc
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _KS8841_WOL_FRAME_CRC_OFFSET@GOTPAGE
Lloh9:
	ldr	x9, [x9, _KS8841_WOL_FRAME_CRC_OFFSET@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	add	x8, x8, x10
	add	x1, x8, x9
	bl	_writel
	ldur	x8, [x29, #-96]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	ldp	x29, x30, [sp, #368]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #352]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #336]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #320]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #304]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #288]            ; 16-byte Folded Reload
	add	sp, sp, #384
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_KS8841_WOL_FRAME_BYTE0_OFFSET,8,3 ; @KS8841_WOL_FRAME_BYTE0_OFFSET
	.comm	_KS8841_WOL_FRAME_BYTE2_OFFSET,8,3 ; @KS8841_WOL_FRAME_BYTE2_OFFSET
	.comm	_KS8841_WOL_FRAME_CRC_OFFSET,8,3 ; @KS8841_WOL_FRAME_CRC_OFFSET
	.no_dead_strip	_hw_set_wol_frame
.subsections_via_symbols
