	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl2832_sdr_convert_stream
_rtl2832_sdr_convert_stream:            ## @rtl2832_sdr_convert_stream
	.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
	movl	%ecx, %r14d
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	24(%rdi), %r15
	movq	_V4L2_SDR_FMT_CU8@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rsi, %rdi
	movq	%rdx, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movl	%r14d, %ebx
	jmp	LBB0_20
LBB0_2:
	movq	_V4L2_SDR_FMT_CU16LE@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.3:
	testl	%r14d, %r14d
	je	LBB0_19
## %bb.4:
	movl	%r14d, %r9d
	xorl	%ecx, %ecx
	cmpl	$8, %r14d
	jb	LBB0_14
## %bb.5:
	movq	%rsi, %rax
	subq	%rdx, %rax
	cmpq	$32, %rax
	jb	LBB0_14
## %bb.6:
	movl	%r9d, %ecx
	andl	$-8, %ecx
	leaq	-8(%rcx), %rax
	movq	%rax, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%r8, %rbx
	andq	$-2, %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdx,%rdi,4), %xmm0
	movdqu	16(%rdx,%rdi,4), %xmm1
	movdqa	%xmm0, %xmm2
	pslld	$8, %xmm2
	movdqa	%xmm1, %xmm3
	pslld	$8, %xmm3
	por	%xmm0, %xmm2
	por	%xmm1, %xmm3
	movdqu	%xmm2, (%rsi,%rdi,4)
	movdqu	%xmm3, 16(%rsi,%rdi,4)
	movdqu	32(%rdx,%rdi,4), %xmm0
	movdqu	48(%rdx,%rdi,4), %xmm1
	movdqa	%xmm0, %xmm2
	pslld	$8, %xmm2
	movdqa	%xmm1, %xmm3
	pslld	$8, %xmm3
	por	%xmm0, %xmm2
	por	%xmm1, %xmm3
	movdqu	%xmm2, 32(%rsi,%rdi,4)
	movdqu	%xmm3, 48(%rsi,%rdi,4)
	addq	$16, %rdi
	addq	$-2, %rbx
	jne	LBB0_9
## %bb.10:
	testb	$1, %r8b
	je	LBB0_12
LBB0_11:
	movdqu	(%rdx,%rdi,4), %xmm0
	movdqu	16(%rdx,%rdi,4), %xmm1
	movdqa	%xmm0, %xmm2
	pslld	$8, %xmm2
	movdqa	%xmm1, %xmm3
	pslld	$8, %xmm3
	por	%xmm0, %xmm2
	por	%xmm1, %xmm3
	movdqu	%xmm2, (%rsi,%rdi,4)
	movdqu	%xmm3, 16(%rsi,%rdi,4)
LBB0_12:
	cmpq	%r9, %rcx
	je	LBB0_19
## %bb.13:
	leaq	(%rsi,%rcx,4), %rsi
LBB0_14:
	movq	%rcx, %r8
	notq	%r8
	addq	%r9, %r8
	movq	%r9, %rax
	andq	$3, %rax
	je	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rcx,4), %edi
	movl	%edi, %ebx
	shll	$8, %ebx
	orl	%edi, %ebx
	movl	%ebx, (%rsi)
	addq	$4, %rsi
	incq	%rcx
	decq	%rax
	jne	LBB0_15
LBB0_16:
	cmpq	$3, %r8
	jb	LBB0_19
## %bb.17:
	subq	%rcx, %r9
	leaq	(%rdx,%rcx,4), %rcx
	addq	$12, %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	-12(%rcx,%rdx,4), %eax
	movl	%eax, %edi
	shll	$8, %edi
	orl	%eax, %edi
	movl	%edi, (%rsi,%rdx,4)
	movl	-8(%rcx,%rdx,4), %eax
	movl	%eax, %edi
	shll	$8, %edi
	orl	%eax, %edi
	movl	%edi, 4(%rsi,%rdx,4)
	movl	-4(%rcx,%rdx,4), %eax
	movl	%eax, %edi
	shll	$8, %edi
	orl	%eax, %edi
	movl	%edi, 8(%rsi,%rdx,4)
	movl	(%rcx,%rdx,4), %eax
	movl	%eax, %edi
	shll	$8, %edi
	orl	%eax, %edi
	movl	%edi, 12(%rsi,%rdx,4)
	addq	$4, %rdx
	cmpq	%rdx, %r9
	jne	LBB0_18
LBB0_19:
	leal	(%r14,%r14), %ebx
LBB0_20:
	movq	16(%r13), %rdi
	callq	_time_is_before_jiffies
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_25
## %bb.21:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	(%r12), %rbx
	subq	16(%r13), %rbx
	movl	$10000, %edi                    ## imm = 0x2710
	callq	_msecs_to_jiffies
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_jiffies_to_msecs
	movl	%eax, %r15d
	movl	8(%r13), %ebx
	subl	12(%r13), %ebx
	movq	(%r12), %r12
	movl	$10000, %edi                    ## imm = 0x2710
	callq	_msecs_to_jiffies
	addq	%r12, %rax
	movq	%rax, 16(%r13)
	movl	8(%r13), %eax
	movl	%eax, 12(%r13)
	imulq	$1000, %rbx, %rax               ## imm = 0x3E8
	movl	%r15d, %r8d
	movabsq	$4393751543808, %rcx            ## imm = 0x3FF00000000
	testq	%rcx, %rax
	je	LBB0_22
## %bb.23:
	xorl	%edx, %edx
	divq	%r8
	jmp	LBB0_24
LBB0_22:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r8d
                                        ## kill: def $eax killed $eax def $rax
LBB0_24:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%ebx, %ecx
                                        ## kill: def $r8d killed $r8d killed $r8
	movl	%eax, %r9d
	callq	_dev_dbg
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_25:
	shrl	%r14d
	addl	%r14d, 8(%r13)
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%edi, %edi
	testb	$1, %r8b
	jne	LBB0_11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_SDR_FMT_CU8,8,3           ## @V4L2_SDR_FMT_CU8
	.comm	_V4L2_SDR_FMT_CU16LE,8,3        ## @V4L2_SDR_FMT_CU16LE
	.comm	_jiffies,8,3                    ## @jiffies
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"slen=%u samples=%u msecs=%u sample rate=%lu\n"

	.comm	_MSECS,4,2                      ## @MSECS
	.no_dead_strip	_rtl2832_sdr_convert_stream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl2832_sdr_convert_stream
_rtl2832_sdr_convert_stream:            ; @rtl2832_sdr_convert_stream
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x0
	ldr	x21, [x0, #24]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _V4L2_SDR_FMT_CU8@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_SDR_FMT_CU8@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x1
	mov	x1, x2
	mov	x2, x19
	bl	_memcpy
	mov	x22, x19
	b	LBB0_13
LBB0_2:
Lloh3:
	adrp	x9, _V4L2_SDR_FMT_CU16LE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_SDR_FMT_CU16LE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.3:
	cbz	w19, LBB0_11
; %bb.4:
	mov	x8, #0
	mov	w9, w19
	cmp	w19, #16
	b.lo	LBB0_9
; %bb.5:
	sub	x10, x1, x2
	cmp	x10, #64
	b.lo	LBB0_9
; %bb.6:
	and	x8, x9, #0xfffffff0
	add	x10, x1, x8, lsl #2
	add	x11, x1, #32
	add	x12, x2, #32
	mov	x13, x8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12], #64
	shl.4s	v4, v0, #8
	shl.4s	v5, v1, #8
	shl.4s	v6, v2, #8
	shl.4s	v7, v3, #8
	orr.16b	v0, v4, v0
	orr.16b	v1, v5, v1
	orr.16b	v2, v6, v2
	orr.16b	v3, v7, v3
	stp	q0, q1, [x11, #-32]
	stp	q2, q3, [x11], #64
	subs	x13, x13, #16
	b.ne	LBB0_7
; %bb.8:
	mov	x1, x10
	cmp	x8, x9
	b.eq	LBB0_11
LBB0_9:
	add	x10, x2, x8, lsl #2
	sub	x8, x9, x8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x10], #4
	orr	w9, w9, w9, lsl #8
	str	w9, [x1], #4
	subs	x8, x8, #1
	b.ne	LBB0_10
LBB0_11:
	lsl	w22, w19, #1
	b	LBB0_13
LBB0_12:
	mov	w22, #0
LBB0_13:
	ldr	x0, [x20, #16]
	bl	_time_is_before_jiffies
	bl	_unlikely
	cbz	x0, LBB0_15
; %bb.14:
Lloh6:
	adrp	x25, _jiffies@GOTPAGE
Lloh7:
	ldr	x25, [x25, _jiffies@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	x9, [x20, #16]
	sub	x23, x8, x9
	mov	w0, #10000
	bl	_msecs_to_jiffies
	add	x0, x23, x0
	bl	_jiffies_to_msecs
	mov	x23, x0
	ldp	w8, w9, [x20, #8]
	sub	w24, w8, w9
	ldr	x25, [x25]
	mov	w0, #10000
	bl	_msecs_to_jiffies
	add	x8, x0, x25
	str	x8, [x20, #16]
	ldr	w8, [x20, #8]
	str	w8, [x20, #12]
	mov	w8, #1000
	umull	x8, w24, w8
	mov	w9, w23
	udiv	x5, x8, x9
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	mov	x3, x24
	mov	x4, x23
                                        ; kill: def $w5 killed $w5 killed $x5
	bl	_dev_dbg
LBB0_15:
	ldr	w8, [x20, #8]
	add	w8, w8, w19, lsr #1
	str	w8, [x20, #8]
	mov	x0, x22
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_SDR_FMT_CU8,8,3           ; @V4L2_SDR_FMT_CU8
	.comm	_V4L2_SDR_FMT_CU16LE,8,3        ; @V4L2_SDR_FMT_CU16LE
	.comm	_jiffies,8,3                    ; @jiffies
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"slen=%u samples=%u msecs=%u sample rate=%lu\n"

	.comm	_MSECS,4,2                      ; @MSECS
	.no_dead_strip	_rtl2832_sdr_convert_stream
.subsections_via_symbols
