	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il3945_build_tx_cmd_basic
_il3945_build_tx_cmd_basic:             ## @il3945_build_tx_cmd_basic
	.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
	movl	%r8d, %r13d
	movq	%rcx, %r12
	movq	(%rsi), %r15
	movl	16(%r15), %eax
	movl	4(%rcx), %ebx
	movq	_TX_CMD_LIFE_TIME_INFINITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 40(%r15)
	movq	_IEEE80211_TX_CTL_NO_ACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_TX_CMD_FLG_ACK_MSK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r14d
	testl	%ecx, (%rdx)
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.6:
	notl	%r14d
	andl	%r14d, %eax
	movq	_TX_CMD_FLG_SEQ_CTL_MSK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -44(%rbp)
LBB0_7:
	movl	%r13d, (%r15)
	movl	%ebx, %edi
	callq	_ieee80211_has_morefrags
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_TX_CMD_FLG_MORE_FRAG_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -44(%rbp)
LBB0_9:
	movl	%ebx, %edi
	callq	_ieee80211_is_data_qos
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%r12, %rdi
	callq	_ieee80211_get_qos_ctl
	movl	(%rax), %eax
	andl	$15, %eax
	movl	%eax, 4(%r15)
	movq	_TX_CMD_FLG_SEQ_CTL_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	-44(%rbp), %eax
	jmp	LBB0_12
LBB0_1:
	orl	%eax, %r14d
	movl	%r14d, -44(%rbp)
	movl	%ebx, %edi
	callq	_ieee80211_is_mgmt
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_TX_CMD_FLG_SEQ_CTL_MSK@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movl	%r14d, -44(%rbp)
LBB0_3:
	movl	%ebx, %edi
	callq	_ieee80211_is_probe_resp
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movl	(%r12), %edi
	callq	_le16_to_cpu
	testb	$15, %al
	jne	LBB0_7
## %bb.5:
	movq	_TX_CMD_FLG_TSF_MSK@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movl	%r14d, -44(%rbp)
	jmp	LBB0_7
LBB0_11:
	movq	_TX_CMD_FLG_SEQ_CTL_MSK@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %eax
	orl	(%rcx), %eax
LBB0_12:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, -44(%rbp)
	leaq	-44(%rbp), %rcx
	movl	%ebx, %edx
	callq	_il_tx_cmd_protection
	movq	_TX_CMD_FLG_ANT_SEL_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, -44(%rbp)
	movl	%ebx, %edi
	callq	_ieee80211_is_mgmt
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movl	%ebx, %edi
	callq	_ieee80211_is_assoc_req
	movl	$3, %edi
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:
	movl	%ebx, %edi
	callq	_ieee80211_is_reassoc_req
	cmpq	$1, %rax
	movl	$3, %edi
	sbbl	$0, %edi
LBB0_16:
	callq	_cpu_to_le16
	jmp	LBB0_17
LBB0_13:
	xorl	%eax, %eax
LBB0_17:
	movq	%rax, 32(%r15)
	movq	$0, 24(%r15)
	movl	-44(%rbp), %eax
	movl	%eax, 16(%r15)
	movq	$0, 8(%r15)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_CMD_LIFE_TIME_INFINITE,4,2  ## @TX_CMD_LIFE_TIME_INFINITE
	.comm	_IEEE80211_TX_CTL_NO_ACK,4,2    ## @IEEE80211_TX_CTL_NO_ACK
	.comm	_TX_CMD_FLG_ACK_MSK,4,2         ## @TX_CMD_FLG_ACK_MSK
	.comm	_TX_CMD_FLG_SEQ_CTL_MSK,4,2     ## @TX_CMD_FLG_SEQ_CTL_MSK
	.comm	_TX_CMD_FLG_TSF_MSK,4,2         ## @TX_CMD_FLG_TSF_MSK
	.comm	_TX_CMD_FLG_MORE_FRAG_MSK,4,2   ## @TX_CMD_FLG_MORE_FRAG_MSK
	.comm	_TX_CMD_FLG_ANT_SEL_MSK,4,2     ## @TX_CMD_FLG_ANT_SEL_MSK
	.no_dead_strip	_il3945_build_tx_cmd_basic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il3945_build_tx_cmd_basic
_il3945_build_tx_cmd_basic:             ; @il3945_build_tx_cmd_basic
	.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	x23, x4
	mov	x22, x3
	mov	x20, x2
	mov	x21, x0
	ldr	x24, [x1]
	ldr	w8, [x24, #16]
	ldr	w19, [x3, #4]
Lloh0:
	adrp	x9, _TX_CMD_LIFE_TIME_INFINITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TX_CMD_LIFE_TIME_INFINITE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x24, #40]
	ldr	w10, [x2]
Lloh3:
	adrp	x9, _IEEE80211_TX_CTL_NO_ACK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_TX_CTL_NO_ACK@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x9]
Lloh6:
	adrp	x9, _TX_CMD_FLG_ACK_MSK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TX_CMD_FLG_ACK_MSK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x25, _TX_CMD_FLG_SEQ_CTL_MSK@GOTPAGE
Lloh10:
	ldr	x25, [x25, _TX_CMD_FLG_SEQ_CTL_MSK@GOTPAGEOFF]
	tst	w11, w10
	b.eq	LBB0_7
; %bb.1:
	bic	w8, w8, w9
	ldr	w9, [x25]
	orr	w8, w9, w8
LBB0_2:
	str	w8, [sp, #12]
LBB0_3:
	str	w23, [x24]
	mov	x0, x19
	bl	_ieee80211_has_morefrags
	cbz	x0, LBB0_5
; %bb.4:
Lloh11:
	adrp	x8, _TX_CMD_FLG_MORE_FRAG_MSK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TX_CMD_FLG_MORE_FRAG_MSK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	orr	w8, w9, w8
	str	w8, [sp, #12]
LBB0_5:
	mov	x0, x19
	bl	_ieee80211_is_data_qos
	cbz	x0, LBB0_12
; %bb.6:
	mov	x0, x22
	bl	_ieee80211_get_qos_ctl
	ldr	w8, [x0]
	and	w8, w8, #0xf
	str	w8, [x24, #4]
	ldr	w8, [x25]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	b	LBB0_13
LBB0_7:
	orr	w26, w9, w8
	str	w26, [sp, #12]
	mov	x0, x19
	bl	_ieee80211_is_mgmt
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w8, [x25]
	orr	w26, w26, w8
	str	w26, [sp, #12]
LBB0_9:
	mov	x0, x19
	bl	_ieee80211_is_probe_resp
	cbz	x0, LBB0_3
; %bb.10:
	ldr	w0, [x22]
	bl	_le16_to_cpu
	tst	w0, #0xf
	b.ne	LBB0_3
; %bb.11:
Lloh14:
	adrp	x8, _TX_CMD_FLG_TSF_MSK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TX_CMD_FLG_TSF_MSK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	orr	w8, w26, w8
	b	LBB0_2
LBB0_12:
	ldr	w8, [x25]
	ldr	w9, [sp, #12]
	orr	w8, w9, w8
LBB0_13:
	str	w8, [sp, #12]
	add	x3, sp, #12
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_il_tx_cmd_protection
Lloh17:
	adrp	x8, _TX_CMD_FLG_ANT_SEL_MSK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TX_CMD_FLG_ANT_SEL_MSK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
	str	w8, [sp, #12]
	mov	x0, x19
	bl	_ieee80211_is_mgmt
	cbz	x0, LBB0_18
; %bb.14:
	mov	x0, x19
	bl	_ieee80211_is_assoc_req
	cbz	x0, LBB0_16
; %bb.15:
	mov	w0, #3
	b	LBB0_17
LBB0_16:
	mov	x0, x19
	bl	_ieee80211_is_reassoc_req
	cmp	x0, #0
	mov	w8, #2
	cinc	w0, w8, ne
LBB0_17:
	bl	_cpu_to_le16
LBB0_18:
	stp	xzr, x0, [x24, #24]
	ldr	w8, [sp, #12]
	str	w8, [x24, #16]
	str	xzr, [x24, #8]
	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
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_CMD_LIFE_TIME_INFINITE,4,2  ; @TX_CMD_LIFE_TIME_INFINITE
	.comm	_IEEE80211_TX_CTL_NO_ACK,4,2    ; @IEEE80211_TX_CTL_NO_ACK
	.comm	_TX_CMD_FLG_ACK_MSK,4,2         ; @TX_CMD_FLG_ACK_MSK
	.comm	_TX_CMD_FLG_SEQ_CTL_MSK,4,2     ; @TX_CMD_FLG_SEQ_CTL_MSK
	.comm	_TX_CMD_FLG_TSF_MSK,4,2         ; @TX_CMD_FLG_TSF_MSK
	.comm	_TX_CMD_FLG_MORE_FRAG_MSK,4,2   ; @TX_CMD_FLG_MORE_FRAG_MSK
	.comm	_TX_CMD_FLG_ANT_SEL_MSK,4,2     ; @TX_CMD_FLG_ANT_SEL_MSK
	.no_dead_strip	_il3945_build_tx_cmd_basic
.subsections_via_symbols
