	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_mvm_binding_cmd
_iwl_mvm_binding_cmd:                   ## @iwl_mvm_binding_cmd
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	24(%rdx), %r13
	leaq	-104(%rbp), %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	(%r15), %rdi
	movq	_IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_fw_has_capa
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	8(%r13), %rax
	movq	(%rax), %rax
	movq	_NL80211_BAND_2GHZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_iwl_mvm_is_cdb_supported
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movq	_IWL_LMAC_5G_INDEX@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_IWL_LMAC_24G_INDEX@GOTPCREL(%rip), %rax
LBB0_4:
	movq	(%rax), %rdi
	callq	_cpu_to_le32
	movq	%rax, -72(%rbp)
	movl	$40, -44(%rbp)                  ## 4-byte Folded Spill
	jmp	LBB0_7
LBB0_6:
	movq	_IWL_BINDING_CMD_SIZE_V1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_7:
	movl	(%r13), %esi
	movl	4(%r13), %edi
	callq	_FW_CMD_ID_AND_COLOR
	movq	%rax, %rdi
	callq	_cpu_to_le32
	movq	%rax, -80(%rbp)
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_cpu_to_le32
	movq	%rax, -88(%rbp)
	movl	(%r13), %esi
	movl	4(%r13), %edi
	callq	_FW_CMD_ID_AND_COLOR
	movq	%rax, %rdi
	callq	_cpu_to_le32
	movq	%rax, -96(%rbp)
	movq	_MAX_MACS_IN_BINDING@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_10
## %bb.8:
	xorl	%ebx, %ebx
	movq	_FW_CTXT_INVALID@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	callq	_cpu_to_le32
	movq	-104(%rbp), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	cmpl	$0, (%r14)
	jle	LBB0_13
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	16(%r14), %rcx
	movl	(%rcx,%rbx,4), %edi
	movl	(%rax,%rbx,4), %esi
	callq	_FW_CMD_ID_AND_COLOR
	movq	%rax, %rdi
	callq	_cpu_to_le32
	movq	-104(%rbp), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_12
LBB0_13:
	movq	$0, -56(%rbp)
	movq	_BINDING_CONTEXT_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-104(%rbp), %rcx
	leaq	-56(%rbp), %r8
	movq	%r15, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_iwl_mvm_send_cmd_pdu_status
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_IWL_ERR
	jmp	LBB0_18
LBB0_15:
	movq	-56(%rbp), %rdx
	testq	%rdx, %rdx
	je	LBB0_16
## %bb.17:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_IWL_ERR
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_16:
	xorl	%ebx, %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT,4,2 ## @IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT
	.comm	_NL80211_BAND_2GHZ,8,3          ## @NL80211_BAND_2GHZ
	.comm	_IWL_LMAC_24G_INDEX,8,3         ## @IWL_LMAC_24G_INDEX
	.comm	_IWL_LMAC_5G_INDEX,8,3          ## @IWL_LMAC_5G_INDEX
	.comm	_IWL_BINDING_CMD_SIZE_V1,4,2    ## @IWL_BINDING_CMD_SIZE_V1
	.comm	_MAX_MACS_IN_BINDING,4,2        ## @MAX_MACS_IN_BINDING
	.comm	_FW_CTXT_INVALID,8,3            ## @FW_CTXT_INVALID
	.comm	_BINDING_CONTEXT_CMD,4,2        ## @BINDING_CONTEXT_CMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to send binding (action:%d): %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Binding command failed: %u\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_iwl_mvm_binding_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_mvm_binding_cmd
_iwl_mvm_binding_cmd:                   ; @iwl_mvm_binding_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x23, [x2, #24]
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldr	x0, [x19]
Lloh0:
	adrp	x8, _IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_fw_has_capa
	cbz	x0, LBB0_6
; %bb.1:
	ldr	x8, [x23, #8]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _NL80211_BAND_2GHZ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NL80211_BAND_2GHZ@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_iwl_mvm_is_cdb_supported
	cbz	w0, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _IWL_LMAC_5G_INDEX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IWL_LMAC_5G_INDEX@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _IWL_LMAC_24G_INDEX@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IWL_LMAC_24G_INDEX@GOTPAGEOFF]
LBB0_5:
	ldr	x0, [x8]
	bl	_cpu_to_le32
	str	x0, [sp, #56]
	mov	w22, #40
	b	LBB0_7
LBB0_6:
Lloh10:
	adrp	x8, _IWL_BINDING_CMD_SIZE_V1@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IWL_BINDING_CMD_SIZE_V1@GOTPAGEOFF]
Lloh12:
	ldr	w22, [x8]
LBB0_7:
	ldp	w1, w0, [x23]
	bl	_FW_CMD_ID_AND_COLOR
	bl	_cpu_to_le32
	str	x0, [sp, #48]
	mov	x0, x20
	bl	_cpu_to_le32
	str	x0, [sp, #40]
	ldp	w1, w0, [x23]
	bl	_FW_CMD_ID_AND_COLOR
	bl	_cpu_to_le32
	str	x0, [sp, #32]
Lloh13:
	adrp	x23, _MAX_MACS_IN_BINDING@GOTPAGE
Lloh14:
	ldr	x23, [x23, _MAX_MACS_IN_BINDING@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x24, #0
Lloh15:
	adrp	x25, _FW_CTXT_INVALID@GOTPAGE
Lloh16:
	ldr	x25, [x25, _FW_CTXT_INVALID@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	bl	_cpu_to_le32
	ldr	x8, [sp, #24]
	str	x0, [x8, x24, lsl #3]
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.lt	LBB0_9
LBB0_10:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x23, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	lsl	x8, x23, #2
	ldp	x10, x9, [x21, #8]
	ldr	w0, [x9, x8]
	ldr	w1, [x10, x8]
	bl	_FW_CMD_ID_AND_COLOR
	bl	_cpu_to_le32
	ldr	x8, [sp, #24]
	str	x0, [x8, x23, lsl #3]
	add	x23, x23, #1
	ldrsw	x8, [x21]
	cmp	x23, x8
	b.lt	LBB0_12
LBB0_13:
	str	xzr, [sp, #16]
Lloh17:
	adrp	x8, _BINDING_CONTEXT_CMD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BINDING_CONTEXT_CMD@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	add	x3, sp, #24
	add	x4, sp, #16
	mov	x0, x19
	mov	x2, x22
	bl	_iwl_mvm_send_cmd_pdu_status
	cbz	w0, LBB0_15
; %bb.14:
	mov	x21, x0
	str	x21, [sp]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_IWL_ERR
	b	LBB0_18
LBB0_15:
	ldr	x2, [sp, #16]
	cbz	x2, LBB0_17
; %bb.16:
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_ERR
Lloh24:
	adrp	x8, _EIO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_18
LBB0_17:
	mov	w21, #0
LBB0_18:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT,4,2 ; @IWL_UCODE_TLV_CAPA_BINDING_CDB_SUPPORT
	.comm	_NL80211_BAND_2GHZ,8,3          ; @NL80211_BAND_2GHZ
	.comm	_IWL_LMAC_24G_INDEX,8,3         ; @IWL_LMAC_24G_INDEX
	.comm	_IWL_LMAC_5G_INDEX,8,3          ; @IWL_LMAC_5G_INDEX
	.comm	_IWL_BINDING_CMD_SIZE_V1,4,2    ; @IWL_BINDING_CMD_SIZE_V1
	.comm	_MAX_MACS_IN_BINDING,4,2        ; @MAX_MACS_IN_BINDING
	.comm	_FW_CTXT_INVALID,8,3            ; @FW_CTXT_INVALID
	.comm	_BINDING_CONTEXT_CMD,4,2        ; @BINDING_CONTEXT_CMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to send binding (action:%d): %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Binding command failed: %u\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_iwl_mvm_binding_cmd
.subsections_via_symbols
