	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zd_chip_init_hw                ## -- Begin function zd_chip_init_hw
	.p2align	4, 0x90
_zd_chip_init_hw:                       ## @zd_chip_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_zd_chip_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg_f
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_CR_AFTER_PNP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_zd_iowrite32_locked
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movq	%r14, %rdi
	callq	_read_fw_regs_offset
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	movq	_CR_GPI_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_zd_iowrite32_locked
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.3:
	movq	_CWIN_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CR_CWMIN_CWMAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_zd_iowrite32_locked
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.4:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_set_mandatory_rates
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:
	movq	%r14, %rdi
	callq	_disable_hwint
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	leaq	-20(%rbp), %rsi
	movq	%r14, %rdi
	callq	_read_pod
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movq	%r14, %rdi
	callq	_hw_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:
	leaq	4(%r14), %rdi
	movl	-20(%rbp), %esi
	callq	_zd_rf_init_hw
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movq	%r14, %rdi
	callq	_print_fw_version
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:
	movq	%r14, %rdi
	callq	_read_cal_int_tables
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_print_id
	xorl	%ebx, %ebx
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_CR_AFTER_PNP,4,2               ## @CR_AFTER_PNP
	.comm	_CR_GPI_EN,4,2                  ## @CR_GPI_EN
	.comm	_CWIN_SIZE,4,2                  ## @CWIN_SIZE
	.comm	_CR_CWMIN_CWMAX,4,2             ## @CR_CWMIN_CWMAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zd_chip_init_hw                ; -- Begin function zd_chip_init_hw
	.p2align	2
_zd_chip_init_hw:                       ; @zd_chip_init_hw
	.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
	mov	x19, x0
	bl	_zd_chip_dev
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg_f
	mov	x0, x19
	bl	_mutex_lock
Lloh2:
	adrp	x8, _CR_AFTER_PNP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CR_AFTER_PNP@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #1
	bl	_zd_iowrite32_locked
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.1:
	mov	x0, x19
	bl	_read_fw_regs_offset
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.2:
Lloh5:
	adrp	x8, _CR_GPI_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CR_GPI_EN@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_zd_iowrite32_locked
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.3:
Lloh8:
	adrp	x8, _CWIN_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CWIN_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _CR_CWMIN_CWMAX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CR_CWMIN_CWMAX@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_zd_iowrite32_locked
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.4:
	mov	x0, x19
	mov	w1, #1
	bl	_set_mandatory_rates
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.5:
	mov	x0, x19
	bl	_disable_hwint
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.6:
	add	x1, sp, #12
	mov	x0, x19
	bl	_read_pod
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.7:
	mov	x0, x19
	bl	_hw_init
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.8:
	add	x0, x19, #4
	ldr	w1, [sp, #12]
	bl	_zd_rf_init_hw
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.9:
	mov	x0, x19
	bl	_print_fw_version
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_read_cal_int_tables
	mov	x20, x0
	cbnz	w0, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_print_id
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_CR_AFTER_PNP,4,2               ; @CR_AFTER_PNP
	.comm	_CR_GPI_EN,4,2                  ; @CR_GPI_EN
	.comm	_CWIN_SIZE,4,2                  ; @CWIN_SIZE
	.comm	_CR_CWMIN_CWMAX,4,2             ; @CR_CWMIN_CWMAX
.subsections_via_symbols
