	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function carl9170_get_heavy_clip
_carl9170_get_heavy_clip:               ## @carl9170_get_heavy_clip
	.cfi_startproc
## %bb.0:
                                        ## kill: def $esi killed $esi def $rsi
	cmpl	$2999, %esi                     ## imm = 0xBB7
	jg	LBB0_2
## %bb.1:
	addl	$-2300, %esi                    ## imm = 0xF704
	jmp	LBB0_3
LBB0_2:
	addl	$-4800, %esi                    ## imm = 0xED40
	movslq	%esi, %rax
	imulq	$1717986919, %rax, %rsi         ## imm = 0x66666667
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$33, %rsi
	addl	%eax, %esi
LBB0_3:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_CARL9170_BW_40_ABOVE@GOTPCREL(%rip), %rdi
	xorl	%eax, %eax
	cmpl	%edx, (%rdi)
	movq	_CARL9170_BW_40_BELOW@GOTPCREL(%rip), %r8
	movl	$240, %edi
	cmovel	%edi, %eax
	cmpl	%edx, (%r8)
	cmovel	%edi, %eax
	movq	_AR5416_NUM_BAND_EDGES@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_9
## %bb.4:
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rdi,8), %edx
	cmpl	$255, %edx
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%edx, %esi
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rdi
	cmpq	%rdi, %r8
	jne	LBB0_5
LBB0_9:
	popq	%rbp
	retq
LBB0_7:
	movq	_AR9170_CALCTL_EDGE_FLAGS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%eax, %esi
	orl	$15, %esi
	testl	%edx, 4(%rcx,%rdi,8)
	cmovel	%esi, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CARL9170_BW_40_BELOW,4,2       ## @CARL9170_BW_40_BELOW
	.comm	_CARL9170_BW_40_ABOVE,4,2       ## @CARL9170_BW_40_ABOVE
	.comm	_AR5416_NUM_BAND_EDGES,4,2      ## @AR5416_NUM_BAND_EDGES
	.comm	_AR9170_CALCTL_EDGE_FLAGS,4,2   ## @AR9170_CALCTL_EDGE_FLAGS
	.no_dead_strip	_carl9170_get_heavy_clip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function carl9170_get_heavy_clip
_carl9170_get_heavy_clip:               ; @carl9170_get_heavy_clip
	.cfi_startproc
; %bb.0:
	mov	w8, #-4800
	add	w8, w1, w8
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w8, w8, w9
	sub	w9, w1, #2300
	cmp	w1, #2999
	csel	w8, w8, w9, gt
Lloh0:
	adrp	x9, _CARL9170_BW_40_BELOW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CARL9170_BW_40_BELOW@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _CARL9170_BW_40_ABOVE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CARL9170_BW_40_ABOVE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w10, w2
	ccmp	w9, w2, #4, ne
	mov	w9, #240
	csel	w0, w9, wzr, eq
Lloh6:
	adrp	x9, _AR5416_NUM_BAND_EDGES@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AR5416_NUM_BAND_EDGES@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.1:
	add	x10, x3, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w11, [x10, #-4]
	cmp	w11, #255
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, w11
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x10, x10, #8
	subs	x9, x9, #1
	b.ne	LBB0_2
LBB0_5:
	ret
LBB0_6:
	ldr	w8, [x10]
Lloh9:
	adrp	x9, _AR9170_CALCTL_EDGE_FLAGS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AR9170_CALCTL_EDGE_FLAGS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w10, w0, #0xf
	tst	w9, w8
	csel	w0, w10, w0, eq
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CARL9170_BW_40_BELOW,4,2       ; @CARL9170_BW_40_BELOW
	.comm	_CARL9170_BW_40_ABOVE,4,2       ; @CARL9170_BW_40_ABOVE
	.comm	_AR5416_NUM_BAND_EDGES,4,2      ; @AR5416_NUM_BAND_EDGES
	.comm	_AR9170_CALCTL_EDGE_FLAGS,4,2   ; @AR9170_CALCTL_EDGE_FLAGS
	.no_dead_strip	_carl9170_get_heavy_clip
.subsections_via_symbols
