	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il_add_station_common          ## -- Begin function il_add_station_common
	.p2align	4, 0x90
_il_add_station_common:                 ## @il_add_station_common
	.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	%rcx, %r15
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	$0, (%r8)
	callq	_spin_lock_irqsave
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	movq	%r15, %rcx
	callq	_il_prep_station
	movq	%rax, %r14
	movq	_IL_INVALID_STATION@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	callq	_IL_ERR
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	8(%r12), %rax
	movq	%r14, %r15
	shlq	$4, %r15
	movl	(%rax,%r15), %ecx
	movq	_IL_STA_UCODE_INPROGRESS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%ecx, %edx
	je	LBB0_6
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	callq	_D_INFO
LBB0_4:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EEXIST@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_IL_STA_DRIVER_ACTIVE@GOTPCREL(%rip), %rdi
	testl	%ecx, (%rdi)
	je	LBB0_9
## %bb.7:
	movq	_IL_STA_UCODE_ACTIVE@GOTPCREL(%rip), %rsi
	testl	%ecx, (%rsi)
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_D_ASSOC
	jmp	LBB0_4
LBB0_9:
	movq	%rdi, %r13
	leaq	(%rax,%r15), %rsi
	orl	%ecx, %edx
	movl	%edx, (%rsi)
	leaq	(%rax,%r15), %rsi
	addq	$8, %rsi
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_memcpy
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	_CMD_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_il_send_add_sta
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	8(%r12), %rax
	movq	8(%rax,%r15), %rsi
	leaq	L_.str.3(%rip), %rdi
	callq	_IL_ERR
	movl	(%r13), %eax
	notl	%eax
	movq	8(%r12), %rcx
	andl	(%rcx,%r15), %eax
	movl	%eax, (%rcx,%r15)
	movq	_IL_STA_UCODE_INPROGRESS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	%edx, (%rcx,%r15)
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
LBB0_11:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_IL_INVALID_STATION,8,3         ## @IL_INVALID_STATION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to prepare station %pM for addition\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IL_STA_UCODE_INPROGRESS,4,2    ## @IL_STA_UCODE_INPROGRESS
L_.str.1:                               ## @.str.1
	.asciz	"STA %d already in process of being added.\n"

	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_IL_STA_DRIVER_ACTIVE,4,2       ## @IL_STA_DRIVER_ACTIVE
	.comm	_IL_STA_UCODE_ACTIVE,4,2        ## @IL_STA_UCODE_ACTIVE
L_.str.2:                               ## @.str.2
	.asciz	"STA %d (%pM) already added, not adding again.\n"

	.comm	_CMD_SYNC,4,2                   ## @CMD_SYNC
L_.str.3:                               ## @.str.3
	.asciz	"Adding station %pM failed.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il_add_station_common          ; -- Begin function il_add_station_common
	.p2align	2
_il_add_station_common:                 ; @il_add_station_common
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x4
	mov	x21, x3
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
	str	xzr, [x4]
	bl	_spin_lock_irqsave
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	mov	x3, x21
	bl	_il_prep_station
Lloh0:
	adrp	x8, _IL_INVALID_STATION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IL_INVALID_STATION@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_IL_ERR
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	mov	x21, x0
	ldr	x8, [x19, #8]
	add	x9, x8, x0, lsl #4
	ldr	w10, [x9]
Lloh7:
	adrp	x23, _IL_STA_UCODE_INPROGRESS@GOTPAGE
Lloh8:
	ldr	x23, [x23, _IL_STA_UCODE_INPROGRESS@GOTPAGEOFF]
	ldr	w11, [x23]
	tst	w11, w10
	b.eq	LBB0_7
; %bb.3:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_D_INFO
LBB0_4:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh11:
	adrp	x8, _EEXIST@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_6:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
Lloh13:
	adrp	x24, _IL_STA_DRIVER_ACTIVE@GOTPAGE
Lloh14:
	ldr	x24, [x24, _IL_STA_DRIVER_ACTIVE@GOTPAGEOFF]
	ldr	w12, [x24]
	tst	w12, w10
	b.eq	LBB0_10
; %bb.8:
Lloh15:
	adrp	x12, _IL_STA_UCODE_ACTIVE@GOTPAGE
Lloh16:
	ldr	x12, [x12, _IL_STA_UCODE_ACTIVE@GOTPAGEOFF]
Lloh17:
	ldr	w12, [x12]
	tst	w12, w10
	b.eq	LBB0_10
; %bb.9:
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	bl	_D_ASSOC
	b	LBB0_4
LBB0_10:
	orr	w10, w11, w10
	str	w10, [x9]
	add	x8, x8, x21, lsl #4
	add	x1, x8, #8
	add	x0, sp, #8
	mov	w2, #4
	bl	_memcpy
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh20:
	adrp	x8, _CMD_SYNC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CMD_SYNC@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_il_send_add_sta
	mov	x22, x0
	cbz	w0, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #8]
	lsl	x25, x21, #4
	add	x8, x8, x25
	ldr	x1, [x8, #8]
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_IL_ERR
	ldr	w8, [x24]
	ldr	x9, [x19, #8]
	ldr	w10, [x9, x25]
	bic	w8, w10, w8
	str	w8, [x9, x25]
	ldr	w10, [x23]
	bic	w8, w8, w10
	str	w8, [x9, x25]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_12:
	str	x21, [x20]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_IL_INVALID_STATION,8,3         ; @IL_INVALID_STATION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to prepare station %pM for addition\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IL_STA_UCODE_INPROGRESS,4,2    ; @IL_STA_UCODE_INPROGRESS
l_.str.1:                               ; @.str.1
	.asciz	"STA %d already in process of being added.\n"

	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_IL_STA_DRIVER_ACTIVE,4,2       ; @IL_STA_DRIVER_ACTIVE
	.comm	_IL_STA_UCODE_ACTIVE,4,2        ; @IL_STA_UCODE_ACTIVE
l_.str.2:                               ; @.str.2
	.asciz	"STA %d (%pM) already added, not adding again.\n"

	.comm	_CMD_SYNC,4,2                   ; @CMD_SYNC
l_.str.3:                               ; @.str.3
	.asciz	"Adding station %pM failed.\n"

.subsections_via_symbols
