	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2x00mac_add_interface        ## -- Begin function rt2x00mac_add_interface
	.p2align	4, 0x90
_rt2x00mac_add_interface:               ## @rt2x00mac_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	(%rdi), %r14
	movq	%rsi, %rdi
	callq	_vif_to_intf
	movq	%rax, %r15
	movq	24(%r14), %r13
	movq	_DEVICE_STATE_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r14), %rbx
	movq	%rbx, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	_DEVICE_STATE_STARTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$0, (%r13)
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.6:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	_ENTRY_BCN_ASSIGNED@GOTPCREL(%rip), %r12
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	8(%r13), %rbx
	addq	%r14, %rbx
	movq	%rbx, %rsi
	callq	_test_and_set_bit
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%r15
	movl	(%r13), %eax
	addq	$4, %r14
	cmpq	%rax, %r15
	jb	LBB0_7
	jmp	LBB0_10
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_8:
	movl	(%r13), %eax
LBB0_10:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_11:
	xorl	%edi, %edi
	cmpl	%eax, %r15d
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	4(%r12), %eax
	movq	_NL80211_IFTYPE_AP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_15
## %bb.14:
	incl	12(%r14)
	jmp	LBB0_16
LBB0_15:
	incl	8(%r14)
LBB0_16:
	movq	%r15, %rdi
	addq	$8, %rdi
	callq	_mutex_init
	movq	%rbx, (%r15)
	movl	(%r12), %ecx
	movl	4(%r12), %edx
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%r8d, %r8d
	callq	_rt2x00lib_config_intf
	movq	$0, (%r14)
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_DEVICE_STATE_PRESENT,4,2       ## @DEVICE_STATE_PRESENT
	.comm	_DEVICE_STATE_STARTED,4,2       ## @DEVICE_STATE_STARTED
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ENTRY_BCN_ASSIGNED,4,2         ## @ENTRY_BCN_ASSIGNED
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.comm	_NL80211_IFTYPE_AP,4,2          ## @NL80211_IFTYPE_AP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rt2x00mac_add_interface        ; -- Begin function rt2x00mac_add_interface
	.p2align	2
_rt2x00mac_add_interface:               ; @rt2x00mac_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	x20, x1
	ldr	x19, [x0]
	mov	x0, x1
	bl	_vif_to_intf
	mov	x21, x0
	ldr	x23, [x19, #24]
Lloh0:
	adrp	x8, _DEVICE_STATE_PRESENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEVICE_STATE_PRESENT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x22, x19, #16
	mov	x1, x22
	bl	_test_bit
	cbz	w0, LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _DEVICE_STATE_STARTED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DEVICE_STATE_STARTED@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x22
	bl	_test_bit
	cbz	w0, LBB0_6
; %bb.2:
	ldr	w8, [x23]
	cbz	w8, LBB0_7
; %bb.3:
	mov	x9, #0
	mov	x22, #0
Lloh6:
	adrp	x26, _ENTRY_BCN_ASSIGNED@GOTPAGE
Lloh7:
	ldr	x26, [x26, _ENTRY_BCN_ASSIGNED@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x24, x9
	ldr	x25, [x23, #8]
	ldr	w0, [x26]
	add	x1, x25, x9
	bl	_test_and_set_bit
	cbz	w0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldr	w8, [x23]
	add	x9, x24, #4
	cmp	x22, x8
	b.lo	LBB0_4
	b	LBB0_9
LBB0_6:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_12
LBB0_7:
	mov	w22, #0
	mov	x23, #0
	b	LBB0_10
LBB0_8:
	ldr	w8, [x23]
LBB0_9:
	add	x23, x25, x24
LBB0_10:
	cmp	w22, w8
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_14
; %bb.11:
Lloh10:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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_14:
	ldr	w8, [x20, #4]
Lloh12:
	adrp	x9, _NL80211_IFTYPE_AP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _NL80211_IFTYPE_AP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_16
; %bb.15:
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	b	LBB0_17
LBB0_16:
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
LBB0_17:
	add	x0, x21, #8
	bl	_mutex_init
	str	x23, [x21]
	ldp	w3, w2, [x20]
	mov	x0, x19
	mov	x1, x21
	mov	x4, #0
	bl	_rt2x00lib_config_intf
	mov	w0, #0
	str	xzr, [x19]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DEVICE_STATE_PRESENT,4,2       ; @DEVICE_STATE_PRESENT
	.comm	_DEVICE_STATE_STARTED,4,2       ; @DEVICE_STATE_STARTED
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ENTRY_BCN_ASSIGNED,4,2         ; @ENTRY_BCN_ASSIGNED
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.comm	_NL80211_IFTYPE_AP,4,2          ; @NL80211_IFTYPE_AP
.subsections_via_symbols
