	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtw_power_on
_rtw_power_on:                          ## @rtw_power_on
	.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
	movq	%rdi, %r14
	movq	16(%rdi), %r15
	callq	_rtw_hci_setup
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	%r14, %rdi
	callq	_rtw_mac_power_on
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	callq	_rtw_err
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	8(%r14), %rdi
	callq	_wait_for_completion
	cmpl	$0, 4(%r14)
	je	LBB0_6
## %bb.7:
	leaq	4(%r14), %rsi
	movq	%r14, %rdi
	callq	_rtw_download_firmware
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_13
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_9:
	movq	%r14, %rdi
	callq	_rtw_mac_init
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_13
LBB0_11:
	movq	(%r15), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	movq	%r14, %rdi
	callq	_rtw_hci_start
	testl	%eax, %eax
	je	LBB0_15
## %bb.12:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
LBB0_13:
	movq	%r14, %rdi
	callq	_rtw_err
	movq	%r14, %rdi
	callq	_rtw_mac_power_off
	jmp	LBB0_14
LBB0_15:
	movq	%r14, %rdi
	callq	_rtw_fw_send_general_info
	movq	%r14, %rdi
	callq	_rtw_fw_send_phydm_info
	xorl	%ebx, %ebx
	cmpl	$0, (%r14)
	sete	%bl
	movq	%r14, %rdi
	callq	_rtw_coex_power_on_setting
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_rtw_coex_init_hw_config
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to setup hci\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to power on mac\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"failed to load firmware\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to download firmware\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to configure mac\n"

L_.str.5:                               ## @.str.5
	.asciz	"failed to start hci\n"

	.no_dead_strip	_rtw_power_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtw_power_on
_rtw_power_on:                          ; @rtw_power_on
	.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	x19, x0
	ldr	x21, [x0, #16]
	bl	_rtw_hci_setup
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_rtw_mac_power_on
	cbz	w0, LBB0_6
; %bb.3:
	mov	x20, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	mov	x0, x19
	bl	_rtw_err
LBB0_5:
	mov	x0, x20
	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
LBB0_6:
	add	x0, x19, #8
	bl	_wait_for_completion
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_9
; %bb.7:
	add	x1, x19, #4
	mov	x0, x19
	bl	_rtw_download_firmware
	cbz	w0, LBB0_10
; %bb.8:
	mov	x20, x0
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_9:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_10:
	mov	x0, x19
	bl	_rtw_mac_init
	cbz	w0, LBB0_12
; %bb.11:
	mov	x20, x0
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_12:
	ldr	x8, [x21]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	mov	x0, x19
	bl	_rtw_hci_start
	cbz	w0, LBB0_15
; %bb.13:
	mov	x20, x0
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_14:
	mov	x0, x19
	bl	_rtw_err
	mov	x0, x19
	bl	_rtw_mac_power_off
	b	LBB0_5
LBB0_15:
	mov	x0, x19
	bl	_rtw_fw_send_general_info
	mov	x0, x19
	bl	_rtw_fw_send_phydm_info
	ldr	w8, [x19]
	cmp	w8, #0
	cset	w20, eq
	mov	x0, x19
	bl	_rtw_coex_power_on_setting
	mov	x0, x19
	mov	x1, x20
	bl	_rtw_coex_init_hw_config
	mov	w20, #0
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to setup hci\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to power on mac\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"failed to load firmware\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to download firmware\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to configure mac\n"

l_.str.5:                               ; @.str.5
	.asciz	"failed to start hci\n"

	.no_dead_strip	_rtw_power_on
.subsections_via_symbols
