	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il4965_calc_rssi
_il4965_calc_rssi:                      ## @il4965_calc_rssi
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	8(%rsi), %r14
	movl	8(%r14), %edi
	callq	_le16_to_cpu
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_IL49_AGC_DB_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_IL49_AGC_DB_POS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	(%rbx), %edi
	callq	_le16_to_cpu
	movl	%eax, %ebx
	movq	_IL49_RX_PHY_FLAGS_ANTENNAE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_IL49_RX_PHY_FLAGS_ANTENNAE_OFFSET@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	xorl	%r13d, %r13d
	testb	$1, %bl
	jne	LBB0_1
## %bb.2:
	testb	$2, %bl
	jne	LBB0_3
LBB0_4:
	testb	$4, %bl
	je	LBB0_6
LBB0_5:
	movq	(%r14), %rax
	movl	16(%rax), %edi
	movl	%r13d, %esi
	callq	_max
	movl	%eax, %r13d
LBB0_6:
	andl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	movl	%r15d, %ecx
	sarl	%cl, %r12d
	movq	(%r14), %rax
	movl	(%rax), %esi
	movl	8(%rax), %edx
	movl	16(%rax), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %r8d
	movl	%r12d, %r9d
	callq	_D_STATS
	movq	_IL4965_RSSI_OFFSET@GOTPCREL(%rip), %rax
	addl	(%rax), %r12d
	subl	%r12d, %r13d
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	(%r14), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_max
	movl	%eax, %r13d
	testb	$2, %bl
	je	LBB0_4
LBB0_3:
	movq	(%r14), %rax
	movl	8(%rax), %edi
	movl	%r13d, %esi
	callq	_max
	movl	%eax, %r13d
	testb	$4, %bl
	jne	LBB0_5
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_IL49_AGC_DB_MASK,4,2           ## @IL49_AGC_DB_MASK
	.comm	_IL49_AGC_DB_POS,4,2            ## @IL49_AGC_DB_POS
	.comm	_IL49_RX_PHY_FLAGS_ANTENNAE_MASK,4,2 ## @IL49_RX_PHY_FLAGS_ANTENNAE_MASK
	.comm	_IL49_RX_PHY_FLAGS_ANTENNAE_OFFSET,4,2 ## @IL49_RX_PHY_FLAGS_ANTENNAE_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Rssi In A %d B %d C %d Max %d AGC dB %d\n"

	.comm	_IL4965_RSSI_OFFSET,4,2         ## @IL4965_RSSI_OFFSET
	.no_dead_strip	_il4965_calc_rssi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il4965_calc_rssi
_il4965_calc_rssi:                      ; @il4965_calc_rssi
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	ldr	x21, [x1, #8]
	ldr	w0, [x21, #8]
	bl	_le16_to_cpu
	mov	x19, x0
Lloh0:
	adrp	x8, _IL49_AGC_DB_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IL49_AGC_DB_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _IL49_AGC_DB_POS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IL49_AGC_DB_POS@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	ldr	w0, [x20]
	bl	_le16_to_cpu
Lloh6:
	adrp	x8, _IL49_RX_PHY_FLAGS_ANTENNAE_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IL49_RX_PHY_FLAGS_ANTENNAE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh9:
	adrp	x9, _IL49_RX_PHY_FLAGS_ANTENNAE_OFFSET@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IL49_RX_PHY_FLAGS_ANTENNAE_OFFSET@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	asr	w24, w8, w9
	tbnz	w24, #0, LBB0_2
; %bb.1:
	mov	w20, #0
	tbnz	w24, #1, LBB0_3
	b	LBB0_4
LBB0_2:
	ldr	x8, [x21]
	ldr	w0, [x8]
	mov	w1, #0
	bl	_max
	mov	x20, x0
	tbz	w24, #1, LBB0_4
LBB0_3:
	ldr	x8, [x21]
	ldr	w0, [x8, #8]
	mov	x1, x20
	bl	_max
	mov	x20, x0
LBB0_4:
	tbz	w24, #2, LBB0_6
; %bb.5:
	ldr	x8, [x21]
	ldr	w0, [x8, #16]
	mov	x1, x20
	bl	_max
	mov	x20, x0
LBB0_6:
	and	w8, w22, w19
	asr	w19, w8, w23
	ldr	x8, [x21]
	ldr	w1, [x8]
	ldr	w2, [x8, #8]
	ldr	w3, [x8, #16]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x4, x20
	mov	x5, x19
	bl	_D_STATS
Lloh14:
	adrp	x8, _IL4965_RSSI_OFFSET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IL4965_RSSI_OFFSET@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	add	w8, w19, w8
	sub	w0, w20, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 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
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_IL49_AGC_DB_MASK,4,2           ; @IL49_AGC_DB_MASK
	.comm	_IL49_AGC_DB_POS,4,2            ; @IL49_AGC_DB_POS
	.comm	_IL49_RX_PHY_FLAGS_ANTENNAE_MASK,4,2 ; @IL49_RX_PHY_FLAGS_ANTENNAE_MASK
	.comm	_IL49_RX_PHY_FLAGS_ANTENNAE_OFFSET,4,2 ; @IL49_RX_PHY_FLAGS_ANTENNAE_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Rssi In A %d B %d C %d Max %d AGC dB %d\n"

	.comm	_IL4965_RSSI_OFFSET,4,2         ; @IL4965_RSSI_OFFSET
	.no_dead_strip	_il4965_calc_rssi
.subsections_via_symbols
