	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function patch_cck_gain
_patch_cck_gain:                        ## @patch_cck_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%ebx, %ebx
	cmpl	$0, 8(%rdi)
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r14
	addq	$4, %rdi
	callq	_zd_rf_should_patch_cck_gain
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movq	%r14, %rdi
	callq	_mutex_is_locked
	movl	%eax, %edi
	callq	_ZD_ASSERT
	movq	_E2P_PHY_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-20(%rbp), %rsi
	movq	%r14, %rdi
	callq	_zd_ioread32_locked
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_zd_chip_dev
	movzbl	-20(%rbp), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg_f
	movzbl	-20(%rbp), %esi
	movq	_ZD_CR47@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_zd_iowrite16_locked
	movl	%eax, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_E2P_PHY_REG,4,2                ## @E2P_PHY_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"patching value %x\n"

	.comm	_ZD_CR47,4,2                    ## @ZD_CR47
	.no_dead_strip	_patch_cck_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function patch_cck_gain
_patch_cck_gain:                        ; @patch_cck_gain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
	add	x0, x0, #4
	bl	_zd_rf_should_patch_cck_gain
	cbz	w0, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_mutex_is_locked
	bl	_ZD_ASSERT
Lloh0:
	adrp	x8, _E2P_PHY_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _E2P_PHY_REG@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x1, sp, #12
	mov	x0, x19
	bl	_zd_ioread32_locked
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_zd_chip_dev
	ldrb	w2, [sp, #12]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg_f
	ldrb	w1, [sp, #12]
Lloh5:
	adrp	x8, _ZD_CR47@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ZD_CR47@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_zd_iowrite16_locked
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_E2P_PHY_REG,4,2                ; @E2P_PHY_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"patching value %x\n"

	.comm	_ZD_CR47,4,2                    ; @ZD_CR47
	.no_dead_strip	_patch_cck_gain
.subsections_via_symbols
