	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qtnf_core_mac_attach
_qtnf_core_mac_attach:                  ## @qtnf_core_mac_attach
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	(%rdi), %ebx
	movl	%esi, %edi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_qtnf_core_mac_alloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.20:
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	callq	_pr_err
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_pr_info
	xorl	%r15d, %r15d
	jmp	LBB0_19
LBB0_3:
	movq	%rbx, %rdi
	callq	_qtnf_cmd_get_mac_info
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rdi
LBB0_5:
	movl	%r12d, %esi
	callq	_pr_err
LBB0_18:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_qtnf_core_mac_detach
LBB0_19:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, %rdi
	callq	_qtnf_mac_get_base_vif
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r13
	movl	8(%rax), %esi
	movl	12(%rax), %edx
	movl	16(%rax), %ecx
	movq	%rax, %rdi
	callq	_qtnf_cmd_send_add_intf
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_5
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
	movl	%r12d, %esi
	callq	_pr_err
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_18
LBB0_10:
	movq	%rbx, %rdi
	callq	_qtnf_cmd_send_get_phy_params
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r15d
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_5
LBB0_12:
	movq	%rbx, %rdi
	callq	_qtnf_mac_init_bands
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	%eax, %r15d
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_5
LBB0_14:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_qtnf_wiphy_register
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %r15d
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_5
LBB0_16:
	movl	$1, (%rbx)
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_rtnl_lock
	movq	_NET_NAME_ENUM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.8(%rip), %rdx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_qtnf_core_net_attach
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_rtnl_unlock
	testl	%ebx, %ebx
	je	LBB0_21
## %bb.17:
	leaq	L_.str.9(%rip), %rdi
	movl	%r12d, %esi
	callq	_pr_err
	movq	_NL80211_IFTYPE_UNSPECIFIED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	movq	$0, (%r13)
	movl	%ebx, %r15d
	jmp	LBB0_18
LBB0_21:
	leaq	L_.str.10(%rip), %rdi
	movl	%r12d, %esi
	callq	_pr_debug
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAC%u is not active in FW\n"

L_.str.1:                               ## @.str.1
	.asciz	"MAC%u allocation failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"MAC%u: failed to get info\n"

L_.str.3:                               ## @.str.3
	.asciz	"MAC%u: primary VIF is not ready\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
L_.str.4:                               ## @.str.4
	.asciz	"MAC%u: failed to add VIF\n"

L_.str.5:                               ## @.str.5
	.asciz	"MAC%u: failed to get PHY settings\n"

L_.str.6:                               ## @.str.6
	.asciz	"MAC%u: failed to init bands\n"

L_.str.7:                               ## @.str.7
	.asciz	"MAC%u: wiphy registration failed\n"

L_.str.8:                               ## @.str.8
	.asciz	"wlan%d"

	.comm	_NET_NAME_ENUM,4,2              ## @NET_NAME_ENUM
L_.str.9:                               ## @.str.9
	.asciz	"MAC%u: failed to attach netdev\n"

	.comm	_NL80211_IFTYPE_UNSPECIFIED,4,2 ## @NL80211_IFTYPE_UNSPECIFIED
L_.str.10:                              ## @.str.10
	.asciz	"MAC%u initialized\n"

	.no_dead_strip	_qtnf_core_mac_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qtnf_core_mac_attach
_qtnf_core_mac_attach:                  ; @qtnf_core_mac_attach
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x20, x0
	ldr	w21, [x0]
	mov	x0, x1
	bl	_BIT
	tst	w0, w21
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_qtnf_core_mac_alloc
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_pr_err
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_pr_info
	mov	w21, #0
	b	LBB0_8
LBB0_4:
	mov	x0, x22
	bl	_qtnf_cmd_get_mac_info
	cbz	w0, LBB0_9
; %bb.5:
	mov	x21, x0
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_6:
	mov	x1, x19
	bl	_pr_err
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	bl	_qtnf_core_mac_detach
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x22
	bl	_qtnf_mac_get_base_vif
	cbz	x0, LBB0_12
; %bb.10:
	mov	x23, x0
	ldp	w1, w2, [x0, #8]
	ldr	w3, [x0, #16]
	bl	_qtnf_cmd_send_add_intf
	cbz	w0, LBB0_13
; %bb.11:
	mov	x21, x0
Lloh6:
	adrp	x0, l_.str.4@PAGE
Lloh7:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_6
LBB0_12:
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_pr_err
Lloh10:
	adrp	x8, _EFAULT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_13:
	mov	x0, x22
	bl	_qtnf_cmd_send_get_phy_params
	cbz	w0, LBB0_15
; %bb.14:
	mov	x21, x0
Lloh13:
	adrp	x0, l_.str.5@PAGE
Lloh14:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_6
LBB0_15:
	mov	x0, x22
	bl	_qtnf_mac_init_bands
	cbz	w0, LBB0_17
; %bb.16:
	mov	x21, x0
Lloh15:
	adrp	x0, l_.str.6@PAGE
Lloh16:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_6
LBB0_17:
	mov	x0, x20
	mov	x1, x22
	bl	_qtnf_wiphy_register
	cbz	w0, LBB0_19
; %bb.18:
	mov	x21, x0
Lloh17:
	adrp	x0, l_.str.7@PAGE
Lloh18:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_6
LBB0_19:
	mov	w8, #1
	str	w8, [x22]
	bl	_rtnl_lock
Lloh19:
	adrp	x8, _NET_NAME_ENUM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _NET_NAME_ENUM@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
Lloh22:
	adrp	x2, l_.str.8@PAGE
Lloh23:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	x0, x22
	mov	x1, x23
	bl	_qtnf_core_net_attach
	mov	x21, x0
	bl	_rtnl_unlock
	cbz	w21, LBB0_21
; %bb.20:
Lloh24:
	adrp	x0, l_.str.9@PAGE
Lloh25:
	add	x0, x0, l_.str.9@PAGEOFF
	mov	x1, x19
	bl	_pr_err
Lloh26:
	adrp	x8, _NL80211_IFTYPE_UNSPECIFIED@GOTPAGE
Lloh27:
	ldr	x8, [x8, _NL80211_IFTYPE_UNSPECIFIED@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [x23, #8]
	str	xzr, [x23]
	b	LBB0_7
LBB0_21:
Lloh29:
	adrp	x0, l_.str.10@PAGE
Lloh30:
	add	x0, x0, l_.str.10@PAGEOFF
	mov	x1, x19
	bl	_pr_debug
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAC%u is not active in FW\n"

l_.str.1:                               ; @.str.1
	.asciz	"MAC%u allocation failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"MAC%u: failed to get info\n"

l_.str.3:                               ; @.str.3
	.asciz	"MAC%u: primary VIF is not ready\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
l_.str.4:                               ; @.str.4
	.asciz	"MAC%u: failed to add VIF\n"

l_.str.5:                               ; @.str.5
	.asciz	"MAC%u: failed to get PHY settings\n"

l_.str.6:                               ; @.str.6
	.asciz	"MAC%u: failed to init bands\n"

l_.str.7:                               ; @.str.7
	.asciz	"MAC%u: wiphy registration failed\n"

l_.str.8:                               ; @.str.8
	.asciz	"wlan%d"

	.comm	_NET_NAME_ENUM,4,2              ; @NET_NAME_ENUM
l_.str.9:                               ; @.str.9
	.asciz	"MAC%u: failed to attach netdev\n"

	.comm	_NL80211_IFTYPE_UNSPECIFIED,4,2 ; @NL80211_IFTYPE_UNSPECIFIED
l_.str.10:                              ; @.str.10
	.asciz	"MAC%u initialized\n"

	.no_dead_strip	_qtnf_core_mac_attach
.subsections_via_symbols
