	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sw_cfg_broad_storm
_sw_cfg_broad_storm:                    ## @sw_cfg_broad_storm
	.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	%rdi, %r14
	movq	_BROADCAST_STORM_VALUE@GOTPCREL(%rip), %rax
	imull	(%rax), %esi
	movslq	%esi, %rax
	imulq	$1374389535, %rax, %rbx         ## imm = 0x51EB851F
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$37, %rbx
	addl	%eax, %ebx
	movq	_BROADCAST_STORM_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	cmovgel	%eax, %ebx
	movq	_KS8842_SWITCH_CTRL_3_OFFSET@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	(%r14), %rdi
	callq	_readw
	movq	_BROADCAST_STORM_RATE_LO@GOTPCREL(%rip), %rcx
	movq	_BROADCAST_STORM_RATE_HI@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	rolw	$8, %bx
	movzwl	%bx, %edi
	orl	%edx, %edi
	movq	(%r15), %rsi
	addq	(%r14), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writew                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BROADCAST_STORM_VALUE,8,3      ## @BROADCAST_STORM_VALUE
	.comm	_BROADCAST_STORM_RATE,4,2       ## @BROADCAST_STORM_RATE
	.comm	_KS8842_SWITCH_CTRL_3_OFFSET,8,3 ## @KS8842_SWITCH_CTRL_3_OFFSET
	.comm	_BROADCAST_STORM_RATE_LO,4,2    ## @BROADCAST_STORM_RATE_LO
	.comm	_BROADCAST_STORM_RATE_HI,4,2    ## @BROADCAST_STORM_RATE_HI
	.no_dead_strip	_sw_cfg_broad_storm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sw_cfg_broad_storm
_sw_cfg_broad_storm:                    ; @sw_cfg_broad_storm
	.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
Lloh0:
	adrp	x8, _BROADCAST_STORM_VALUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BROADCAST_STORM_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mul	w8, w8, w1
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #37
Lloh3:
	adrp	x10, _BROADCAST_STORM_RATE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _BROADCAST_STORM_RATE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	add	w8, w8, w9
	cmp	w8, w10
	csel	w20, w8, w10, lt
	ldr	x8, [x0]
Lloh6:
	adrp	x21, _KS8842_SWITCH_CTRL_3_OFFSET@GOTPAGE
Lloh7:
	ldr	x21, [x21, _KS8842_SWITCH_CTRL_3_OFFSET@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readw
Lloh8:
	adrp	x8, _BROADCAST_STORM_RATE_LO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BROADCAST_STORM_RATE_LO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _BROADCAST_STORM_RATE_HI@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BROADCAST_STORM_RATE_HI@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w8, w0, w8
	rev	w9, w20
	orr	w0, w8, w9, lsr #16
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x1, x9, x8
	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
	b	_writew
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BROADCAST_STORM_VALUE,8,3      ; @BROADCAST_STORM_VALUE
	.comm	_BROADCAST_STORM_RATE,4,2       ; @BROADCAST_STORM_RATE
	.comm	_KS8842_SWITCH_CTRL_3_OFFSET,8,3 ; @KS8842_SWITCH_CTRL_3_OFFSET
	.comm	_BROADCAST_STORM_RATE_LO,4,2    ; @BROADCAST_STORM_RATE_LO
	.comm	_BROADCAST_STORM_RATE_HI,4,2    ; @BROADCAST_STORM_RATE_HI
	.no_dead_strip	_sw_cfg_broad_storm
.subsections_via_symbols
