	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks_set_grpaddr
_ks_set_grpaddr:                        ## @ks_set_grpaddr
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	movq	_HW_MCAST_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	shll	$3, %edx
	xorl	%esi, %esi
	callq	_memset
	cmpq	$0, 8(%r15)
	je	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movl	$6, %edi
	callq	_ether_gen_crc
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, %ecx
	shrl	$26, %ecx
	shrl	$29, %eax
	andb	$7, %cl
	movl	$1, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	movq	(%r15), %rcx
	orq	%rdx, (%rcx,%rax,8)
	incq	%rbx
	cmpq	8(%r15), %rbx
	jb	LBB0_2
LBB0_3:
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:
	xorl	%ebx, %ebx
	movq	_KS_MAHTR0@GOTPCREL(%rip), %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jae	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	testb	$1, %bl
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12), %esi
	addl	%ebx, %esi
	andl	$-2, %esi
	movq	(%r15), %rax
	movl	(%rax,%rbx,8), %edx
	shll	$8, %edx
	orl	-8(%rax,%rbx,8), %edx
	movq	%r15, %rdi
	callq	_ks_wrreg16
	movl	(%r14), %eax
	jmp	LBB0_7
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HW_MCAST_SIZE,4,2              ## @HW_MCAST_SIZE
	.comm	_KS_MAHTR0,8,3                  ## @KS_MAHTR0
	.no_dead_strip	_ks_set_grpaddr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks_set_grpaddr
_ks_set_grpaddr:                        ; @ks_set_grpaddr
	.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	x19, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x20, _HW_MCAST_SIZE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _HW_MCAST_SIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	lsl	w2, w8, #3
	mov	w1, #0
	bl	_memset
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x21, #0
	mov	w22, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w1, [x8, x21, lsl #2]
	mov	w0, #6
	bl	_ether_gen_crc
	lsr	w8, w0, #29
	ubfx	w9, w0, #26, #3
	lsl	w9, w22, w9
	ldr	x10, [x19]
	lsl	x8, x8, #3
	ldr	x11, [x10, x8]
	orr	x9, x11, x9
	str	x9, [x10, x8]
	add	x21, x21, #1
	ldr	x8, [x19, #8]
	cmp	x21, x8
	b.lo	LBB0_2
LBB0_3:
	ldr	w8, [x20]
	cbz	w8, LBB0_8
; %bb.4:
	mov	x21, #0
Lloh2:
	adrp	x22, _KS_MAHTR0@GOTPAGE
Lloh3:
	ldr	x22, [x22, _KS_MAHTR0@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, sxtw
	b.hs	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	tbz	w21, #0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x22]
	add	w8, w21, w8
	and	w1, w8, #0xfffffffe
	ldr	x8, [x19]
	add	x8, x8, x21, lsl #3
	ldr	x9, [x8]
	ldur	w8, [x8, #-8]
	orr	w2, w8, w9, lsl #8
	mov	x0, x19
	bl	_ks_wrreg16
	ldr	w8, [x20]
	b	LBB0_5
LBB0_8:
	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 AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_HW_MCAST_SIZE,4,2              ; @HW_MCAST_SIZE
	.comm	_KS_MAHTR0,8,3                  ; @KS_MAHTR0
	.no_dead_strip	_ks_set_grpaddr
.subsections_via_symbols
