	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function carl9170_op_add_interface
_carl9170_op_add_interface:             ## @carl9170_op_add_interface
	.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	%rsi, %r12
	movq	24(%rsi), %r15
	movq	(%rdi), %r14
	leaq	4(%r14), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	xorl	%eax, %eax
	callq	_rcu_read_lock
	cmpl	$0, (%r15)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.1:
	movl	4(%r15), %r13d
	movl	$0, 8(%r15)
	leaq	56(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	movq	40(%r15), %rdi
	callq	_dev_kfree_skb_any
	movq	$0, 40(%r15)
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	xorl	%ebx, %ebx
LBB0_2:
	movq	%r14, %rdi
	callq	_carl9170_get_main_vif
	cmpq	%r12, %rax
	je	LBB0_9
## %bb.3:
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	movl	20(%r12), %edx
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_carl9170_mod_virtual_mac
	jmp	LBB0_12
LBB0_4:
	movq	%r14, %rdi
	callq	_carl9170_get_main_vif
	testq	%rax, %rax
	je	LBB0_20
## %bb.5:
	movl	12(%rax), %edx
	leal	-129(%rdx), %ecx
	cmpl	$2, %ecx
	jae	LBB0_24
## %bb.6:
	movl	12(%r12), %edx
	movq	_NL80211_IFTYPE_WDS@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	(%rcx), %edx
	je	LBB0_21
## %bb.7:
	addl	$-128, %edx
	cmpl	$3, %edx
	jb	LBB0_21
LBB0_8:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	jmp	LBB0_29
LBB0_9:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	48(%r14), %edi
	movq	%r15, %rsi
	callq	_rcu_assign_pointer
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.10:
	movq	24(%rbx), %rax
	movl	4(%rax), %esi
	movl	20(%rbx), %edx
	movq	%r14, %rdi
	callq	_carl9170_mod_virtual_mac
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
LBB0_11:
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_carl9170_init_interface
LBB0_12:
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_16
LBB0_13:
	testl	%r12d, %r12d
	je	LBB0_29
LBB0_14:
	testl	%r13d, %r13d
	js	LBB0_29
## %bb.15:
	movl	$0, (%r15)
	leaq	24(%r14), %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_bitmap_release_region
	decl	(%r14)
	movq	16(%r14), %rax
	movl	%r13d, %ecx
	movl	4(%rax,%rcx,8), %edi
	xorl	%esi, %esi
	callq	_RCU_INIT_POINTER
	addq	$16, %r15
	movq	%r15, %rdi
	callq	_list_del_rcu
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	xorl	%eax, %eax
	callq	_synchronize_rcu
	jmp	LBB0_32
LBB0_16:
	movq	32(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_27
## %bb.17:
	leal	(,%r13,4), %eax
	cltq
	addq	%rax, %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_carl9170_write_reg
	movl	%eax, %r12d
	testl	%r12d, %r12d
	jne	LBB0_14
	jmp	LBB0_29
LBB0_24:
	cmpl	$128, %edx
	jne	LBB0_33
## %bb.25:
	movl	12(%r12), %ecx
	cmpl	$128, %ecx
	jne	LBB0_36
LBB0_20:
	xorl	%eax, %eax
LBB0_21:
	movq	%rax, %rbx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	leaq	24(%r14), %rdi
	movl	40(%r14), %esi
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	callq	_bitmap_find_free_region
	testl	%eax, %eax
	js	LBB0_28
## %bb.22:
	movl	%eax, %r13d
	movq	16(%r14), %rax
	movl	%r13d, %r12d
	xorl	%edi, %edi
	cmpl	%r13d, (%rax,%r12,8)
	setne	%dil
	callq	_BUG_ON
	movl	$1, (%r15)
	movl	%r13d, 4(%r15)
	movl	$0, 8(%r15)
	incl	(%r14)
	leaq	16(%r15), %rdi
	leaq	52(%r14), %rsi
	testq	%rbx, %rbx
	je	LBB0_34
## %bb.23:
	callq	_list_add_rcu
	jmp	LBB0_35
LBB0_27:
	xorl	%r12d, %r12d
	jmp	LBB0_29
LBB0_28:
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_29:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpl	$2, (%r14)
	jl	LBB0_31
LBB0_30:
	movq	_PS_OFF_VIF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r14)
LBB0_31:
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_32:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_33:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	cmpl	$2, (%r14)
	jge	LBB0_30
	jmp	LBB0_31
LBB0_34:
	callq	_list_add_tail_rcu
LBB0_35:
	movq	16(%r14), %rax
	movl	4(%rax,%r12,8), %edi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_rcu_assign_pointer
	jmp	LBB0_2
LBB0_36:
	cmpl	$0, 32(%rax)
	je	LBB0_8
## %bb.37:
	cmpl	$0, 32(%r12)
	je	LBB0_8
## %bb.38:
	cmpl	$130, %ecx
	je	LBB0_21
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_NL80211_IFTYPE_WDS,4,2         ## @NL80211_IFTYPE_WDS
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_PS_OFF_VIF,4,2                 ## @PS_OFF_VIF
	.no_dead_strip	_carl9170_op_add_interface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function carl9170_op_add_interface
_carl9170_op_add_interface:             ; @carl9170_op_add_interface
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x1
	ldr	x21, [x1, #24]
	ldr	x20, [x0]
	add	x19, x20, #4
	mov	x0, x19
	bl	_mutex_lock
	bl	_rcu_read_lock
	ldr	w8, [x21]
	cbz	w8, LBB0_4
; %bb.1:
	ldr	w23, [x21, #4]
	str	wzr, [x21, #8]
	add	x24, x20, #56
	mov	x0, x24
	bl	_spin_lock_bh
	ldr	x0, [x21, #40]
	bl	_dev_kfree_skb_any
	str	xzr, [x21, #40]
	mov	x0, x24
	bl	_spin_unlock_bh
	mov	x24, #0
LBB0_2:
	mov	x0, x20
	bl	_carl9170_get_main_vif
	cmp	x0, x22
	b.eq	LBB0_8
; %bb.3:
	bl	_rcu_read_unlock
	ldr	w2, [x22, #20]
	mov	x0, x20
	mov	x1, x23
	bl	_carl9170_mod_virtual_mac
	mov	x24, x0
	cbnz	w0, LBB0_13
	b	LBB0_11
LBB0_4:
	mov	x0, x20
	bl	_carl9170_get_main_vif
	mov	x24, x0
	cbz	x0, LBB0_19
; %bb.5:
	ldr	w8, [x24, #12]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hs	LBB0_16
; %bb.6:
	ldr	w8, [x22, #12]
Lloh0:
	adrp	x9, _NL80211_IFTYPE_WDS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NL80211_IFTYPE_WDS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sub	w10, w8, #128
	cmp	w8, w9
	ccmp	w10, #3, #0, ne
	b.lo	LBB0_18
LBB0_7:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w24, w8
	bl	_rcu_read_unlock
	b	LBB0_25
LBB0_8:
	ldr	w0, [x20, #48]
	mov	x1, x21
	bl	_rcu_assign_pointer
	bl	_rcu_read_unlock
	cbz	x24, LBB0_10
; %bb.9:
	ldr	x8, [x24, #24]
	ldr	w1, [x8, #4]
	ldr	w2, [x24, #20]
	mov	x0, x20
	bl	_carl9170_mod_virtual_mac
	mov	x24, x0
	cbnz	w0, LBB0_13
LBB0_10:
	mov	x0, x20
	mov	x1, x22
	bl	_carl9170_init_interface
	mov	x24, x0
	cbnz	w0, LBB0_13
LBB0_11:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_24
; %bb.12:
	lsl	w9, w23, #2
	add	x1, x8, w9, sxtw
	mov	x0, x20
	mov	w2, #0
	bl	_carl9170_write_reg
	mov	x24, x0
LBB0_13:
	cbz	w24, LBB0_25
; %bb.14:
	tbnz	w23, #31, LBB0_25
; %bb.15:
	str	wzr, [x21], #16
	add	x0, x20, #24
	mov	x1, x23
	mov	w2, #0
	bl	_bitmap_release_region
	ldr	w8, [x20]
	sub	w8, w8, #1
	str	w8, [x20]
	ldr	x8, [x20, #16]
	add	x8, x8, w23, uxtw #3
	ldr	w0, [x8, #4]
	mov	x1, #0
	bl	_RCU_INIT_POINTER
	mov	x0, x21
	bl	_list_del_rcu
	mov	x0, x19
	bl	_mutex_unlock
	bl	_synchronize_rcu
	b	LBB0_28
LBB0_16:
	cmp	w8, #128
	b.ne	LBB0_23
; %bb.17:
	ldr	w8, [x22, #12]
	cmp	w8, #128
	b.ne	LBB0_31
LBB0_18:
	mov	x24, #0
LBB0_19:
	add	x0, x20, #24
	ldr	w1, [x20, #40]
	mov	w2, #0
	bl	_bitmap_find_free_region
	tbnz	w0, #31, LBB0_22
; %bb.20:
	mov	x23, x0
	ldr	x8, [x20, #16]
	mov	w25, w0
	lsl	x9, x25, #3
	ldr	w8, [x8, x9]
	cmp	w8, w0
	cset	w0, ne
	bl	_BUG_ON
	mov	w8, #1
	stp	w8, w23, [x21]
	str	wzr, [x21, #8]
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	add	x0, x21, #16
	add	x1, x20, #52
	cbz	x24, LBB0_29
; %bb.21:
	bl	_list_add_rcu
	b	LBB0_30
LBB0_22:
	bl	_rcu_read_unlock
Lloh6:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_25
LBB0_23:
	bl	_rcu_read_unlock
LBB0_24:
	mov	w24, #0
LBB0_25:
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_27
; %bb.26:
Lloh9:
	adrp	x8, _PS_OFF_VIF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PS_OFF_VIF@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	str	w8, [x20, #8]
LBB0_27:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_28:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_29:
	bl	_list_add_tail_rcu
LBB0_30:
	ldr	x8, [x20, #16]
	add	x8, x8, x25, lsl #3
	ldr	w0, [x8, #4]
	mov	x1, x22
	bl	_rcu_assign_pointer
	b	LBB0_2
LBB0_31:
	ldr	w9, [x24, #32]
	cbz	w9, LBB0_7
; %bb.32:
	ldr	w9, [x22, #32]
	cbz	w9, LBB0_7
; %bb.33:
	cmp	w8, #130
	b.eq	LBB0_19
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_NL80211_IFTYPE_WDS,4,2         ; @NL80211_IFTYPE_WDS
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_PS_OFF_VIF,4,2                 ; @PS_OFF_VIF
	.no_dead_strip	_carl9170_op_add_interface
.subsections_via_symbols
