	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qdm2_decode_fft_packets
_qdm2_decode_fft_packets:               ## @qdm2_decode_fft_packets
	.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
	movq	40(%rdi), %rax
	cmpq	$0, (%rax)
	je	LBB0_48
## %bb.1:
	movq	%rdi, %r15
	movl	$0, (%rdi)
	movq	8(%rdi), %rax
	pcmpeqd	%xmm0, %xmm0
	movdqu	%xmm0, (%rax)
	movl	$-1, 16(%rax)
	movl	16(%rdi), %esi
	testl	%esi, %esi
	jle	LBB0_2
## %bb.7:
	movl	$256, %r13d                     ## imm = 0x100
	xorl	%r14d, %r14d
	jmp	LBB0_8
LBB0_2:
	leaq	24(%r15), %rcx
LBB0_3:
	movl	$1, %edx
	cmpl	$0, 4(%rax)
	js	LBB0_4
LBB0_41:
	movl	8(%rax), %esi
	testl	%esi, %esi
	js	LBB0_43
## %bb.42:
	movq	(%rcx), %rdi
	movl	%edx, %edx
	movl	%esi, (%rdi,%rdx,4)
	movl	$2, %edx
	jmp	LBB0_43
LBB0_34:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	xorl	%esi, %esi
	leaq	-44(%rbp), %rbx
LBB0_35:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdx
	movl	%r12d, %ecx
	callq	_qdm2_fft_decode_tones
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	%r12d, %ecx
	callq	_qdm2_fft_decode_tones
	movq	%r15, %rdi
	movl	$2, %esi
	movq	%rbx, %rdx
	movl	%r12d, %ecx
	callq	_qdm2_fft_decode_tones
	movq	%r15, %rdi
	movl	$3, %esi
	movq	%rbx, %rdx
LBB0_38:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%r12d, %ecx
	callq	_qdm2_fft_decode_tones
LBB0_39:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%r14d
	movl	16(%r15), %esi
	cmpl	%esi, %r14d
	jge	LBB0_25
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	testl	%esi, %esi
	jle	LBB0_48
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	40(%r15), %r10
	movl	%esi, %r8d
	xorl	%edx, %edx
	movl	$0, %r12d
	movl	$0, %edi
	cmpl	$1, %esi
	jne	LBB0_10
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	testb	$1, %r8b
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	(%r10,%rdx,8), %rax
	movl	(%rax), %ecx
	cmpl	%edi, %ecx
	setg	%dl
	cmpl	%r13d, %ecx
	setl	%bl
	testb	%bl, %dl
	cmovnel	%ecx, %edi
	cmovneq	%rax, %r12
LBB0_18:                                ##   in Loop: Header=BB0_8 Depth=1
	testq	%r12, %r12
	je	LBB0_48
## %bb.19:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%edi, %r13d
	testl	%r14d, %r14d
	jne	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r12), %eax
	leal	-48(%rax), %ecx
	cmpl	$-32, %ecx
	jb	LBB0_48
## %bb.21:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_fft_subpackets@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addl	$-16, %eax
	cmpq	$0, (%rcx,%rax,8)
	jne	LBB0_48
LBB0_22:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	4(%r12), %edx
	movl	8(%r12), %esi
	shll	$3, %edx
	leaq	-44(%rbp), %rdi
	callq	_init_get_bits
	movl	(%r12), %eax
	movl	%eax, %ecx
	andl	$-16, %ecx
	cmpl	$32, %ecx
	jne	LBB0_28
## %bb.23:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_fft_subpackets@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leal	-16(%rax), %edx
	cmpq	$0, (%rcx,%rdx,8)
	je	LBB0_24
LBB0_28:                                ##   in Loop: Header=BB0_8 Depth=1
	xorl	%r12d, %r12d
	cmpl	$46, %eax
	ja	LBB0_39
LBB0_30:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %ecx
	movabsq	$1090938339328, %rdx            ## imm = 0xFE00FE0000
	btq	%rcx, %rdx
	jae	LBB0_31
## %bb.36:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	20(%r15), %esi
	andl	$15, %eax
	subl	%eax, %esi
	addl	$5, %esi
	cmpl	$3, %esi
	ja	LBB0_39
## %bb.37:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	leaq	-44(%rbp), %rdx
	jmp	LBB0_38
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%r8d, %r9d
	andl	$-2, %r9d
	xorl	%edx, %edx
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=2
	addq	$2, %rdx
	cmpq	%rdx, %r9
	je	LBB0_16
LBB0_11:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r10,%rdx,8), %rbx
	movl	(%rbx), %esi
	cmpl	%edi, %esi
	setg	%al
	cmpl	%r13d, %esi
	setl	%cl
	testb	%cl, %al
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movl	%edi, %esi
	movq	%r12, %rbx
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=2
	movq	8(%r10,%rdx,8), %r12
	movl	(%r12), %edi
	cmpl	%esi, %edi
	setg	%al
	cmpl	%r13d, %edi
	setl	%cl
	testb	%cl, %al
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=2
	movl	%esi, %edi
	movq	%rbx, %r12
	jmp	LBB0_15
LBB0_24:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	$1, %r12d
	cmpl	$46, %eax
	jbe	LBB0_30
	jmp	LBB0_39
LBB0_31:                                ##   in Loop: Header=BB0_8 Depth=1
	cmpq	$31, %rcx
	je	LBB0_34
## %bb.32:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpq	$46, %rcx
	jne	LBB0_39
## %bb.33:                              ##   in Loop: Header=BB0_8 Depth=1
	leaq	-44(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$6, %esi
	callq	_get_bits
	movq	32(%r15), %rcx
	movl	%eax, (%rcx)
	movq	%rbx, %rdi
	movl	$6, %esi
	callq	_get_bits
	movq	32(%r15), %rcx
	movl	%eax, 4(%rcx)
	movq	%rbx, %rdi
	movl	$6, %esi
	callq	_get_bits
	movq	32(%r15), %rcx
	movl	%eax, 8(%rcx)
	movq	%rbx, %rdi
	movl	$6, %esi
	callq	_get_bits
	movq	32(%r15), %rcx
	movl	%eax, 12(%rcx)
	movq	%rbx, %rdi
	movl	$6, %esi
	callq	_get_bits
	movq	32(%r15), %rcx
	movl	%eax, 16(%rcx)
	movq	%rbx, %rdi
	movl	$6, %esi
	callq	_get_bits
	movq	32(%r15), %rcx
	movl	%eax, 20(%rcx)
	movq	%r15, %rdi
	xorl	%esi, %esi
	jmp	LBB0_35
LBB0_4:
	movl	$2, %edx
	cmpl	$0, 8(%rax)
	js	LBB0_5
LBB0_43:
	movl	12(%rax), %esi
	testl	%esi, %esi
	js	LBB0_45
## %bb.44:
	movq	(%rcx), %rdi
	movl	%edx, %edx
	movl	%esi, (%rdi,%rdx,4)
	movl	$3, %edx
LBB0_45:
	movl	16(%rax), %eax
	testl	%eax, %eax
	js	LBB0_47
## %bb.46:
	movq	(%rcx), %rcx
	movl	%edx, %edx
	movl	%eax, (%rcx,%rdx,4)
	movl	$4, %edx
LBB0_47:
	movl	(%r15), %eax
	movq	24(%r15), %rcx
	movl	%edx, %edx
	movl	%eax, (%rcx,%rdx,4)
LBB0_48:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movq	8(%r15), %rax
	leaq	24(%r15), %rcx
	cmpl	$0, (%rax)
	js	LBB0_3
## %bb.26:
	movl	4(%rax), %edx
	testl	%edx, %edx
	js	LBB0_27
## %bb.40:
	movq	(%rcx), %rsi
	movl	%edx, (%rsi)
	movl	$1, %edx
	jmp	LBB0_41
LBB0_5:
	movl	$3, %edx
	cmpl	$0, 12(%rax)
	jns	LBB0_45
## %bb.6:
	movl	$4, %edx
	cmpl	$0, 16(%rax)
	jns	LBB0_47
	jmp	LBB0_48
LBB0_27:
	xorl	%edx, %edx
	jmp	LBB0_41
	.cfi_endproc
                                        ## -- End function
	.comm	_fft_subpackets,8,3             ## @fft_subpackets
	.no_dead_strip	_qdm2_decode_fft_packets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qdm2_decode_fft_packets
_qdm2_decode_fft_packets:               ; @qdm2_decode_fft_packets
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	ldr	x8, [x0, #40]
	ldr	x8, [x8]
	cbz	x8, LBB0_36
; %bb.1:
	mov	x19, x0
	str	wzr, [x0]
	ldr	x8, [x0, #8]
	mov	x9, #-1
	str	w9, [x8, #16]
	stp	x9, x9, [x8]
	ldr	w9, [x0, #16]
	cmp	w9, #0
	b.le	LBB0_3
; %bb.2:
	mov	w21, #0
	mov	w24, #256
Lloh0:
	adrp	x22, _fft_subpackets@GOTPAGE
Lloh1:
	ldr	x22, [x22, _fft_subpackets@GOTPAGEOFF]
	mov	w23, #1
	mov	x25, #16646144
	movk	x25, #254, lsl #32
	b	LBB0_11
LBB0_3:
	add	x9, x19, #24
LBB0_4:
	ldr	w10, [x8, #4]
	tbnz	w10, #31, LBB0_27
LBB0_5:
	mov	w10, #1
	ldr	w11, [x8, #8]
	tbnz	w11, #31, LBB0_29
LBB0_6:
	ldr	x12, [x9]
	str	w11, [x12, w10, uxtw #2]
	b	LBB0_28
LBB0_7:                                 ;   in Loop: Header=BB0_11 Depth=1
	add	x0, sp, #12
	mov	w1, #6
	bl	_get_bits
	ldr	x8, [x19, #32]
	str	w0, [x8]
	add	x0, sp, #12
	mov	w1, #6
	bl	_get_bits
	ldr	x8, [x19, #32]
	str	w0, [x8, #4]
	add	x0, sp, #12
	mov	w1, #6
	bl	_get_bits
	ldr	x8, [x19, #32]
	str	w0, [x8, #8]
	add	x0, sp, #12
	mov	w1, #6
	bl	_get_bits
	ldr	x8, [x19, #32]
	str	w0, [x8, #12]
	add	x0, sp, #12
	mov	w1, #6
	bl	_get_bits
	ldr	x8, [x19, #32]
	str	w0, [x8, #16]
	add	x0, sp, #12
	mov	w1, #6
	bl	_get_bits
	ldr	x8, [x19, #32]
	str	w0, [x8, #20]
LBB0_8:                                 ;   in Loop: Header=BB0_11 Depth=1
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #0
	mov	x3, x20
	bl	_qdm2_fft_decode_tones
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #1
	mov	x3, x20
	bl	_qdm2_fft_decode_tones
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #2
	mov	x3, x20
	bl	_qdm2_fft_decode_tones
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #3
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	x3, x20
	bl	_qdm2_fft_decode_tones
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w21, w21, #1
	ldr	w9, [x19, #16]
	cmp	w21, w9
	b.ge	LBB0_37
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	cmp	w9, #1
	b.lt	LBB0_36
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x8, x24
	mov	x20, #0
	mov	w24, #0
	ldr	x10, [x19, #40]
	mov	w9, w9
LBB0_13:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x11, [x10], #8
	ldr	w12, [x11]
	cmp	w12, w24
	cset	w13, gt
	cmp	w12, w8
	cset	w14, lt
	tst	w13, w14
	csel	w24, w12, w24, ne
	csel	x20, x11, x20, ne
	subs	x9, x9, #1
	b.ne	LBB0_13
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	cbz	x20, LBB0_36
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	cbnz	w21, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x20]
	sub	w9, w8, #48
	cmn	w9, #32
	b.lo	LBB0_36
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x9, [x22]
	sub	w8, w8, #16
	ldr	x8, [x9, w8, uxtw #3]
	cbnz	x8, LBB0_36
LBB0_18:                                ;   in Loop: Header=BB0_11 Depth=1
	ldp	w8, w1, [x20, #4]
	lsl	w2, w8, #3
	add	x0, sp, #12
	bl	_init_get_bits
	ldr	w8, [x20]
	and	w9, w8, #0xfffffff0
	cmp	w9, #32
	b.ne	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x9, [x22]
	sub	w10, w8, #16
	ldr	x9, [x9, w10, uxtw #3]
	cbz	x9, LBB0_24
LBB0_20:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	w20, #0
	cmp	w8, #46
	b.hi	LBB0_10
LBB0_21:                                ;   in Loop: Header=BB0_11 Depth=1
	lsl	x9, x23, x8
	tst	x9, x25
	b.eq	LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w9, [x19, #20]
	and	w8, w8, #0xf
	sub	w8, w9, w8
	add	w1, w8, #5
	cmp	w1, #3
	b.hi	LBB0_10
; %bb.23:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x2, sp, #12
	mov	x0, x19
	b	LBB0_9
LBB0_24:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	w20, #1
	cmp	w8, #46
	b.ls	LBB0_21
	b	LBB0_10
LBB0_25:                                ;   in Loop: Header=BB0_11 Depth=1
	cmp	x8, #31
	b.eq	LBB0_8
; %bb.26:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	x8, #46
	b.eq	LBB0_7
	b	LBB0_10
LBB0_27:
	ldr	w10, [x8, #8]
	tbnz	w10, #31, LBB0_40
LBB0_28:
	mov	w10, #2
LBB0_29:
	ldr	w11, [x8, #12]
	tbnz	w11, #31, LBB0_32
; %bb.30:
	ldr	x12, [x9]
	str	w11, [x12, w10, uxtw #2]
LBB0_31:
	mov	w10, #3
LBB0_32:
	ldr	w8, [x8, #16]
	tbnz	w8, #31, LBB0_35
; %bb.33:
	ldr	x9, [x9]
	str	w8, [x9, w10, uxtw #2]
LBB0_34:
	mov	w10, #4
LBB0_35:
	ldr	w8, [x19]
	ldr	x9, [x19, #24]
	str	w8, [x9, w10, uxtw #2]
LBB0_36:
	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
	add	sp, sp, #96
	ret
LBB0_37:
	ldr	x8, [x19, #8]
	ldr	w10, [x8]
	add	x9, x19, #24
	tbnz	w10, #31, LBB0_4
; %bb.38:
	ldr	w10, [x8, #4]
	tbnz	w10, #31, LBB0_42
; %bb.39:
	ldr	x11, [x9]
	str	w10, [x11]
	b	LBB0_5
LBB0_40:
	ldr	w10, [x8, #12]
	tbz	w10, #31, LBB0_31
; %bb.41:
	ldr	w8, [x8, #16]
	tbz	w8, #31, LBB0_34
	b	LBB0_36
LBB0_42:
	mov	w10, #0
	ldr	w11, [x8, #8]
	tbz	w11, #31, LBB0_6
	b	LBB0_29
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_fft_subpackets,8,3             ; @fft_subpackets
	.no_dead_strip	_qdm2_decode_fft_packets
.subsections_via_symbols
