	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il4965_tx_cmd_build_hwcrypto
_il4965_tx_cmd_build_hwcrypto:          ## @il4965_tx_cmd_build_hwcrypto
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	8(%rsi), %rbx
	movl	(%rbx), %esi
	leal	-128(%rsi), %eax
	cmpl	$3, %eax
	ja	LBB0_10
## %bb.1:
	movq	%rdx, %r14
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rax,4), %rax
	addq	%rdx, %rax
	jmpq	*%rax
LBB0_2:
	movl	(%r14), %eax
	jmp	LBB0_9
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IL_ERR                         ## TAILCALL
LBB0_8:
	movq	_TX_CMD_SEC_KEY128@GOTPCREL(%rip), %rcx
	movl	(%r14), %eax
	orl	(%rcx), %eax
	movl	%eax, (%r14)
LBB0_9:
	movq	_TX_CMD_SEC_WEP@GOTPCREL(%rip), %rdx
	movq	_TX_CMD_SEC_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	4(%rbx), %esi
	movq	_TX_CMD_SEC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	(%rdx), %esi
	orl	%eax, %esi
	movl	%esi, (%r14)
	movq	8(%r14), %rdi
	addq	$12, %rdi
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	callq	_memcpy
	movl	4(%rbx), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_D_TX                           ## TAILCALL
LBB0_7:
	movq	_TX_CMD_SEC_TKIP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	8(%r14), %rdx
	movq	%rbx, %rdi
	movq	%rcx, %rsi
	callq	_ieee80211_get_tkip_p2k
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_3:
	movq	_TX_CMD_SEC_CCM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	8(%r14), %rdi
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	callq	_memcpy
	movq	_IEEE80211_TX_CTL_AMPDU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_5
## %bb.4:
	movq	_TX_CMD_FLG_AGG_CCMP_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r14)
LBB0_5:
	leaq	L_.str(%rip), %rdi
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_D_TX                           ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_8
	.long	L0_0_set_7
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	_TX_CMD_SEC_CCM,4,2             ## @TX_CMD_SEC_CCM
	.comm	_IEEE80211_TX_CTL_AMPDU,4,2     ## @IEEE80211_TX_CTL_AMPDU
	.comm	_TX_CMD_FLG_AGG_CCMP_MSK,4,2    ## @TX_CMD_FLG_AGG_CCMP_MSK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx_cmd with AES hwcrypto\n"

	.comm	_TX_CMD_SEC_TKIP,4,2            ## @TX_CMD_SEC_TKIP
L_.str.1:                               ## @.str.1
	.asciz	"tx_cmd with tkip hwcrypto\n"

	.comm	_TX_CMD_SEC_KEY128,4,2          ## @TX_CMD_SEC_KEY128
	.comm	_TX_CMD_SEC_WEP,4,2             ## @TX_CMD_SEC_WEP
	.comm	_TX_CMD_SEC_MSK,4,2             ## @TX_CMD_SEC_MSK
	.comm	_TX_CMD_SEC_SHIFT,4,2           ## @TX_CMD_SEC_SHIFT
L_.str.2:                               ## @.str.2
	.asciz	"Configuring packet for WEP encryption with key %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Unknown encode cipher %x\n"

	.no_dead_strip	_il4965_tx_cmd_build_hwcrypto
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il4965_tx_cmd_build_hwcrypto
_il4965_tx_cmd_build_hwcrypto:          ; @il4965_tx_cmd_build_hwcrypto
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	ldr	x20, [x1, #8]
	ldr	w1, [x20]
	sub	w8, w1, #128
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.1:
	mov	x19, x2
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w8, [x19]
	b	LBB0_5
LBB0_3:
Lloh2:
	adrp	x0, l_.str.3@PAGE
Lloh3:
	add	x0, x0, l_.str.3@PAGEOFF
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_IL_ERR
LBB0_4:
Lloh4:
	adrp	x8, _TX_CMD_SEC_KEY128@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TX_CMD_SEC_KEY128@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_5:
Lloh7:
	adrp	x9, _TX_CMD_SEC_MSK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TX_CMD_SEC_MSK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	adrp	x10, _TX_CMD_SEC_SHIFT@GOTPAGE
Lloh11:
	ldr	x10, [x10, _TX_CMD_SEC_SHIFT@GOTPAGEOFF]
	ldp	w11, w2, [x20, #4]
	and	w9, w9, w11
Lloh12:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh13:
	adrp	x10, _TX_CMD_SEC_WEP@GOTPAGE
Lloh14:
	ldr	x10, [x10, _TX_CMD_SEC_WEP@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w9, w9, w10
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	x8, [x19, #8]
	add	x0, x8, #12
	ldr	w1, [x20, #12]
	bl	_memcpy
	ldr	w8, [x20, #4]
	str	x8, [sp]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_D_TX
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_6:
Lloh18:
	adrp	x8, _TX_CMD_SEC_TKIP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TX_CMD_SEC_TKIP@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x2, [x19, #8]
	mov	x0, x20
	mov	x1, x3
	bl	_ieee80211_get_tkip_p2k
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_7:
Lloh23:
	adrp	x8, _TX_CMD_SEC_CCM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TX_CMD_SEC_CCM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x0, [x19, #8]
	ldp	w2, w1, [x20, #8]
	bl	_memcpy
	ldr	w8, [x21]
Lloh26:
	adrp	x9, _IEEE80211_TX_CTL_AMPDU@GOTPAGE
Lloh27:
	ldr	x9, [x9, _IEEE80211_TX_CTL_AMPDU@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh29:
	adrp	x8, _TX_CMD_FLG_AGG_CCMP_MSK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _TX_CMD_FLG_AGG_CCMP_MSK@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
LBB0_9:
Lloh32:
	adrp	x0, l_.str@PAGE
Lloh33:
	add	x0, x0, l_.str@PAGEOFF
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_D_TX
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
                                        ; -- End function
	.comm	_TX_CMD_SEC_CCM,4,2             ; @TX_CMD_SEC_CCM
	.comm	_IEEE80211_TX_CTL_AMPDU,4,2     ; @IEEE80211_TX_CTL_AMPDU
	.comm	_TX_CMD_FLG_AGG_CCMP_MSK,4,2    ; @TX_CMD_FLG_AGG_CCMP_MSK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx_cmd with AES hwcrypto\n"

	.comm	_TX_CMD_SEC_TKIP,4,2            ; @TX_CMD_SEC_TKIP
l_.str.1:                               ; @.str.1
	.asciz	"tx_cmd with tkip hwcrypto\n"

	.comm	_TX_CMD_SEC_KEY128,4,2          ; @TX_CMD_SEC_KEY128
	.comm	_TX_CMD_SEC_WEP,4,2             ; @TX_CMD_SEC_WEP
	.comm	_TX_CMD_SEC_MSK,4,2             ; @TX_CMD_SEC_MSK
	.comm	_TX_CMD_SEC_SHIFT,4,2           ; @TX_CMD_SEC_SHIFT
l_.str.2:                               ; @.str.2
	.asciz	"Configuring packet for WEP encryption with key %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Unknown encode cipher %x\n"

	.no_dead_strip	_il4965_tx_cmd_build_hwcrypto
.subsections_via_symbols
