	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sw_get_broad_storm
_sw_get_broad_storm:                    ## @sw_get_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movq	_KS8842_SWITCH_CTRL_3_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	(%rdi), %rax
	movq	%rax, %rdi
	callq	_readw
	movq	_BROADCAST_STORM_RATE_HI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	shll	$8, %ecx
	movq	_BROADCAST_STORM_RATE_LO@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	sarl	$8, %eax
	orl	%ecx, %eax
	imull	$100, %eax, %edi
	movq	_BROADCAST_STORM_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DIV_ROUND_CLOSEST
	cltq
	movq	%rax, (%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KS8842_SWITCH_CTRL_3_OFFSET,8,3 ## @KS8842_SWITCH_CTRL_3_OFFSET
	.comm	_BROADCAST_STORM_RATE_HI,4,2    ## @BROADCAST_STORM_RATE_HI
	.comm	_BROADCAST_STORM_RATE_LO,4,2    ## @BROADCAST_STORM_RATE_LO
	.comm	_BROADCAST_STORM_VALUE,4,2      ## @BROADCAST_STORM_VALUE
	.no_dead_strip	_sw_get_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_get_broad_storm
_sw_get_broad_storm:                    ; @sw_get_broad_storm
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _KS8842_SWITCH_CTRL_3_OFFSET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _KS8842_SWITCH_CTRL_3_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readw
Lloh3:
	adrp	x8, _BROADCAST_STORM_RATE_HI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BROADCAST_STORM_RATE_HI@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh6:
	adrp	x9, _BROADCAST_STORM_RATE_LO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BROADCAST_STORM_RATE_LO@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w9, w9, w0
	asr	w9, w9, #8
	orr	w8, w9, w8, lsl #8
	mov	w9, #100
	mul	w0, w8, w9
Lloh9:
	adrp	x8, _BROADCAST_STORM_VALUE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BROADCAST_STORM_VALUE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_DIV_ROUND_CLOSEST
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	str	x8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_KS8842_SWITCH_CTRL_3_OFFSET,8,3 ; @KS8842_SWITCH_CTRL_3_OFFSET
	.comm	_BROADCAST_STORM_RATE_HI,4,2    ; @BROADCAST_STORM_RATE_HI
	.comm	_BROADCAST_STORM_RATE_LO,4,2    ; @BROADCAST_STORM_RATE_LO
	.comm	_BROADCAST_STORM_VALUE,4,2      ; @BROADCAST_STORM_VALUE
	.no_dead_strip	_sw_get_broad_storm
.subsections_via_symbols
