	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wcn36xx_start
_wcn36xx_start:                         ## @wcn36xx_start
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %r14
	movq	_WCN36XX_DBG_MAC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wcn36xx_dbg
	movq	%r14, %rdi
	callq	_wcn36xx_smd_open
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	jmp	LBB0_23
LBB0_2:
	movq	%r14, %rdi
	callq	_wcn36xx_dxe_allocate_mem_pools
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	jmp	LBB0_22
LBB0_4:
	movq	%r14, %rdi
	callq	_wcn36xx_dxe_alloc_ctl_blks
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	jmp	LBB0_21
LBB0_6:
	movq	_WCN36XX_HAL_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	%r14, %rdi
	callq	_wcn36xx_smd_load_nv
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_wcn36xx_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_11:
	movq	%r14, %rdi
	callq	_wcn36xx_smd_start
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rdi
LBB0_10:
	xorl	%eax, %eax
	callq	_wcn36xx_err
LBB0_19:
	movl	(%r14), %edi
	callq	_kfree
LBB0_20:
	movq	%r14, %rdi
	callq	_wcn36xx_dxe_free_ctl_blks
LBB0_21:
	movq	%r14, %rdi
	callq	_wcn36xx_dxe_free_mem_pools
LBB0_22:
	movq	%r14, %rdi
	callq	_wcn36xx_smd_close
LBB0_23:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_13:
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$2, %edx
	movl	$2, %ecx
	movl	$24, %r8d
	callq	_wcn36xx_is_fw_version
	testl	%eax, %eax
	jne	LBB0_17
## %bb.14:
	movq	%r14, %rdi
	callq	_wcn36xx_smd_feature_caps_exchange
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	leaq	L_.str.7(%rip), %rdi
	callq	_wcn36xx_warn
	jmp	LBB0_17
LBB0_16:
	movq	%r14, %rdi
	callq	_wcn36xx_feat_caps_info
LBB0_17:
	movq	%r14, %rdi
	callq	_wcn36xx_dxe_init
	testl	%eax, %eax
	je	LBB0_24
## %bb.18:
	movl	%eax, %ebx
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_wcn36xx_err
	movq	%r14, %rdi
	callq	_wcn36xx_smd_stop
	jmp	LBB0_19
LBB0_24:
	movq	%r14, %rdi
	callq	_wcn36xx_debugfs_init
	leaq	8(%r14), %rdi
	callq	_INIT_LIST_HEAD
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_spin_lock_init
	xorl	%ebx, %ebx
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_WCN36XX_DBG_MAC,4,2            ## @WCN36XX_DBG_MAC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mac start\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to open smd channel: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to alloc DXE mempool: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to alloc DXE ctl blocks: %d\n"

	.comm	_WCN36XX_HAL_BUF_SIZE,4,2       ## @WCN36XX_HAL_BUF_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.4:                               ## @.str.4
	.asciz	"Failed to allocate smd buf\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.5:                               ## @.str.5
	.asciz	"Failed to push NV to chip\n"

L_.str.6:                               ## @.str.6
	.asciz	"Failed to start chip\n"

L_.str.7:                               ## @.str.7
	.asciz	"Exchange feature caps failed\n"

L_.str.8:                               ## @.str.8
	.asciz	"DXE init failed\n"

	.no_dead_strip	_wcn36xx_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wcn36xx_start
_wcn36xx_start:                         ; @wcn36xx_start
	.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	x19, [x0]
Lloh0:
	adrp	x8, _WCN36XX_DBG_MAC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WCN36XX_DBG_MAC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wcn36xx_dbg
	mov	x0, x19
	bl	_wcn36xx_smd_open
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	str	x20, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_wcn36xx_err
	b	LBB0_22
LBB0_2:
	mov	x0, x19
	bl	_wcn36xx_dxe_allocate_mem_pools
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
	str	x20, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_wcn36xx_err
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	b	LBB0_21
LBB0_4:
	mov	x0, x19
	bl	_wcn36xx_dxe_alloc_ctl_blks
	cbz	w0, LBB0_6
; %bb.5:
	mov	x20, x0
	str	x20, [sp]
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_wcn36xx_err
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	b	LBB0_20
LBB0_6:
Lloh11:
	adrp	x8, _WCN36XX_HAL_BUF_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WCN36XX_HAL_BUF_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_kmalloc
	str	w0, [x19]
	cbz	w0, LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_wcn36xx_smd_load_nv
	cbz	w0, LBB0_10
; %bb.8:
	mov	x20, x0
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_wcn36xx_err
	b	LBB0_18
LBB0_9:
Lloh19:
	adrp	x0, l_.str.4@PAGE
Lloh20:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_wcn36xx_err
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_19
LBB0_10:
	mov	x0, x19
	bl	_wcn36xx_smd_start
	cbz	w0, LBB0_12
; %bb.11:
	mov	x20, x0
Lloh24:
	adrp	x0, l_.str.6@PAGE
Lloh25:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_wcn36xx_err
	b	LBB0_18
LBB0_12:
	mov	x0, x19
	mov	w1, #1
	mov	w2, #2
	mov	w3, #2
	mov	w4, #24
	bl	_wcn36xx_is_fw_version
	cbnz	w0, LBB0_16
; %bb.13:
	mov	x0, x19
	bl	_wcn36xx_smd_feature_caps_exchange
	cbz	w0, LBB0_15
; %bb.14:
Lloh26:
	adrp	x0, l_.str.7@PAGE
Lloh27:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_wcn36xx_warn
	b	LBB0_16
LBB0_15:
	mov	x0, x19
	bl	_wcn36xx_feat_caps_info
LBB0_16:
	mov	x0, x19
	bl	_wcn36xx_dxe_init
	mov	x20, x0
	cbz	w0, LBB0_23
; %bb.17:
Lloh28:
	adrp	x0, l_.str.8@PAGE
Lloh29:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_wcn36xx_err
	mov	x0, x19
	bl	_wcn36xx_smd_stop
LBB0_18:
	ldr	w0, [x19]
	bl	_kfree
LBB0_19:
	mov	x0, x19
	bl	_wcn36xx_dxe_free_ctl_blks
LBB0_20:
	mov	x0, x19
	bl	_wcn36xx_dxe_free_mem_pools
LBB0_21:
	mov	x0, x19
	bl	_wcn36xx_smd_close
LBB0_22:
	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
LBB0_23:
	mov	x0, x19
	bl	_wcn36xx_debugfs_init
	add	x0, x19, #8
	bl	_INIT_LIST_HEAD
	add	x0, x19, #4
	bl	_spin_lock_init
	b	LBB0_22
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_WCN36XX_DBG_MAC,4,2            ; @WCN36XX_DBG_MAC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mac start\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to open smd channel: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to alloc DXE mempool: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to alloc DXE ctl blocks: %d\n"

	.comm	_WCN36XX_HAL_BUF_SIZE,4,2       ; @WCN36XX_HAL_BUF_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.4:                               ; @.str.4
	.asciz	"Failed to allocate smd buf\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.5:                               ; @.str.5
	.asciz	"Failed to push NV to chip\n"

l_.str.6:                               ; @.str.6
	.asciz	"Failed to start chip\n"

l_.str.7:                               ; @.str.7
	.asciz	"Exchange feature caps failed\n"

l_.str.8:                               ; @.str.8
	.asciz	"DXE init failed\n"

	.no_dead_strip	_wcn36xx_start
.subsections_via_symbols
