	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cw1200_load_firmware           ## -- Begin function cw1200_load_firmware
	.p2align	4, 0x90
_cw1200_load_firmware:                  ## @cw1200_load_firmware
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$-1, -52(%rbp)
	movq	_ST90TDS_CONFIG_REG_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_cw1200_reg_read_32
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	-44(%rbp), %eax
	leal	1(%rax), %ecx
	cmpl	$1, %ecx
	ja	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_65
LBB0_5:
	leaq	-52(%rbp), %rsi
	movl	%eax, %edi
	callq	_cw1200_get_hw_type
	movl	%eax, 16(%r14)
	testl	%eax, %eax
	js	LBB0_6
## %bb.9:
	movq	_ST90TDS_TSET_GEN_R_W_REG_ID@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movl	32(%r14), %edi
	callq	_cw1200_dpll_from_clk
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_cw1200_reg_write_32
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	movl	$20, %edi
	callq	_msleep
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_cw1200_reg_read_32
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:
	movl	-44(%rbp), %ebx
	movl	32(%r14), %edi
	callq	_cw1200_dpll_from_clk
	cmpl	%eax, %ebx
	jne	LBB0_14
## %bb.15:
	movq	_ST90TDS_CONTROL_REG_ID@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_cw1200_reg_read_16
	testl	%eax, %eax
	js	LBB0_16
## %bb.17:
	movl	(%r13), %esi
	movq	_ST90TDS_CONT_WUP_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	-48(%rbp), %edx
	movq	%r14, %rdi
	callq	_cw1200_reg_write_16
	testl	%eax, %eax
	js	LBB0_41
## %bb.18:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r12
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_cw1200_reg_read_16
	testl	%eax, %eax
	js	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	-48(%rbp), %eax
	movq	_ST90TDS_CONT_RDY_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	jne	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	%ebx, %edi
	callq	_msleep
	movl	%ebx, %eax
	shrl	$31, %eax
	addl	%ebx, %eax
	sarl	%eax
	addl	%eax, %ebx
	incl	%ebx
	cmpl	$300, %ebx                      ## imm = 0x12C
	jl	LBB0_19
## %bb.23:
	movl	-48(%rbp), %eax
	movq	_ST90TDS_CONT_RDY_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_24:
	testl	%eax, %ecx
	je	LBB0_25
## %bb.26:
	movl	-52(%rbp), %esi
	cmpl	$4, %esi
	je	LBB0_45
## %bb.27:
	cmpl	$2, %esi
	je	LBB0_31
## %bb.28:
	cmpl	$1, %esi
	jne	LBB0_46
## %bb.29:
	movq	_CW1200_CUT_ID_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_cw1200_ahb_read_32
	testl	%eax, %eax
	je	LBB0_48
## %bb.30:
	movl	%eax, %r15d
	leaq	L_.str.10(%rip), %rdi
	jmp	LBB0_42
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
LBB0_7:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_pr_err
LBB0_8:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_65
LBB0_10:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_42
LBB0_12:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_42
LBB0_14:
	movl	32(%r14), %edi
	callq	_cw1200_dpll_from_clk
	movl	-44(%rbp), %edx
	leaq	L_.str.5(%rip), %rdi
	xorl	%r15d, %r15d
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_4
LBB0_16:
	movl	%eax, %r15d
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_42
LBB0_41:
	movl	%eax, %r15d
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_42
LBB0_20:
	movl	%eax, %r15d
	leaq	L_.str.8(%rip), %rdi
	jmp	LBB0_42
LBB0_25:
	leaq	L_.str.9(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_pr_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_65
LBB0_45:
	leaq	L_.str.18(%rip), %rdi
	callq	_pr_info
	movq	_CW1X60_HW_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r14)
	jmp	LBB0_49
LBB0_31:
	movq	_CW1200_CUT2_ID_ADDR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-64(%rbp), %rdx
	movq	%r14, %rdi
	callq	_cw1200_ahb_read_32
	testl	%eax, %eax
	je	LBB0_33
## %bb.32:
	movl	%eax, %r15d
	leaq	L_.str.13(%rip), %rdi
	jmp	LBB0_42
LBB0_46:
	leaq	L_.str.19(%rip), %rdi
	jmp	LBB0_47
LBB0_48:
	cmpl	$129, -44(%rbp)
	leaq	L_.str.11(%rip), %rax
	leaq	L_.str.12(%rip), %rdi
	cmoveq	%rax, %rdi
	movq	_CW1200_HW_REV_CUT10@GOTPCREL(%rip), %rbx
	cmoveq	_CW1200_HW_REV_CUT11@GOTPCREL(%rip), %rbx
	callq	_pr_info
	movl	(%rbx), %eax
	movl	%eax, 20(%r14)
	movq	$0, 24(%r14)
LBB0_49:
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_config_reg_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.50:
	movq	_ST90TDS_CONFIG_ACCESS_MODE_BIT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_51
## %bb.52:
	movl	16(%r14), %esi
	cmpl	$128, %esi
	jne	LBB0_55
## %bb.53:
	movl	20(%r14), %eax
	movq	_CW1X60_HW_REV@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_57
## %bb.54:
	leaq	L_.str.21(%rip), %rdi
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
LBB0_42:
	xorl	%eax, %eax
	callq	_pr_err
LBB0_65:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_33:
	movl	(%rbx), %esi
	addl	$4, %esi
	leaq	-60(%rbp), %rdx
	movq	%r14, %rdi
	callq	_cw1200_ahb_read_32
	testl	%eax, %eax
	je	LBB0_35
## %bb.34:
	movl	%eax, %r15d
	leaq	L_.str.14(%rip), %rdi
	jmp	LBB0_42
LBB0_51:
	leaq	L_.str.20(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_65
LBB0_55:
	leaq	L_.str.22(%rip), %rdi
LBB0_47:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_8
LBB0_35:
	movl	(%rbx), %esi
	addl	$8, %esi
	leaq	-56(%rbp), %rdx
	movq	%r14, %rdi
	callq	_cw1200_ahb_read_32
	testl	%eax, %eax
	je	LBB0_37
## %bb.36:
	movl	%eax, %r15d
	leaq	L_.str.15(%rip), %rdi
	jmp	LBB0_42
LBB0_57:
	movq	%r14, %rdi
	callq	_cw1200_load_firmware_cw1200
	testl	%eax, %eax
	js	LBB0_56
## %bb.58:
	movq	8(%r14), %rax
	movl	(%r14), %edi
	callq	*8(%rax)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	___cw1200_irq_enable
	movl	%eax, %r15d
	movq	8(%r14), %rax
	movl	(%r14), %edi
	callq	*(%rax)
	testl	%r15d, %r15d
	js	LBB0_64
## %bb.59:
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_config_reg_read
	testl	%eax, %eax
	js	LBB0_60
## %bb.61:
	movl	(%rbx), %esi
	notl	%esi
	andl	-44(%rbp), %esi
	movq	%r14, %rdi
	callq	_config_reg_write
	testl	%eax, %eax
	js	LBB0_62
## %bb.66:
	movl	%eax, %r15d
	movl	$10, %edi
	callq	_mdelay
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_config_reg_read
	jmp	LBB0_65
LBB0_37:
	movl	-64(%rbp), %eax
	movq	_CW1200_CUT_22_ID_STR1@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_43
## %bb.38:
	movl	-60(%rbp), %eax
	movq	_CW1200_CUT_22_ID_STR2@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_43
## %bb.39:
	movl	-56(%rbp), %eax
	movq	_CW1200_CUT_22_ID_STR3@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_43
## %bb.40:
	movq	_CW1200_HW_REV_CUT22@GOTPCREL(%rip), %rbx
	leaq	L_.str.16(%rip), %rdi
	jmp	LBB0_44
LBB0_56:
	movl	%eax, %r15d
	leaq	L_.str.23(%rip), %rdi
	jmp	LBB0_42
LBB0_43:
	movq	_CW1200_HW_REV_CUT20@GOTPCREL(%rip), %rbx
	leaq	L_.str.17(%rip), %rdi
LBB0_44:
	callq	_pr_info
	movl	(%rbx), %eax
	movl	%eax, 20(%r14)
	jmp	LBB0_49
LBB0_60:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_63
LBB0_62:
	leaq	L_.str.24(%rip), %rdi
LBB0_63:
	xorl	%eax, %eax
	callq	_pr_err
LBB0_64:
	movq	8(%r14), %rax
	movl	(%r14), %edi
	callq	*8(%rax)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	___cw1200_irq_enable
	movl	%eax, %r15d
	movq	8(%r14), %rax
	movl	(%r14), %edi
	callq	*(%rax)
	jmp	LBB0_65
	.cfi_endproc
                                        ## -- End function
	.comm	_ST90TDS_CONFIG_REG_ID,4,2      ## @ST90TDS_CONFIG_REG_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't read config register.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Bad config register value (0x%08x)\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"Can't deduce hardware type.\n"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_ST90TDS_TSET_GEN_R_W_REG_ID,4,2 ## @ST90TDS_TSET_GEN_R_W_REG_ID
L_.str.3:                               ## @.str.3
	.asciz	"Can't write DPLL register.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Can't read DPLL register.\n"

L_.str.5:                               ## @.str.5
	.asciz	"Unable to initialise DPLL register. Wrote 0x%.8X, Read 0x%.8X.\n"

	.comm	_ST90TDS_CONTROL_REG_ID,4,2     ## @ST90TDS_CONTROL_REG_ID
L_.str.6:                               ## @.str.6
	.asciz	"set_wakeup: can't read control register.\n"

	.comm	_ST90TDS_CONT_WUP_BIT,4,2       ## @ST90TDS_CONT_WUP_BIT
L_.str.7:                               ## @.str.7
	.asciz	"set_wakeup: can't write control register.\n"

L_.str.8:                               ## @.str.8
	.asciz	"wait_for_wakeup: can't read control register.\n"

	.comm	_ST90TDS_CONT_RDY_BIT,4,2       ## @ST90TDS_CONT_RDY_BIT
L_.str.9:                               ## @.str.9
	.asciz	"wait_for_wakeup: device is not responding.\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_CW1200_CUT_ID_ADDR,4,2         ## @CW1200_CUT_ID_ADDR
L_.str.10:                              ## @.str.10
	.asciz	"HW detection: can't read CUT ID.\n"

L_.str.11:                              ## @.str.11
	.asciz	"CW1x00 Cut 1.1 silicon detected.\n"

	.comm	_CW1200_HW_REV_CUT11,4,2        ## @CW1200_HW_REV_CUT11
L_.str.12:                              ## @.str.12
	.asciz	"CW1x00 Cut 1.0 silicon detected.\n"

	.comm	_CW1200_HW_REV_CUT10,4,2        ## @CW1200_HW_REV_CUT10
	.comm	_CW1200_CUT2_ID_ADDR,4,2        ## @CW1200_CUT2_ID_ADDR
L_.str.13:                              ## @.str.13
	.asciz	"(1) HW detection: can't read CUT ID\n"

L_.str.14:                              ## @.str.14
	.asciz	"(2) HW detection: can't read CUT ID.\n"

L_.str.15:                              ## @.str.15
	.asciz	"(3) HW detection: can't read CUT ID.\n"

	.comm	_CW1200_CUT_22_ID_STR1,4,2      ## @CW1200_CUT_22_ID_STR1
	.comm	_CW1200_CUT_22_ID_STR2,4,2      ## @CW1200_CUT_22_ID_STR2
	.comm	_CW1200_CUT_22_ID_STR3,4,2      ## @CW1200_CUT_22_ID_STR3
L_.str.16:                              ## @.str.16
	.asciz	"CW1x00 Cut 2.2 silicon detected.\n"

	.comm	_CW1200_HW_REV_CUT22,4,2        ## @CW1200_HW_REV_CUT22
L_.str.17:                              ## @.str.17
	.asciz	"CW1x00 Cut 2.0 silicon detected.\n"

	.comm	_CW1200_HW_REV_CUT20,4,2        ## @CW1200_HW_REV_CUT20
L_.str.18:                              ## @.str.18
	.asciz	"CW1x60 silicon detected.\n"

	.comm	_CW1X60_HW_REV,4,2              ## @CW1X60_HW_REV
L_.str.19:                              ## @.str.19
	.asciz	"Unsupported silicon major revision %d.\n"

	.comm	_ST90TDS_CONFIG_ACCESS_MODE_BIT,4,2 ## @ST90TDS_CONFIG_ACCESS_MODE_BIT
L_.str.20:                              ## @.str.20
	.asciz	"Device is already in QUEUE mode!\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.21:                              ## @.str.21
	.asciz	"Can't handle CW1160/1260 firmware load yet.\n"

L_.str.22:                              ## @.str.22
	.asciz	"Can't perform firmware load for hw type %d.\n"

L_.str.23:                              ## @.str.23
	.asciz	"Firmware load error.\n"

L_.str.24:                              ## @.str.24
	.asciz	"Can't write config register.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cw1200_load_firmware           ; -- Begin function cw1200_load_firmware
	.p2align	2
_cw1200_load_firmware:                  ; @cw1200_load_firmware
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	mov	w8, #-1
	str	w8, [sp, #36]
Lloh0:
	adrp	x8, _ST90TDS_CONFIG_REG_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ST90TDS_CONFIG_REG_ID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #44
	bl	_cw1200_reg_read_32
	tbnz	w0, #31, LBB0_41
; %bb.1:
	ldr	w0, [sp, #44]
	add	w8, w0, #1
	cmp	w8, #1
	b.hi	LBB0_4
; %bb.2:
	str	x0, [sp]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_3:
	bl	_pr_err
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_23
LBB0_4:
	add	x1, sp, #36
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_cw1200_get_hw_type
	str	w0, [x19, #16]
	tbnz	w0, #31, LBB0_21
; %bb.5:
Lloh7:
	adrp	x21, _ST90TDS_TSET_GEN_R_W_REG_ID@GOTPAGE
Lloh8:
	ldr	x21, [x21, _ST90TDS_TSET_GEN_R_W_REG_ID@GOTPAGEOFF]
	ldr	w20, [x21]
	ldr	w0, [x19, #32]
	bl	_cw1200_dpll_from_clk
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_cw1200_reg_write_32
	tbnz	w0, #31, LBB0_24
; %bb.6:
	mov	w0, #20
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #44
	mov	x0, x19
	bl	_cw1200_reg_read_32
	tbnz	w0, #31, LBB0_25
; %bb.7:
	ldr	w20, [sp, #44]
	ldr	w0, [x19, #32]
	bl	_cw1200_dpll_from_clk
	cmp	w20, w0
	b.ne	LBB0_26
; %bb.8:
Lloh9:
	adrp	x22, _ST90TDS_CONTROL_REG_ID@GOTPAGE
Lloh10:
	ldr	x22, [x22, _ST90TDS_CONTROL_REG_ID@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #40
	mov	x0, x19
	bl	_cw1200_reg_read_16
	tbnz	w0, #31, LBB0_27
; %bb.9:
	ldr	w1, [x22]
	ldr	w8, [sp, #40]
Lloh11:
	adrp	x9, _ST90TDS_CONT_WUP_BIT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ST90TDS_CONT_WUP_BIT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_cw1200_reg_write_16
	tbnz	w0, #31, LBB0_28
; %bb.10:
	mov	w21, #0
Lloh14:
	adrp	x23, _ST90TDS_CONT_RDY_BIT@GOTPAGE
Lloh15:
	ldr	x23, [x23, _ST90TDS_CONT_RDY_BIT@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	add	x2, sp, #40
	mov	x0, x19
	bl	_cw1200_reg_read_16
	tbnz	w0, #31, LBB0_29
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [sp, #40]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x21
	bl	_msleep
	cmp	w21, #0
	cinc	w8, w21, lt
	add	w8, w21, w8, asr #1
	add	w21, w8, #1
	cmp	w21, #300
	b.lt	LBB0_11
; %bb.14:
	ldr	w8, [sp, #40]
	ldr	w9, [x23]
LBB0_15:
	tst	w9, w8
	b.eq	LBB0_30
; %bb.16:
	ldr	w8, [sp, #36]
	cmp	w8, #4
	b.eq	LBB0_31
; %bb.17:
	cmp	w8, #2
	b.eq	LBB0_32
; %bb.18:
	cmp	w8, #1
	b.ne	LBB0_34
; %bb.19:
Lloh16:
	adrp	x8, _CW1200_CUT_ID_ADDR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CW1200_CUT_ID_ADDR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x2, sp, #44
	mov	x0, x19
	bl	_cw1200_ahb_read_32
	cbz	w0, LBB0_35
; %bb.20:
	mov	x20, x0
Lloh19:
	adrp	x0, l_.str.10@PAGE
Lloh20:
	add	x0, x0, l_.str.10@PAGEOFF
	b	LBB0_42
LBB0_21:
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_22:
	bl	_pr_err
Lloh23:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
LBB0_23:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_43
LBB0_24:
	mov	x20, x0
Lloh25:
	adrp	x0, l_.str.3@PAGE
Lloh26:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_42
LBB0_25:
	mov	x20, x0
Lloh27:
	adrp	x0, l_.str.4@PAGE
Lloh28:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_42
LBB0_26:
	ldr	w0, [x19, #32]
	bl	_cw1200_dpll_from_clk
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [sp, #44]
	stp	x0, x8, [sp]
Lloh29:
	adrp	x0, l_.str.5@PAGE
Lloh30:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_3
LBB0_27:
	mov	x20, x0
Lloh31:
	adrp	x0, l_.str.6@PAGE
Lloh32:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_42
LBB0_28:
	mov	x20, x0
Lloh33:
	adrp	x0, l_.str.7@PAGE
Lloh34:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_42
LBB0_29:
	mov	x20, x0
Lloh35:
	adrp	x0, l_.str.8@PAGE
Lloh36:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_42
LBB0_30:
Lloh37:
	adrp	x0, l_.str.9@PAGE
Lloh38:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_pr_err
Lloh39:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_23
LBB0_31:
Lloh41:
	adrp	x0, l_.str.18@PAGE
Lloh42:
	add	x0, x0, l_.str.18@PAGEOFF
	bl	_pr_info
Lloh43:
	adrp	x8, _CW1X60_HW_REV@GOTPAGE
Lloh44:
	ldr	x8, [x8, _CW1X60_HW_REV@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	b	LBB0_36
LBB0_32:
Lloh46:
	adrp	x21, _CW1200_CUT2_ID_ADDR@GOTPAGE
Lloh47:
	ldr	x21, [x21, _CW1200_CUT2_ID_ADDR@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #32
	mov	x0, x19
	bl	_cw1200_ahb_read_32
	cbz	w0, LBB0_44
; %bb.33:
	mov	x20, x0
Lloh48:
	adrp	x0, l_.str.13@PAGE
Lloh49:
	add	x0, x0, l_.str.13@PAGEOFF
	b	LBB0_42
LBB0_34:
	str	x8, [sp]
Lloh50:
	adrp	x0, l_.str.19@PAGE
Lloh51:
	add	x0, x0, l_.str.19@PAGEOFF
	b	LBB0_22
LBB0_35:
	ldr	w8, [sp, #44]
Lloh52:
	adrp	x9, l_.str.12@PAGE
Lloh53:
	add	x9, x9, l_.str.12@PAGEOFF
Lloh54:
	adrp	x10, l_.str.11@PAGE
Lloh55:
	add	x10, x10, l_.str.11@PAGEOFF
	cmp	w8, #129
	csel	x0, x10, x9, eq
Lloh56:
	adrp	x8, _CW1200_HW_REV_CUT11@GOTPAGE
Lloh57:
	ldr	x8, [x8, _CW1200_HW_REV_CUT11@GOTPAGEOFF]
Lloh58:
	adrp	x9, _CW1200_HW_REV_CUT10@GOTPAGE
Lloh59:
	ldr	x9, [x9, _CW1200_HW_REV_CUT10@GOTPAGEOFF]
	csel	x20, x8, x9, eq
	bl	_pr_info
	ldr	w8, [x20]
	str	xzr, [x19, #24]
LBB0_36:
	str	w8, [x19, #20]
	add	x1, sp, #44
	mov	x0, x19
	bl	_config_reg_read
	tbnz	w0, #31, LBB0_41
; %bb.37:
	ldr	w8, [sp, #44]
Lloh60:
	adrp	x21, _ST90TDS_CONFIG_ACCESS_MODE_BIT@GOTPAGE
Lloh61:
	ldr	x21, [x21, _ST90TDS_CONFIG_ACCESS_MODE_BIT@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_46
; %bb.38:
	ldr	w8, [x19, #16]
	cmp	w8, #128
	b.ne	LBB0_47
; %bb.39:
	ldr	w8, [x19, #20]
Lloh62:
	adrp	x9, _CW1X60_HW_REV@GOTPAGE
Lloh63:
	ldr	x9, [x9, _CW1X60_HW_REV@GOTPAGEOFF]
Lloh64:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_50
; %bb.40:
Lloh65:
	adrp	x0, l_.str.21@PAGE
Lloh66:
	add	x0, x0, l_.str.21@PAGEOFF
	b	LBB0_22
LBB0_41:
	mov	x20, x0
Lloh67:
	adrp	x0, l_.str@PAGE
Lloh68:
	add	x0, x0, l_.str@PAGEOFF
LBB0_42:
	bl	_pr_err
LBB0_43:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_44:
	ldr	w8, [x21]
	add	w1, w8, #4
	add	x2, sp, #28
	mov	x0, x19
	bl	_cw1200_ahb_read_32
	cbz	w0, LBB0_48
; %bb.45:
	mov	x20, x0
Lloh69:
	adrp	x0, l_.str.14@PAGE
Lloh70:
	add	x0, x0, l_.str.14@PAGEOFF
	b	LBB0_42
LBB0_46:
Lloh71:
	adrp	x0, l_.str.20@PAGE
Lloh72:
	add	x0, x0, l_.str.20@PAGEOFF
	bl	_pr_err
Lloh73:
	adrp	x8, _EINVAL@GOTPAGE
Lloh74:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_23
LBB0_47:
	str	x8, [sp]
Lloh75:
	adrp	x0, l_.str.22@PAGE
Lloh76:
	add	x0, x0, l_.str.22@PAGEOFF
	b	LBB0_22
LBB0_48:
	ldr	w8, [x21]
	add	w1, w8, #8
	add	x2, sp, #24
	mov	x0, x19
	bl	_cw1200_ahb_read_32
	cbz	w0, LBB0_55
; %bb.49:
	mov	x20, x0
Lloh77:
	adrp	x0, l_.str.15@PAGE
Lloh78:
	add	x0, x0, l_.str.15@PAGEOFF
	b	LBB0_42
LBB0_50:
	mov	x0, x19
	bl	_cw1200_load_firmware_cw1200
	tbnz	w0, #31, LBB0_59
; %bb.51:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	ldr	w0, [x19]
	blr	x8
	mov	x0, x19
	mov	w1, #1
	bl	___cw1200_irq_enable
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x19]
	blr	x8
	tbnz	w20, #31, LBB0_65
; %bb.52:
	add	x1, sp, #44
	mov	x0, x19
	bl	_config_reg_read
	tbnz	w0, #31, LBB0_62
; %bb.53:
	ldr	w8, [sp, #44]
	ldr	w9, [x21]
	bic	w1, w8, w9
	mov	x0, x19
	bl	_config_reg_write
	tbnz	w0, #31, LBB0_63
; %bb.54:
	mov	x20, x0
	mov	w0, #10
	bl	_mdelay
	add	x1, sp, #44
	mov	x0, x19
	bl	_config_reg_read
	b	LBB0_43
LBB0_55:
	ldr	w8, [sp, #32]
Lloh79:
	adrp	x9, _CW1200_CUT_22_ID_STR1@GOTPAGE
Lloh80:
	ldr	x9, [x9, _CW1200_CUT_22_ID_STR1@GOTPAGEOFF]
Lloh81:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_60
; %bb.56:
	ldr	w8, [sp, #28]
Lloh82:
	adrp	x9, _CW1200_CUT_22_ID_STR2@GOTPAGE
Lloh83:
	ldr	x9, [x9, _CW1200_CUT_22_ID_STR2@GOTPAGEOFF]
Lloh84:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_60
; %bb.57:
	ldr	w8, [sp, #24]
Lloh85:
	adrp	x9, _CW1200_CUT_22_ID_STR3@GOTPAGE
Lloh86:
	ldr	x9, [x9, _CW1200_CUT_22_ID_STR3@GOTPAGEOFF]
Lloh87:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_60
; %bb.58:
Lloh88:
	adrp	x20, _CW1200_HW_REV_CUT22@GOTPAGE
Lloh89:
	ldr	x20, [x20, _CW1200_HW_REV_CUT22@GOTPAGEOFF]
Lloh90:
	adrp	x0, l_.str.16@PAGE
Lloh91:
	add	x0, x0, l_.str.16@PAGEOFF
	b	LBB0_61
LBB0_59:
	mov	x20, x0
Lloh92:
	adrp	x0, l_.str.23@PAGE
Lloh93:
	add	x0, x0, l_.str.23@PAGEOFF
	b	LBB0_42
LBB0_60:
Lloh94:
	adrp	x20, _CW1200_HW_REV_CUT20@GOTPAGE
Lloh95:
	ldr	x20, [x20, _CW1200_HW_REV_CUT20@GOTPAGEOFF]
Lloh96:
	adrp	x0, l_.str.17@PAGE
Lloh97:
	add	x0, x0, l_.str.17@PAGEOFF
LBB0_61:
	bl	_pr_info
	ldr	w8, [x20]
	b	LBB0_36
LBB0_62:
Lloh98:
	adrp	x0, l_.str@PAGE
Lloh99:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_64
LBB0_63:
Lloh100:
	adrp	x0, l_.str.24@PAGE
Lloh101:
	add	x0, x0, l_.str.24@PAGEOFF
LBB0_64:
	bl	_pr_err
LBB0_65:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	ldr	w0, [x19]
	blr	x8
	mov	x0, x19
	mov	w1, #0
	bl	___cw1200_irq_enable
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x19]
	blr	x8
	b	LBB0_43
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGot	Lloh56, Lloh57
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpAdd	Lloh69, Lloh70
	.loh AdrpLdrGot	Lloh73, Lloh74
	.loh AdrpAdd	Lloh71, Lloh72
	.loh AdrpAdd	Lloh75, Lloh76
	.loh AdrpAdd	Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh82, Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.loh AdrpAdd	Lloh90, Lloh91
	.loh AdrpLdrGot	Lloh88, Lloh89
	.loh AdrpAdd	Lloh92, Lloh93
	.loh AdrpAdd	Lloh96, Lloh97
	.loh AdrpLdrGot	Lloh94, Lloh95
	.loh AdrpAdd	Lloh98, Lloh99
	.loh AdrpAdd	Lloh100, Lloh101
	.cfi_endproc
                                        ; -- End function
	.comm	_ST90TDS_CONFIG_REG_ID,4,2      ; @ST90TDS_CONFIG_REG_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't read config register.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Bad config register value (0x%08x)\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"Can't deduce hardware type.\n"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_ST90TDS_TSET_GEN_R_W_REG_ID,4,2 ; @ST90TDS_TSET_GEN_R_W_REG_ID
l_.str.3:                               ; @.str.3
	.asciz	"Can't write DPLL register.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Can't read DPLL register.\n"

l_.str.5:                               ; @.str.5
	.asciz	"Unable to initialise DPLL register. Wrote 0x%.8X, Read 0x%.8X.\n"

	.comm	_ST90TDS_CONTROL_REG_ID,4,2     ; @ST90TDS_CONTROL_REG_ID
l_.str.6:                               ; @.str.6
	.asciz	"set_wakeup: can't read control register.\n"

	.comm	_ST90TDS_CONT_WUP_BIT,4,2       ; @ST90TDS_CONT_WUP_BIT
l_.str.7:                               ; @.str.7
	.asciz	"set_wakeup: can't write control register.\n"

l_.str.8:                               ; @.str.8
	.asciz	"wait_for_wakeup: can't read control register.\n"

	.comm	_ST90TDS_CONT_RDY_BIT,4,2       ; @ST90TDS_CONT_RDY_BIT
l_.str.9:                               ; @.str.9
	.asciz	"wait_for_wakeup: device is not responding.\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_CW1200_CUT_ID_ADDR,4,2         ; @CW1200_CUT_ID_ADDR
l_.str.10:                              ; @.str.10
	.asciz	"HW detection: can't read CUT ID.\n"

l_.str.11:                              ; @.str.11
	.asciz	"CW1x00 Cut 1.1 silicon detected.\n"

	.comm	_CW1200_HW_REV_CUT11,4,2        ; @CW1200_HW_REV_CUT11
l_.str.12:                              ; @.str.12
	.asciz	"CW1x00 Cut 1.0 silicon detected.\n"

	.comm	_CW1200_HW_REV_CUT10,4,2        ; @CW1200_HW_REV_CUT10
	.comm	_CW1200_CUT2_ID_ADDR,4,2        ; @CW1200_CUT2_ID_ADDR
l_.str.13:                              ; @.str.13
	.asciz	"(1) HW detection: can't read CUT ID\n"

l_.str.14:                              ; @.str.14
	.asciz	"(2) HW detection: can't read CUT ID.\n"

l_.str.15:                              ; @.str.15
	.asciz	"(3) HW detection: can't read CUT ID.\n"

	.comm	_CW1200_CUT_22_ID_STR1,4,2      ; @CW1200_CUT_22_ID_STR1
	.comm	_CW1200_CUT_22_ID_STR2,4,2      ; @CW1200_CUT_22_ID_STR2
	.comm	_CW1200_CUT_22_ID_STR3,4,2      ; @CW1200_CUT_22_ID_STR3
l_.str.16:                              ; @.str.16
	.asciz	"CW1x00 Cut 2.2 silicon detected.\n"

	.comm	_CW1200_HW_REV_CUT22,4,2        ; @CW1200_HW_REV_CUT22
l_.str.17:                              ; @.str.17
	.asciz	"CW1x00 Cut 2.0 silicon detected.\n"

	.comm	_CW1200_HW_REV_CUT20,4,2        ; @CW1200_HW_REV_CUT20
l_.str.18:                              ; @.str.18
	.asciz	"CW1x60 silicon detected.\n"

	.comm	_CW1X60_HW_REV,4,2              ; @CW1X60_HW_REV
l_.str.19:                              ; @.str.19
	.asciz	"Unsupported silicon major revision %d.\n"

	.comm	_ST90TDS_CONFIG_ACCESS_MODE_BIT,4,2 ; @ST90TDS_CONFIG_ACCESS_MODE_BIT
l_.str.20:                              ; @.str.20
	.asciz	"Device is already in QUEUE mode!\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.21:                              ; @.str.21
	.asciz	"Can't handle CW1160/1260 firmware load yet.\n"

l_.str.22:                              ; @.str.22
	.asciz	"Can't perform firmware load for hw type %d.\n"

l_.str.23:                              ; @.str.23
	.asciz	"Firmware load error.\n"

l_.str.24:                              ; @.str.24
	.asciz	"Can't write config register.\n"

.subsections_via_symbols
