	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43legacy_rssi_postprocess
_b43legacy_rssi_postprocess:            ## @b43legacy_rssi_postprocess
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	movl	8(%rdi), %eax
	cmpl	$8288, %eax                     ## imm = 0x2060
	je	LBB0_6
## %bb.1:
	cmpl	$8272, %eax                     ## imm = 0x2050
	jne	LBB0_7
## %bb.2:
	testl	%edx, %edx
	je	LBB0_9
## %bb.3:
	leal	-256(%rsi), %eax
	cmpl	$127, %esi
	cmovlel	%esi, %eax
	leal	(%rax,%rax,8), %ecx
	leal	(%rax,%rcx,8), %edx
	leal	(%rax,%rcx,8), %eax
	addl	$63, %eax
	testl	%edx, %edx
	cmovnsl	%edx, %eax
	sarl	$6, %eax
	testl	%r8d, %r8d
	je	LBB0_12
## %bb.4:
	addl	$25, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_6:
	leal	-256(%rsi), %eax
	cmpl	$127, %esi
	cmovlel	%esi, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_7:
	imull	$103, %esi, %eax
	leal	-1133(%rax), %edx
	addl	$-1070, %eax                    ## imm = 0xFBD2
	testl	%edx, %edx
	cmovnsl	%edx, %eax
	sarl	$6, %eax
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.8:
	addl	$-109, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_9:
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_B43legacy_BFL_RSSI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_13
## %bb.10:
	cmpl	$63, %esi
	movl	$63, %eax
	cmovll	%esi, %eax
	movq	16(%rdi), %rcx
	cltq
	movl	(%rcx,%rax,4), %esi
	movl	$-57, %eax
	movl	$-131, %ecx
	jmp	LBB0_14
LBB0_11:
	addl	$-83, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_12:
	addl	$-3, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_13:
	movl	$-68, %eax
	movl	$-149, %ecx
LBB0_14:
	movl	$31, %edx
	subl	%esi, %edx
	imull	%ecx, %edx
	leal	127(%rdx), %ecx
	testl	%edx, %edx
	cmovnsl	%edx, %ecx
	sarl	$7, %ecx
	movl	24(%rdi), %edx
	movq	_B43legacy_PHYTYPE_G@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	leal	(%rcx,%rax), %edx
	leal	25(%rcx,%rax), %eax
	cmovnel	%edx, %eax
	testl	%r8d, %r8d
	cmovel	%edx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B43legacy_BFL_RSSI,4,2         ## @B43legacy_BFL_RSSI
	.comm	_B43legacy_PHYTYPE_G,4,2        ## @B43legacy_PHYTYPE_G
	.no_dead_strip	_b43legacy_rssi_postprocess
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43legacy_rssi_postprocess
_b43legacy_rssi_postprocess:            ; @b43legacy_rssi_postprocess
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0, #8]
	mov	w9, #8288
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.1:
	mov	w9, #8272
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.2:
	cbz	w2, LBB0_8
; %bb.3:
	sub	w8, w1, #256
	cmp	w1, #127
	csel	w8, w8, w1, gt
	mov	w9, #73
	mul	w8, w8, w9
	add	w9, w8, #63
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #6
	cbz	w4, LBB0_11
; %bb.4:
	add	w0, w8, #25
	ret
LBB0_5:
	sub	w8, w1, #256
	cmp	w1, #127
	csel	w0, w8, w1, gt
	ret
LBB0_6:
	mov	w8, #103
	mul	w8, w1, w8
	sub	w9, w8, #1133
	sub	w8, w8, #1070
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w8, w8, #6
	cbz	w3, LBB0_10
; %bb.7:
	sub	w0, w8, #109
	ret
LBB0_8:
	ldr	x8, [x0]
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _B43legacy_BFL_RSSI@GOTPAGE
Lloh1:
	ldr	x9, [x9, _B43legacy_BFL_RSSI@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.9:
	mov	w8, #63
	cmp	w1, #63
	csel	w8, w1, w8, lt
	ldr	x9, [x0, #16]
	ldr	w1, [x9, w8, sxtw #2]
	mov	w8, #-57
	mov	w9, #-131
	b	LBB0_13
LBB0_10:
	sub	w0, w8, #83
	ret
LBB0_11:
	sub	w0, w8, #3
	ret
LBB0_12:
	mov	w8, #-68
	mov	w9, #-149
LBB0_13:
	mov	w10, #31
	sub	w10, w10, w1
	mul	w9, w10, w9
	add	w10, w9, #127
	cmp	w9, #0
	csel	w9, w10, w9, lt
	add	w8, w8, w9, asr #7
Lloh3:
	adrp	x9, _B43legacy_PHYTYPE_G@GOTPAGE
Lloh4:
	ldr	x9, [x9, _B43legacy_PHYTYPE_G@GOTPAGEOFF]
	ldr	w10, [x0, #24]
Lloh5:
	ldr	w9, [x9]
	cmp	w10, w9
	ccmp	w4, #0, #4, eq
	add	w9, w8, #25
	csel	w0, w9, w8, ne
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_B43legacy_BFL_RSSI,4,2         ; @B43legacy_BFL_RSSI
	.comm	_B43legacy_PHYTYPE_G,4,2        ; @B43legacy_PHYTYPE_G
	.no_dead_strip	_b43legacy_rssi_postprocess
.subsections_via_symbols
