	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x0_read_rx_gain            ## -- Begin function mt76x0_read_rx_gain
	.p2align	4, 0x90
_mt76x0_read_rx_gain:                   ## @mt76x0_read_rx_gain
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	16(%rdi), %rbx
	movl	(%rbx), %esi
	leaq	-56(%rbp), %rdx
	leaq	-60(%rbp), %r15
	leaq	-52(%rbp), %r12
	movq	%r15, %rcx
	movq	%r12, %r8
	callq	_mt76x02_get_rx_gain
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	callq	_mt76x02_get_lna_gain
	movl	%eax, 8(%r14)
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	-56(%rbp), %eax
	movl	%r12d, %ecx
	sarl	%cl, %eax
	leal	-11(%rax), %ecx
	cmpl	$-21, %ecx
	cmovbl	%r15d, %eax
	movq	(%r14), %rdi
	movl	%eax, (%rdi,%rbx,4)
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	addl	$8, %r12d
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt76x0_read_rx_gain            ; -- Begin function mt76x0_read_rx_gain
	.p2align	2
_mt76x0_read_rx_gain:                   ; @mt76x0_read_rx_gain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x20, [x0, #16]
	ldr	w1, [x20]
	add	x2, sp, #4
	add	x3, sp, #8
	add	x4, sp, #12
	bl	_mt76x02_get_rx_gain
	add	x1, sp, #8
	add	x2, sp, #12
	mov	x0, x19
	mov	x3, x20
	bl	_mt76x02_get_lna_gain
	str	w0, [x19, #8]
	ldr	x0, [x19]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w20, #0
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp, #4]
	asr	w8, w8, w20
	sub	w9, w8, #11
	cmn	w9, #21
	csel	w8, wzr, w8, lo
	ldr	x0, [x19]
	str	w8, [x0, x21, lsl #2]
	add	x21, x21, #1
	bl	_ARRAY_SIZE
	add	w20, w20, #8
	cmp	x21, w0, sxtw
	b.lt	LBB0_2
LBB0_3:
	ldr	x8, [sp, #24]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
