	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tkip_encrypt_skb
_tkip_encrypt_skb:                      ## @tkip_encrypt_skb
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rsi), %rbx
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_IEEE80211_SKB_CB
	movq	%rax, %r12
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	(%rax), %eax
	movq	_IEEE80211_KEY_FLAG_GENERATE_IV@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.2:
	movq	_IEEE80211_KEY_FLAG_PUT_IV_SPACE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
LBB0_4:
	movl	(%rbx), %edi
	callq	_ieee80211_hdrlen
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	cmpq	$0, (%r12)
	movq	_TKIP_ICV_LEN@GOTPCREL(%rip), %rax
	jne	LBB0_6
## %bb.5:
	movl	(%rax), %ebx
LBB0_6:
	movl	(%r14), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_skb_tailroom
	movl	$1, %edi
	cmpl	%ebx, %eax
	jl	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_skb_headroom
	movq	_TKIP_IV_LEN@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setl	%dil
LBB0_8:
	callq	_WARN_ON
	movq	%rax, %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	je	LBB0_9
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_TKIP_IV_LEN@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_skb_push
	movq	%rax, %r13
	movq	(%rbx), %rax
	leaq	(,%rax,4), %rsi
	addq	%r13, %rsi
	movq	%r13, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_memmove
	movq	%r14, %rdi
	callq	_skb_network_offset
	addq	(%rbx), %rax
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_skb_set_network_header
	movq	(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.10:
	movq	_IEEE80211_KEY_FLAG_PUT_IV_SPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%eax, %eax
	testl	%edx, (%rcx)
	jne	LBB0_14
LBB0_11:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	leaq	(%r13,%rax,4), %r13
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_spin_lock
	incq	8(%rbx)
	jne	LBB0_13
## %bb.12:
	incl	16(%rbx)
LBB0_13:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_ieee80211_tkip_add_iv
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_spin_unlock
	xorl	%eax, %eax
	cmpq	$0, (%r12)
	jne	LBB0_14
## %bb.15:
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	subl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	_TKIP_ICV_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_skb_put
	movq	(%r15), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	movq	%r13, %rcx
	movl	%ebx, %r8d
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ieee80211_tkip_encrypt_data    ## TAILCALL
LBB0_3:
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_KEY_FLAG_GENERATE_IV,4,2 ## @IEEE80211_KEY_FLAG_GENERATE_IV
	.comm	_IEEE80211_KEY_FLAG_PUT_IV_SPACE,4,2 ## @IEEE80211_KEY_FLAG_PUT_IV_SPACE
	.comm	_TKIP_ICV_LEN,4,2               ## @TKIP_ICV_LEN
	.comm	_TKIP_IV_LEN,8,3                ## @TKIP_IV_LEN
	.no_dead_strip	_tkip_encrypt_skb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tkip_encrypt_skb
_tkip_encrypt_skb:                      ; @tkip_encrypt_skb
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x21, x0
	ldr	x23, [x1, #8]
	ldr	x20, [x0, #8]
	mov	x0, x1
	bl	_IEEE80211_SKB_CB
	mov	x22, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_GENERATE_IV@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x9, _IEEE80211_KEY_FLAG_PUT_IV_SPACE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_PUT_IV_SPACE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
LBB0_3:
	ldr	w0, [x23]
	bl	_ieee80211_hdrlen
	mov	x23, x0
	ldr	w26, [x19]
	ldr	x8, [x22]
Lloh6:
	adrp	x25, _TKIP_ICV_LEN@GOTPAGE
Lloh7:
	ldr	x25, [x25, _TKIP_ICV_LEN@GOTPAGEOFF]
	ldr	w9, [x25]
	cmp	x8, #0
	csel	w24, w9, wzr, eq
	mov	x0, x19
	bl	_skb_tailroom
	cmp	w0, w24
	b.ge	LBB0_6
; %bb.4:
	mov	w0, #1
	bl	_WARN_ON
	cbz	x0, LBB0_7
LBB0_5:
	mov	w0, #-1
	b	LBB0_13
LBB0_6:
	mov	x0, x19
	bl	_skb_headroom
Lloh8:
	adrp	x8, _TKIP_IV_LEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TKIP_IV_LEN@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, lt
	bl	_WARN_ON
	cbnz	x0, LBB0_5
LBB0_7:
Lloh11:
	adrp	x27, _TKIP_IV_LEN@GOTPAGE
Lloh12:
	ldr	x27, [x27, _TKIP_IV_LEN@GOTPAGEOFF]
	ldr	x1, [x27]
	mov	x0, x19
	bl	_skb_push
	mov	x24, x0
	ldr	x8, [x27]
	add	x1, x0, x8, lsl #2
	mov	x2, x23
	bl	_memmove
	mov	x0, x19
	bl	_skb_network_offset
	ldr	x8, [x27]
	add	x1, x8, x0
	mov	x0, x19
	bl	_skb_set_network_header
	ldr	x8, [x22]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _IEEE80211_KEY_FLAG_PUT_IV_SPACE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _IEEE80211_KEY_FLAG_PUT_IV_SPACE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_12
LBB0_9:
	add	x24, x24, w23, uxtw #2
	mov	x0, x20
	bl	_spin_lock
	ldr	x8, [x20, #8]
	adds	x8, x8, #1
	str	x8, [x20, #8]
	b.lo	LBB0_11
; %bb.10:
	ldr	w8, [x20, #16]
	add	w8, w8, #1
	str	w8, [x20, #16]
LBB0_11:
	mov	x0, x24
	mov	x1, x20
	bl	_ieee80211_tkip_add_iv
	mov	x24, x0
	mov	x0, x20
	bl	_spin_unlock
	ldr	x8, [x22]
	cbz	x8, LBB0_14
LBB0_12:
	mov	w0, #0
LBB0_13:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_14:
	sub	w22, w26, w23
	ldr	w1, [x25]
	mov	x0, x19
	bl	_skb_put
	ldr	x8, [x21]
	ldr	w0, [x8]
	mov	x1, x20
	mov	x2, x19
	mov	x3, x24
	mov	x4, x22
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_ieee80211_tkip_encrypt_data
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_KEY_FLAG_GENERATE_IV,4,2 ; @IEEE80211_KEY_FLAG_GENERATE_IV
	.comm	_IEEE80211_KEY_FLAG_PUT_IV_SPACE,4,2 ; @IEEE80211_KEY_FLAG_PUT_IV_SPACE
	.comm	_TKIP_ICV_LEN,4,2               ; @TKIP_ICV_LEN
	.comm	_TKIP_IV_LEN,8,3                ; @TKIP_IV_LEN
	.no_dead_strip	_tkip_encrypt_skb
.subsections_via_symbols
