	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libipw_rx_frame_decrypt
_libipw_rx_frame_decrypt:               ## @libipw_rx_frame_decrypt
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r12d, %r12d
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.1:
	movq	%rdx, %rbx
	movq	8(%rdx), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %r14
	movl	4(%r14), %edi
	callq	_le16_to_cpu
	movl	%eax, %edi
	callq	_libipw_get_hdrlen
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_atomic_inc
	movq	8(%rbx), %rax
	movl	4(%rbx), %edx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	*(%rax)
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_atomic_dec
	testl	%r12d, %r12d
	jns	LBB0_6
## %bb.3:
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_LIBIPW_DEBUG_DROP
	cmpl	$-2, %r12d
	jne	LBB0_5
## %bb.4:
	movq	(%r15), %rax
	movslq	%r13d, %rcx
	movl	12(%rax,%rcx,4), %esi
	sarl	$6, %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_LIBIPW_DEBUG_DROP
LBB0_5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	(%rax)
	movl	$-1, %r12d
LBB0_6:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"decryption failed (SA=%pM) res=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Decryption failed ICV mismatch (key %d)\n"

	.no_dead_strip	_libipw_rx_frame_decrypt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libipw_rx_frame_decrypt
_libipw_rx_frame_decrypt:               ; @libipw_rx_frame_decrypt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	x2, LBB0_6
; %bb.1:
	mov	x22, x2
	ldr	x8, [x2, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.2:
	mov	x20, x1
	mov	x19, x0
	ldr	x24, [x1]
	ldr	w0, [x24, #4]
	bl	_le16_to_cpu
	bl	_libipw_get_hdrlen
	mov	x21, x0
	mov	x0, x22
	bl	_atomic_inc
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
	ldr	w2, [x22, #4]
	mov	x0, x20
	mov	x1, x21
	blr	x8
	mov	x23, x0
	mov	x0, x22
	bl	_atomic_dec
	tbz	w23, #31, LBB0_7
; %bb.3:
	ldr	w1, [x24]
	str	x23, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_LIBIPW_DEBUG_DROP
	cmn	w23, #2
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x20]
	add	w9, w21, #3
	ldr	w8, [x8, w9, sxtw #2]
	asr	w1, w8, #6
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LIBIPW_DEBUG_DROP
LBB0_5:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	w23, #-1
	b	LBB0_7
LBB0_6:
	mov	w23, #0
LBB0_7:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"decryption failed (SA=%pM) res=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Decryption failed ICV mismatch (key %d)\n"

	.no_dead_strip	_libipw_rx_frame_decrypt
.subsections_via_symbols
