	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zd_rf_init_hw                  ## -- Begin function zd_rf_init_hw
	.p2align	4, 0x90
_zd_rf_init_hw:                         ## @zd_rf_init_hw
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_zd_rf_to_chip
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mutex_is_locked
	movl	%eax, %edi
	callq	_ZD_ASSERT
	leal	-128(%r14), %eax
	cmpl	$5, %eax
	ja	LBB0_5
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:
	movq	%rbx, %rdi
	callq	_zd_rf_init_uw2453
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_8
LBB0_2:
	movq	%rbx, %rdi
	callq	_zd_rf_init_al2230
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_8
LBB0_5:
	movq	%r15, %rdi
	callq	_zd_chip_dev
	movl	%eax, %r15d
	movl	%r14d, %edi
	callq	_zd_rf_name
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_dev_err
	movl	$0, (%rbx)
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_6:
	movq	%rbx, %rdi
	callq	_zd_rf_init_rf2959
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_8
LBB0_3:
	movq	%rbx, %rdi
	callq	_zd_rf_init_al7230b
	testl	%eax, %eax
	jne	LBB0_10
LBB0_8:
	movl	%r14d, (%rbx)
	movq	%r15, %rdi
	callq	_zd_chip_lock_phy_regs
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	callq	*8(%rbx)
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_zd_chip_unlock_phy_regs
	testl	%ebx, %ebx
	cmovnel	%ebx, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RF %s %#x is not supported\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zd_rf_init_hw                  ; -- Begin function zd_rf_init_hw
	.p2align	2
_zd_rf_init_hw:                         ; @zd_rf_init_hw
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	bl	_zd_rf_to_chip
	mov	x21, x0
	bl	_mutex_is_locked
	bl	_ZD_ASSERT
	sub	w8, w20, #128
	cmp	w8, #5
	b.hi	LBB0_4
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	x0, x19
	bl	_zd_rf_init_uw2453
	cbnz	w0, LBB0_9
	b	LBB0_7
LBB0_3:
	mov	x0, x19
	bl	_zd_rf_init_al2230
	cbnz	w0, LBB0_9
	b	LBB0_7
LBB0_4:
	mov	x0, x21
	bl	_zd_chip_dev
	mov	x21, x0
	mov	x0, x20
	bl	_zd_rf_name
	mov	x2, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	bl	_dev_err
	str	wzr, [x19]
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	mov	x0, x19
	bl	_zd_rf_init_rf2959
	cbnz	w0, LBB0_9
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_zd_rf_init_al7230b
	cbnz	w0, LBB0_9
LBB0_7:
	str	w20, [x19]
	mov	x0, x21
	bl	_zd_chip_lock_phy_regs
	cbnz	w0, LBB0_9
; %bb.8:
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	mov	x19, x0
	mov	x0, x21
	bl	_zd_chip_unlock_phy_regs
	cmp	w19, #0
	csel	w0, w0, w19, eq
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RF %s %#x is not supported\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
