	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl12xx_cmd_add_peer            ## -- Begin function wl12xx_cmd_add_peer
	.p2align	4, 0x90
_wl12xx_cmd_add_peer:                   ## @wl12xx_cmd_add_peer
	.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, %r13
	movq	%rdx, %rbx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	_DEBUG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_wl1271_debug
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	52(%rax), %edi
	movl	48(%rbx), %esi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movq	_WL1271_AP_BSS_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r15)
	movl	44(%rbx), %eax
	movl	%eax, 44(%r15)
	movq	%r13, (%r15)
	movl	40(%rbx), %eax
	movl	%eax, 40(%r15)
	movq	32(%rbx), %rax
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	%ecx, 8(%r15)
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rcx
	movl	(%rcx,%r13,4), %ecx
	movl	%ecx, 36(%r15)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	12(%rcx), %ecx
	movl	%ecx, 32(%r15)
	movq	_NUM_ACCESS_CATEGORIES_COPY@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	movq	%rbx, %r8
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jle	LBB0_9
## %bb.3:
	movl	$-1, %r13d
	movl	$1, %ebx
	testq	%rax, %rax
	je	LBB0_6
	.p2align	4, 0x90
LBB0_5:
	leal	-1(%rbx), %edi
	movq	%r15, %r12
	movl	(%r8), %r15d
	callq	_BIT
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movl	(%r14), %ecx
	movq	_WL1271_PSD_UPSD_TRIGGER@GOTPCREL(%rip), %rdx
	testl	%r15d, %eax
	movq	%r12, %r15
	jne	LBB0_7
LBB0_6:
	movq	_WL1271_PSD_LEGACY@GOTPCREL(%rip), %rdx
LBB0_7:
	movl	(%rdx), %eax
	movq	24(%r15), %rdx
	addl	%r13d, %ecx
	movslq	%ecx, %rcx
	movl	%eax, (%rdx,%rcx,4)
	movl	(%r14), %ecx
	cmpl	%ecx, %ebx
	jge	LBB0_9
## %bb.8:
	movq	32(%r8), %rax
	decl	%r13d
	incl	%ebx
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_6
LBB0_9:
	movq	8(%r8), %rax
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rdx
	movl	(%rax,%rdx,4), %esi
	cmpq	$0, 24(%r8)
	je	LBB0_11
## %bb.10:
	movq	16(%r8), %rax
	movq	_HW_HT_RATES_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	(%rax), %edi
	movl	4(%rax), %eax
	shll	%cl, %edi
	movq	_HW_MIMO_RATES_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%esi, %edi
	orl	%eax, %edi
	movl	%edi, %esi
LBB0_11:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	_DEBUG_CMD@GOTPCREL(%rip), %rbx
	movq	%r14, %rdi
	callq	_wl1271_tx_enabled_rates_get
	movl	%eax, %edi
	callq	_cpu_to_le32
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movl	(%rbx), %edi
	movl	8(%r12), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_wl1271_debug
	movl	8(%r12), %edi
	callq	_cpu_to_le32
	movq	%rax, 16(%r15)
LBB0_13:
	movl	(%rbx), %edi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_wl1271_debug
	movq	_CMD_ADD_PEER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	movl	$56, %ecx
	xorl	%r8d, %r8d
	callq	_wl1271_cmd_send
	movl	%eax, %r14d
	testl	%eax, %eax
	jns	LBB0_15
## %bb.14:
	leaq	L_.str.3(%rip), %rdi
	callq	_wl1271_error
LBB0_15:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_16
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEBUG_CMD,4,2                  ## @DEBUG_CMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cmd add peer %d"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_WL1271_AP_BSS_INDEX,4,2        ## @WL1271_AP_BSS_INDEX
	.comm	_NUM_ACCESS_CATEGORIES_COPY,4,2 ## @NUM_ACCESS_CATEGORIES_COPY
	.comm	_WL1271_PSD_UPSD_TRIGGER,4,2    ## @WL1271_PSD_UPSD_TRIGGER
	.comm	_WL1271_PSD_LEGACY,4,2          ## @WL1271_PSD_LEGACY
	.comm	_HW_HT_RATES_OFFSET,4,2         ## @HW_HT_RATES_OFFSET
	.comm	_HW_MIMO_RATES_OFFSET,4,2       ## @HW_MIMO_RATES_OFFSET
L_.str.1:                               ## @.str.1
	.asciz	"peer has no supported rates yet, configuring basic rates: 0x%x"

L_.str.2:                               ## @.str.2
	.asciz	"new peer rates=0x%x queues=0x%x"

	.comm	_CMD_ADD_PEER,4,2               ## @CMD_ADD_PEER
L_.str.3:                               ## @.str.3
	.asciz	"failed to initiate cmd add peer"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wl12xx_cmd_add_peer            ; -- Begin function wl12xx_cmd_add_peer
	.p2align	2
_wl12xx_cmd_add_peer:                   ; @wl12xx_cmd_add_peer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _DEBUG_CMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEBUG_CMD@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_wl1271_debug
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_14
; %bb.1:
	mov	x20, x0
	ldr	w0, [x0, #52]
	ldr	w1, [x21, #48]
Lloh8:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	bl	_memcpy
Lloh11:
	adrp	x8, _WL1271_AP_BSS_INDEX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WL1271_AP_BSS_INDEX@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x20, #48]
	str	x23, [x20]
	ldr	d0, [x21, #40]
	str	d0, [x20, #40]
	ldr	x9, [x21, #32]
	cmp	x9, #0
	cset	w8, ne
	str	w8, [x20, #8]
	ldr	x8, [x19]
	ldr	w8, [x8, x23, lsl #2]
	ldr	w10, [x22, #12]
	stp	w10, w8, [x20, #32]
Lloh14:
	adrp	x23, _NUM_ACCESS_CATEGORIES_COPY@GOTPAGE
Lloh15:
	ldr	x23, [x23, _NUM_ACCESS_CATEGORIES_COPY@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.2:
	mov	w25, #-1
	mov	w26, #1
Lloh16:
	adrp	x27, _WL1271_PSD_LEGACY@GOTPAGE
Lloh17:
	ldr	x27, [x27, _WL1271_PSD_LEGACY@GOTPAGEOFF]
Lloh18:
	adrp	x28, _WL1271_PSD_UPSD_TRIGGER@GOTPAGE
Lloh19:
	ldr	x28, [x28, _WL1271_PSD_UPSD_TRIGGER@GOTPAGEOFF]
	cbz	x9, LBB0_4
LBB0_3:
	sub	w0, w26, #1
	ldr	w24, [x21]
	bl	_BIT
	ldr	w8, [x23]
	mov	x9, x28
	tst	w0, w24
	b.ne	LBB0_5
LBB0_4:
	mov	x9, x27
LBB0_5:
	ldr	w9, [x9]
	ldr	x10, [x20, #24]
	add	w8, w8, w25
	str	w9, [x10, w8, sxtw #2]
	ldr	w8, [x23]
	cmp	w26, w8
	b.ge	LBB0_7
; %bb.6:
	ldr	x9, [x21, #32]
	sub	w25, w25, #1
	add	w26, w26, #1
	cbnz	x9, LBB0_3
	b	LBB0_4
LBB0_7:
	ldr	x8, [x21, #8]
	ldr	x2, [x22]
	ldr	w1, [x8, x2, lsl #2]
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	x8, [x21, #16]
Lloh20:
	adrp	x9, _HW_HT_RATES_OFFSET@GOTPAGE
Lloh21:
	ldr	x9, [x9, _HW_HT_RATES_OFFSET@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	ldp	w10, w8, [x8]
	lsl	w9, w10, w9
Lloh23:
	adrp	x10, _HW_MIMO_RATES_OFFSET@GOTPAGE
Lloh24:
	ldr	x10, [x10, _HW_MIMO_RATES_OFFSET@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	lsl	w8, w8, w10
	orr	w9, w9, w1
	orr	w1, w9, w8
LBB0_9:
Lloh26:
	adrp	x23, _DEBUG_CMD@GOTPAGE
Lloh27:
	ldr	x23, [x23, _DEBUG_CMD@GOTPAGEOFF]
	mov	x0, x19
	bl	_wl1271_tx_enabled_rates_get
	bl	_cpu_to_le32
	mov	x2, x0
	str	x0, [x20, #16]
	cbnz	x0, LBB0_11
; %bb.10:
	ldr	w0, [x23]
	ldr	w2, [x22, #8]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wl1271_debug
	ldr	w0, [x22, #8]
	bl	_cpu_to_le32
	mov	x2, x0
	str	x0, [x20, #16]
LBB0_11:
	ldr	w0, [x23]
	ldr	w8, [x21]
	str	x8, [sp]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_wl1271_debug
Lloh32:
	adrp	x8, _CMD_ADD_PEER@GOTPAGE
Lloh33:
	ldr	x8, [x8, _CMD_ADD_PEER@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #56
	mov	w4, #0
	bl	_wl1271_cmd_send
	mov	x19, x0
	tbz	w0, #31, LBB0_13
; %bb.12:
Lloh35:
	adrp	x0, l_.str.3@PAGE
Lloh36:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_wl1271_error
LBB0_13:
	mov	x0, x20
	bl	_kfree
	b	LBB0_15
LBB0_14:
Lloh37:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_15:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_DEBUG_CMD,4,2                  ; @DEBUG_CMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cmd add peer %d"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_WL1271_AP_BSS_INDEX,4,2        ; @WL1271_AP_BSS_INDEX
	.comm	_NUM_ACCESS_CATEGORIES_COPY,4,2 ; @NUM_ACCESS_CATEGORIES_COPY
	.comm	_WL1271_PSD_UPSD_TRIGGER,4,2    ; @WL1271_PSD_UPSD_TRIGGER
	.comm	_WL1271_PSD_LEGACY,4,2          ; @WL1271_PSD_LEGACY
	.comm	_HW_HT_RATES_OFFSET,4,2         ; @HW_HT_RATES_OFFSET
	.comm	_HW_MIMO_RATES_OFFSET,4,2       ; @HW_MIMO_RATES_OFFSET
l_.str.1:                               ; @.str.1
	.asciz	"peer has no supported rates yet, configuring basic rates: 0x%x"

l_.str.2:                               ; @.str.2
	.asciz	"new peer rates=0x%x queues=0x%x"

	.comm	_CMD_ADD_PEER,4,2               ; @CMD_ADD_PEER
l_.str.3:                               ; @.str.3
	.asciz	"failed to initiate cmd add peer"

.subsections_via_symbols
