	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwlagn_tx_cmd_build_hwcrypto
_iwlagn_tx_cmd_build_hwcrypto:          ## @iwlagn_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %r15
	movq	8(%rsi), %rbx
	movl	(%rbx), %edx
	leal	-128(%rdx), %eax
	cmpl	$3, %eax
	ja	LBB0_9
## %bb.1:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rax,4), %rax
	addq	%rdx, %rax
	jmpq	*%rax
LBB0_2:
	movl	(%r14), %eax
	jmp	LBB0_8
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IWL_ERR                        ## TAILCALL
LBB0_7:
	movq	_TX_CMD_SEC_KEY128@GOTPCREL(%rip), %rcx
	movl	(%r14), %eax
	orl	(%rcx), %eax
	movl	%eax, (%r14)
LBB0_8:
	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), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IWL_DEBUG_TX                   ## TAILCALL
LBB0_6:
	movq	_TX_CMD_SEC_TKIP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	8(%r14), %rdx
	movq	%rbx, %rdi
	movq	%rcx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ieee80211_get_tkip_p2k         ## TAILCALL
LBB0_3:
	movq	%rsi, %r12
	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, (%r12)
	je	LBB0_5
## %bb.4:
	movq	_TX_CMD_FLG_AGG_CCMP_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%r14)
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_7
	.long	L0_0_set_6
	.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
	.comm	_TX_CMD_SEC_TKIP,4,2            ## @TX_CMD_SEC_TKIP
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Configuring packet for WEP encryption with key %d\n"

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

	.no_dead_strip	_iwlagn_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 iwlagn_tx_cmd_build_hwcrypto
_iwlagn_tx_cmd_build_hwcrypto:          ; @iwlagn_tx_cmd_build_hwcrypto
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x21, x0
	ldr	x20, [x1, #8]
	ldr	w2, [x20]
	sub	w8, w2, #128
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.1:
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	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_IWL_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	w2, [x20, #4]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_IWL_DEBUG_TX
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
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ieee80211_get_tkip_p2k
LBB0_7:
	mov	x22, x1
Lloh21:
	adrp	x8, _TX_CMD_SEC_CCM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _TX_CMD_SEC_CCM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x0, [x19, #8]
	ldp	w2, w1, [x20, #8]
	bl	_memcpy
	ldr	w8, [x22]
Lloh24:
	adrp	x9, _IEEE80211_TX_CTL_AMPDU@GOTPAGE
Lloh25:
	ldr	x9, [x9, _IEEE80211_TX_CTL_AMPDU@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh27:
	adrp	x8, _TX_CMD_FLG_AGG_CCMP_MSK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _TX_CMD_FLG_AGG_CCMP_MSK@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.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 AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.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
	.comm	_TX_CMD_SEC_TKIP,4,2            ; @TX_CMD_SEC_TKIP
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Configuring packet for WEP encryption with key %d\n"

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

	.no_dead_strip	_iwlagn_tx_cmd_build_hwcrypto
.subsections_via_symbols
