	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vivid_sdr_cap_process          ## -- Begin function vivid_sdr_cap_process
	.p2align	4, 0x90
_vivid_sdr_cap_process:                 ## @vivid_sdr_cap_process
	.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, %rbx
	movq	%rdi, %r13
	movq	%rsi, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_vaddr
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_vb2_plane_size
	movq	%rax, %rbx
	movq	_FIXP_2PI@GOTPCREL(%rip), %rax
	imull	$1000, (%rax), %edi             ## imm = 0x3E8
	movl	(%r13), %esi
	callq	_DIV_ROUND_CLOSEST
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.1:
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	imull	$1275, %ebx, %edi               ## imm = 0x4FB
	movq	_FIXP_FRAC@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	leal	(%rcx,%rcx,4), %edx
	subl	%edx, %edi
	imull	$1275, %eax, %r14d              ## imm = 0x4FB
	subl	%edx, %r14d
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,4), %esi
	callq	_DIV_ROUND_CLOSEST
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, (%rbx)
	movl	(%r15), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %esi
	movl	%r14d, %edi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, 4(%rbx)
	addq	$8, %rbx
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$2, %r12
	cmpq	-64(%rbp), %r12                 ## 8-byte Folded Reload
	jae	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r13), %edi
	movq	_FIXP_2PI@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	_fixp_cos32_rad
	movb	$31, %cl
	movq	_FIXP_N@GOTPCREL(%rip), %r15
	subb	(%r15), %cl
	sarl	%cl, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addl	%ecx, 4(%r13)
	imull	8(%r13), %eax
	movq	_M_100000PI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_div_s64
	movq	%rax, %rcx
	addl	12(%r13), %ecx
	movl	(%r14), %esi
	movl	4(%r13), %eax
	cltd
	idivl	%esi
	movl	%edx, 4(%r13)
	movl	%ecx, %eax
	cltd
	idivl	%esi
	movl	%edx, %edi
	sarl	$31, %edi
	andl	%esi, %edi
	addl	%edx, %edi
	movl	%edi, 12(%r13)
	callq	_fixp_cos32_rad
	movl	%eax, %ebx
	movl	12(%r13), %edi
	movl	(%r14), %esi
	callq	_fixp_sin32_rad
	movb	$31, %cl
	subb	(%r15), %cl
	sarl	%cl, %ebx
	sarl	%cl, %eax
	movl	16(%r13), %ecx
	cmpl	$129, %ecx
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$128, %ecx
	movq	_FIXP_FRAC@GOTPCREL(%rip), %r15
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	imull	$1275, %ebx, %edi               ## imm = 0x4FB
	movl	(%r15), %ecx
	imull	$1275, %ecx, %edx               ## imm = 0x4FB
	addl	%edx, %edi
	imull	$1275, %eax, %r14d              ## imm = 0x4FB
	addl	%edx, %r14d
	jmp	LBB0_6
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIXP_2PI,4,2                   ## @FIXP_2PI
	.comm	_FIXP_N,4,2                     ## @FIXP_N
	.comm	_M_100000PI,4,2                 ## @M_100000PI
	.comm	_FIXP_FRAC,4,2                  ## @FIXP_FRAC
	.comm	_BEEP_FREQ,4,2                  ## @BEEP_FREQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vivid_sdr_cap_process          ; -- Begin function vivid_sdr_cap_process
	.p2align	2
_vivid_sdr_cap_process:                 ; @vivid_sdr_cap_process
	.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	x21, x1
	mov	x19, x0
	mov	x0, x1
	mov	w1, #0
	bl	_vb2_plane_vaddr
	mov	x20, x0
	mov	x0, x21
	mov	w1, #0
	bl	_vb2_plane_size
	mov	x21, x0
Lloh0:
	adrp	x24, _FIXP_2PI@GOTPAGE
Lloh1:
	ldr	x24, [x24, _FIXP_2PI@GOTPAGEOFF]
	ldr	w8, [x24]
	mov	w9, #1000
	mul	w0, w8, w9
	ldr	w1, [x19]
	bl	_DIV_ROUND_CLOSEST
	cbz	x21, LBB0_8
; %bb.1:
	mov	x22, x0
	mov	x25, #0
Lloh2:
	adrp	x26, _FIXP_N@GOTPAGE
Lloh3:
	ldr	x26, [x26, _FIXP_N@GOTPAGEOFF]
	mov	w28, #1275
Lloh4:
	adrp	x27, _FIXP_FRAC@GOTPAGE
Lloh5:
	ldr	x27, [x27, _FIXP_FRAC@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x27]
	add	w11, w8, w8, lsl #2
	neg	w11, w11
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	madd	w0, w10, w28, w11
	madd	w23, w9, w28, w11
	add	w8, w8, w8, lsl #2
	lsl	w1, w8, #1
	bl	_DIV_ROUND_CLOSEST
	str	w0, [x20]
	ldr	w8, [x27]
	add	w8, w8, w8, lsl #2
	lsl	w1, w8, #1
	mov	x0, x23
	bl	_DIV_ROUND_CLOSEST
	str	w0, [x20, #4]
	add	x20, x20, #8
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, #2
	cmp	x25, x21
	b.hs	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #4]
	ldr	w1, [x24]
	bl	_fixp_cos32_rad
	ldr	w8, [x26]
	mvn	w8, w8
	asr	w8, w0, w8
	ldp	w9, w10, [x19, #4]
	add	w9, w9, w22
	str	w9, [x19, #4]
	mul	w0, w10, w8
Lloh6:
	adrp	x8, _M_100000PI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _M_100000PI@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_div_s64
	ldr	w8, [x19, #12]
	add	w8, w8, w0
	ldr	w1, [x24]
	ldr	w9, [x19, #4]
	sdiv	w10, w9, w1
	msub	w9, w10, w1, w9
	str	w9, [x19, #4]
	sdiv	w9, w8, w1
	msub	w8, w9, w1, w8
	and	w9, w1, w8, asr #31
	add	w0, w8, w9
	str	w0, [x19, #12]
	bl	_fixp_cos32_rad
	mov	x23, x0
	ldr	w0, [x19, #12]
	ldr	w1, [x24]
	bl	_fixp_sin32_rad
	ldr	w8, [x26]
	mvn	w8, w8
	asr	w10, w23, w8
	asr	w9, w0, w8
	ldr	w8, [x19, #16]
	cmp	w8, #129
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x27]
	mul	w11, w8, w28
	b	LBB0_3
LBB0_8:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_FIXP_2PI,4,2                   ; @FIXP_2PI
	.comm	_FIXP_N,4,2                     ; @FIXP_N
	.comm	_M_100000PI,4,2                 ; @M_100000PI
	.comm	_FIXP_FRAC,4,2                  ; @FIXP_FRAC
	.comm	_BEEP_FREQ,4,2                  ; @BEEP_FREQ
.subsections_via_symbols
