	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il3945_build_tx_cmd_hwcrypto
_il3945_build_tx_cmd_hwcrypto:          ## @il3945_build_tx_cmd_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	(%rdx), %rdx
	movq	(%rdi), %rax
	movslq	%r8d, %rcx
	movl	$0, (%rdx)
	leaq	(%rcx,%rcx,2), %rbx
	movl	(%rax,%rbx,4), %esi
	leal	-128(%rsi), %ecx
	cmpl	$3, %ecx
	ja	LBB0_5
## %bb.1:
	xorl	%esi, %esi
	leaq	LJTI0_0(%rip), %rdi
	movslq	(%rdi,%rcx,4), %rcx
	addq	%rdi, %rcx
	jmpq	*%rcx
LBB0_3:
	movq	_TX_CMD_SEC_KEY128@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%esi, (%rdx)
LBB0_4:
	movq	_TX_CMD_SEC_WEP@GOTPCREL(%rip), %r8
	movq	(%r14), %rcx
	movq	_TX_CMD_SEC_MSK@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	(%rcx), %edi
	movq	_TX_CMD_SEC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edi
	orl	(%r8), %edi
	orl	%esi, %edi
	movl	%edi, (%rdx)
	movq	8(%rdx), %rdi
	addq	$12, %rdi
	movl	4(%rax,%rbx,4), %edx
	movl	8(%rax,%rbx,4), %esi
	callq	_memcpy
	movq	(%r14), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_D_TX                           ## TAILCALL
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_IL_ERR                         ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	_TX_CMD_SEC_CCM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rdx)
	movq	8(%rdx), %rdi
	movl	4(%rax,%rbx,4), %edx
	movl	8(%rax,%rbx,4), %esi
	callq	_memcpy
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_D_TX                           ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_6
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_TX_CMD_SEC_CCM,4,2             ## @TX_CMD_SEC_CCM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx_cmd with AES 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.1:                               ## @.str.1
	.asciz	"Configuring packet for WEP encryption with key %d\n"

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

	.no_dead_strip	_il3945_build_tx_cmd_hwcrypto
.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_hwcrypto
_il3945_build_tx_cmd_hwcrypto:          ; @il3945_build_tx_cmd_hwcrypto
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
                                        ; kill: def $w4 killed $w4 def $x4
	mov	x19, x1
	ldr	x9, [x2]
	ldr	x8, [x0]
	str	wzr, [x9]
	mov	w10, #12
	smull	x10, w4, w10
	ldr	w1, [x8, x10]
	sub	w12, w1, #128
	cmp	w12, #3
	b.hi	LBB0_5
; %bb.1:
	mov	w11, #0
	sxtw	x10, w4
Lloh0:
	adrp	x13, lJTI0_0@PAGE
Lloh1:
	add	x13, x13, lJTI0_0@PAGEOFF
	adr	x14, LBB0_2
	ldrb	w15, [x13, x12]
	add	x14, x14, x15, lsl #2
	br	x14
LBB0_2:
Lloh2:
	adrp	x11, _TX_CMD_SEC_KEY128@GOTPAGE
Lloh3:
	ldr	x11, [x11, _TX_CMD_SEC_KEY128@GOTPAGEOFF]
Lloh4:
	ldr	w11, [x11]
	str	w11, [x9]
LBB0_3:
Lloh5:
	adrp	x12, _TX_CMD_SEC_WEP@GOTPAGE
Lloh6:
	ldr	x12, [x12, _TX_CMD_SEC_WEP@GOTPAGEOFF]
	ldr	x13, [x19]
	ldr	w13, [x13]
Lloh7:
	adrp	x14, _TX_CMD_SEC_MSK@GOTPAGE
Lloh8:
	ldr	x14, [x14, _TX_CMD_SEC_MSK@GOTPAGEOFF]
Lloh9:
	ldr	w14, [x14]
	and	w13, w14, w13
Lloh10:
	adrp	x14, _TX_CMD_SEC_SHIFT@GOTPAGE
Lloh11:
	ldr	x14, [x14, _TX_CMD_SEC_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w12, [x12]
Lloh13:
	ldr	w14, [x14]
	lsl	w13, w13, w14
	orr	w12, w13, w12
	orr	w11, w12, w11
	str	w11, [x9]
	ldr	x9, [x9, #8]
	add	x0, x9, #12
	mov	w9, #12
	madd	x8, x10, x9, x8
	ldp	w2, w1, [x8, #4]
	bl	_memcpy
	ldr	x8, [x19]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_D_TX
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_IL_ERR
LBB0_6:
Lloh18:
	adrp	x11, _TX_CMD_SEC_CCM@GOTPAGE
Lloh19:
	ldr	x11, [x11, _TX_CMD_SEC_CCM@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	str	w11, [x9]
	ldr	x0, [x9, #8]
	mov	w9, #12
	madd	x8, x10, x9, x8
	ldp	w2, w1, [x8, #4]
	bl	_memcpy
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_D_TX
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.comm	_TX_CMD_SEC_CCM,4,2             ; @TX_CMD_SEC_CCM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx_cmd with AES 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.1:                               ; @.str.1
	.asciz	"Configuring packet for WEP encryption with key %d\n"

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

	.no_dead_strip	_il3945_build_tx_cmd_hwcrypto
.subsections_via_symbols
