#include <stdio.h>
#include "cs_motion_report.h"

void
ma_report_header ( FILE *ofd, int y, int x, int t, int vr, int hr, int tr )
{
	fprintf( ofd, "****==== video info (1) ====****\n") ;
	fprintf( ofd, "vid_size_v,vid_size_h,vid_size_t,uv_ratio_v,uv_ratio_h,uv_ratio_t\n") ;
	fprintf( ofd, "I,I,I,I,I,I\n") ;

	fprintf( ofd, "%d,%d,%d,%d,%d,%d\n", y, x, t, vr, hr, tr ) ;

	fprintf( ofd, "****==== encoder measurements analysis ====****\n") ;
	
	fprintf( ofd, "indx_v,indx_h,indx_t,"
		"ofst_v,ofst_h,ofst_t,"
		"len_v,len_h,len_t,"
		"ovlp_b_v,ovlp_b_h,ovlp_b_t,"
		"ovlp_f_v,ovlp_f_h,ovlp_f_t,"
		"w_blk,w_type,"
		"mxv,mxp_v,mxp_h,mxp_t,"
		"mdv,mdp_v,mdp_h,mdp_t,"
		"vlc_v,vlc_h\n") ;

	fprintf( ofd, "I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,F,I,I,I,F,I,I,I,F,F\n") ;
}

void
ma_report_record ( FILE *ofd, int *dp, int cnt, int xs, int ys, int zs,
	int blk_in_x, int blk_in_y, int ovh, int ovv, int ovt, int wblk, int wtype )
{
	int	t, v, h, va, ot, ov, oh, ova ;
	int xss, yss, j, k ;
	int off_h, off_v, off_t ;
	int fovh, fovv, fovt, bovh, bovv, bovt ;

	off_t = cnt * ( zs - ovt ) ;

	if ( cnt == 1 )
	{
		bovt = 0 ;
		fovt = ovt ;
	} else
	{
		bovt = ovt ;
		fovt = ovt ;
	}

	for ( j = 1 ; j <= blk_in_y ; j++ )
	{
		if ( j == 1 )
			off_v = 0 ;
		else
			off_v = ( j - 2 ) * ovv ;

		if (( j == 1 ) || ( j == blk_in_y ))
			yss = ys >> 1 ;
		else
			yss = ys ;

		if ( j == 1 )
		{
			fovv = ovv ;
			bovv = 0 ;
		} else if ( j == blk_in_y )
		{
			fovv = 0 ;
			bovv = ovv ;
		} else
		{
			fovv = ovv ;
			bovv = ovv ;
		}

		for ( k = 1 ; k <= blk_in_x ; k++ )
		{ 
			t = *dp++ ;
			v = *dp++ ;
			h = *dp++ ;
			va = *dp++ ;

			ot = *dp++ ;
			ov = *dp++ ;
			oh = *dp++ ;
			ova = *dp++ ;

			if ( k == 1 )
				off_h = 0 ;
			else
				off_h = ( k - 2 ) * ovh ;

			if (( k == 1 ) || ( k == blk_in_x ))
				xss = xs >> 1 ;
			else
				xss = xs ;
			
			if ( k == 1 )
			{
				fovh = ovh ;
				bovh = 0 ;
			} else if ( k == blk_in_x )
			{
				fovh = 0 ;
				bovh = ovh ;
			} else
			{
				fovh = ovh ;
				bovh = ovh ;
			}

			fprintf( ofd, "%d,%d,%d,%d,%d,%d,"
				"%d,%d,%d,%d,%d,%d,%d,%d,%d,"
				"%d,%d,"
				"%f,%d,%d,%d,%f,%d,%d,%d,"
				"%f,%f\n",
				j,k,cnt,	// index
				off_v, off_h, off_t,
				yss, xss, zs,
				bovv, bovh, bovt,
				fovv, fovh, fovt,
				wblk, wtype,
				(float)va / 1000, v, h, t,
				(float)ova / 1000, ov, oh, ot,
				(( float )ov -( float )v ) / (float)t,
				(( float )oh -( float )h ) / (float)t ) ;
		}
	}
}

	.file	"tmpxft_002b3612_00000000-6_cs_motion_report.cudafe1.cpp"
	.text
#APP

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB2031:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE2031:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"****==== video info (1) ====****\n"
.LC1:
	.string	"vid_size_v,vid_size_h,vid_size_t,uv_ratio_v,uv_ratio_h,uv_ratio_t\n"
.LC2:
	.string	"I,I,I,I,I,I\n"
.LC3:
	.string	"%d,%d,%d,%d,%d,%d\n"
.LC4:
	.string	"****==== encoder measurements analysis ====****\n"
.LC5:
	.string	"indx_v,indx_h,indx_t,ofst_v,ofst_h,ofst_t,len_v,len_h,len_t,ovlp_b_v,ovlp_b_h,ovlp_b_t,ovlp_f_v,ovlp_f_h,ovlp_f_t,w_blk,w_type,mxv,mxp_v,mxp_h,mxp_t,mdv,mdp_v,mdp_h,mdp_t,vlc_v,vlc_h\n"
.LC6:
	.string	"I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,F,I,I,I,F,I,I,I,F,F\n"
	.text
	.globl	_Z16ma_report_headerP8_IO_FILEiiiiii
	.type	_Z16ma_report_headerP8_IO_FILEiiiiii, @function
_Z16ma_report_headerP8_IO_FILEiiiiii:
.LFB2027:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xorl	%eax, %eax
	movl	%r9d, %r15d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	movl	%r8d, %r14d
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%ecx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%edx, %r12d
	leaq	.LC0(%rip), %rdx
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%esi, %ebp
	movl	$2, %esi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	movq	%rdi, 8(%rsp)
	movl	80(%rsp), %ebx
	call	__fprintf_chk@PLT
	movq	8(%rsp), %rdi
	leaq	.LC1(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movq	8(%rsp), %rdi
	leaq	.LC2(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movl	%r13d, %r9d
	movl	%r12d, %r8d
	movl	%ebp, %ecx
	pushq	%rax
	.cfi_def_cfa_offset 88
	leaq	.LC3(%rip), %rdx
	movl	$2, %esi
	xorl	%eax, %eax
	pushq	%rbx
	.cfi_def_cfa_offset 96
	pushq	%r15
	.cfi_def_cfa_offset 104
	pushq	%r14
	.cfi_def_cfa_offset 112
	movq	40(%rsp), %rdi
	call	__fprintf_chk@PLT
	movq	40(%rsp), %rdi
	addq	$32, %rsp
	.cfi_def_cfa_offset 80
	xorl	%eax, %eax
	leaq	.LC4(%rip), %rdx
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movq	8(%rsp), %rdi
	leaq	.LC5(%rip), %rdx
	xorl	%eax, %eax
	movl	$2, %esi
	call	__fprintf_chk@PLT
	movq	8(%rsp), %rdi
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	movl	$2, %esi
	popq	%rbx
	.cfi_def_cfa_offset 48
	leaq	.LC6(%rip), %rdx
	popq	%rbp
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	jmp	__fprintf_chk@PLT
	.cfi_endproc
.LFE2027:
	.size	_Z16ma_report_headerP8_IO_FILEiiiiii, .-_Z16ma_report_headerP8_IO_FILEiiiiii
	.section	.rodata.str1.1
.LC8:
	.string	"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%f,%d,%d,%d,%f,%d,%d,%d,%f,%f\n"
	.text
	.globl	_Z16ma_report_recordP8_IO_FILEPiiiiiiiiiiii
	.type	_Z16ma_report_recordP8_IO_FILEPiiiiiiiiiiii, @function
_Z16ma_report_recordP8_IO_FILEPiiiiiiiiiiii:
.LFB2028:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%r9d, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	$1, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movq	%rsi, %rbx
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	subl	176(%rsp), %eax
	movl	%edx, 12(%rsp)
	imull	%edx, %eax
	movl	%ecx, 24(%rsp)
	movq	%rdi, 72(%rsp)
	movl	%r8d, 28(%rsp)
	movl	%eax, 40(%rsp)
	xorl	%eax, %eax
	decl	%edx
	cmovne	176(%rsp), %eax
	movl	%r9d, 32(%rsp)
	movl	%eax, 36(%rsp)
	movl	%r8d, %eax
	sarl	%eax
	movl	%eax, 44(%rsp)
	movl	24(%rsp), %eax
	sarl	%eax
	movl	%eax, 60(%rsp)
	movl	168(%rsp), %eax
	negl	%eax
	movl	%eax, 20(%rsp)
.L6:
	cmpl	152(%rsp), %ebp
	jg	.L27
	xorl	%eax, %eax
	cmpl	$1, %ebp
	cmovne	20(%rsp), %eax
	movl	%eax, 68(%rsp)
	je	.L23
	cmpl	152(%rsp), %ebp
	jne	.L18
.L23:
	xorl	%eax, %eax
	cmpl	$1, %ebp
	movl	44(%rsp), %r15d
	movl	%eax, %r13d
	cmovne	168(%rsp), %eax
	cmove	168(%rsp), %r13d
	movl	%eax, %r14d
	jmp	.L8
.L18:
	movl	168(%rsp), %r14d
	movl	28(%rsp), %r15d
	movl	%r14d, %r13d
.L8:
	movl	160(%rsp), %eax
	movl	$1, %r12d
	negl	%eax
	movl	%eax, 16(%rsp)
.L10:
	cmpl	144(%rsp), %r12d
	jg	.L28
	movl	12(%rbx), %eax
	movl	(%rbx), %r9d
	addq	$32, %rbx
	xorl	%edx, %edx
	movl	-28(%rbx), %edi
	movl	-24(%rbx), %r8d
	movl	-12(%rbx), %r10d
	movl	-8(%rbx), %r11d
	movl	%eax, 48(%rsp)
	movl	-16(%rbx), %eax
	cmpl	$1, %r12d
	cmovne	16(%rsp), %edx
	movl	%eax, 52(%rsp)
	movl	-4(%rbx), %eax
	movl	%edx, 64(%rsp)
	movl	%eax, 56(%rsp)
	je	.L24
	cmpl	144(%rsp), %r12d
	jne	.L21
.L24:
	xorl	%eax, %eax
	movl	60(%rsp), %ecx
	cmpl	$1, %r12d
	movl	%eax, %esi
	cmovne	160(%rsp), %eax
	cmove	160(%rsp), %esi
	jmp	.L12
.L21:
	movl	160(%rsp), %eax
	movl	24(%rsp), %ecx
	movl	%eax, %esi
.L12:
	cvtsi2ssl	%r8d, %xmm1
	movl	52(%rsp), %edx
	cvtsi2ssl	%r11d, %xmm3
	cvtsi2ssl	%r10d, %xmm2
	cvtsi2ssl	%r9d, %xmm0
	subss	%xmm1, %xmm3
	cvtsi2ssl	%edi, %xmm1
	divss	%xmm0, %xmm3
	subss	%xmm1, %xmm2
	cvtsi2ssl	56(%rsp), %xmm1
	divss	.LC7(%rip), %xmm1
	cvtss2sd	%xmm1, %xmm1
	divss	%xmm0, %xmm2
	cvtsi2ssl	48(%rsp), %xmm0
	pushq	%rdx
	.cfi_def_cfa_offset 152
	divss	.LC7(%rip), %xmm0
	pushq	%r11
	.cfi_def_cfa_offset 160
	cvtss2sd	%xmm0, %xmm0
	pushq	%r10
	.cfi_def_cfa_offset 168
	pushq	%r9
	.cfi_def_cfa_offset 176
	pushq	%r8
	.cfi_def_cfa_offset 184
	movl	%r12d, %r8d
	cvtss2sd	%xmm3, %xmm3
	incl	%r12d
	pushq	%rdi
	.cfi_def_cfa_offset 192
	movl	240(%rsp), %edi
	pushq	%rdi
	.cfi_def_cfa_offset 200
	movl	240(%rsp), %edx
	pushq	%rdx
	.cfi_def_cfa_offset 208
	movl	240(%rsp), %edi
	leaq	.LC8(%rip), %rdx
	pushq	%rdi
	.cfi_def_cfa_offset 216
	pushq	%rsi
	.cfi_def_cfa_offset 224
	pushq	%r13
	.cfi_def_cfa_offset 232
	movl	124(%rsp), %esi
	pushq	%rsi
	.cfi_def_cfa_offset 240
	movl	$2, %esi
	pushq	%rax
	.cfi_def_cfa_offset 248
	pushq	%r14
	.cfi_def_cfa_offset 256
	movl	144(%rsp), %eax
	cvtss2sd	%xmm2, %xmm2
	pushq	%rax
	.cfi_def_cfa_offset 264
	pushq	%rcx
	.cfi_def_cfa_offset 272
	movl	%ebp, %ecx
	pushq	%r15
	.cfi_def_cfa_offset 280
	movl	176(%rsp), %eax
	pushq	%rax
	.cfi_def_cfa_offset 288
	movl	208(%rsp), %eax
	pushq	%rax
	.cfi_def_cfa_offset 296
	movl	220(%rsp), %eax
	pushq	%rax
	.cfi_def_cfa_offset 304
	movl	172(%rsp), %r9d
	movb	$4, %al
	movq	232(%rsp), %rdi
	call	__fprintf_chk@PLT
	movl	320(%rsp), %ecx
	addl	%ecx, 176(%rsp)
	addq	$160, %rsp
	.cfi_def_cfa_offset 144
	jmp	.L10
.L28:
	movl	168(%rsp), %ecx
	incl	%ebp
	addl	%ecx, 20(%rsp)
	jmp	.L6
.L27:
	addq	$88, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE2028:
	.size	_Z16ma_report_recordP8_IO_FILEPiiiiiiiiiiii, .-_Z16ma_report_recordP8_IO_FILEPiiiiiiiiiiii
	.section	.text.startup,"ax",@progbits
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB2054:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE2054:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC7:
	.long	1148846080
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include <hip/hip_runtime.h>
#include <stdio.h>
#include "cs_motion_report.h"

void
ma_report_header ( FILE *ofd, int y, int x, int t, int vr, int hr, int tr )
{
	fprintf( ofd, "****==== video info (1) ====****\n") ;
	fprintf( ofd, "vid_size_v,vid_size_h,vid_size_t,uv_ratio_v,uv_ratio_h,uv_ratio_t\n") ;
	fprintf( ofd, "I,I,I,I,I,I\n") ;

	fprintf( ofd, "%d,%d,%d,%d,%d,%d\n", y, x, t, vr, hr, tr ) ;

	fprintf( ofd, "****==== encoder measurements analysis ====****\n") ;
	
	fprintf( ofd, "indx_v,indx_h,indx_t,"
		"ofst_v,ofst_h,ofst_t,"
		"len_v,len_h,len_t,"
		"ovlp_b_v,ovlp_b_h,ovlp_b_t,"
		"ovlp_f_v,ovlp_f_h,ovlp_f_t,"
		"w_blk,w_type,"
		"mxv,mxp_v,mxp_h,mxp_t,"
		"mdv,mdp_v,mdp_h,mdp_t,"
		"vlc_v,vlc_h\n") ;

	fprintf( ofd, "I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,F,I,I,I,F,I,I,I,F,F\n") ;
}

void
ma_report_record ( FILE *ofd, int *dp, int cnt, int xs, int ys, int zs,
	int blk_in_x, int blk_in_y, int ovh, int ovv, int ovt, int wblk, int wtype )
{
	int	t, v, h, va, ot, ov, oh, ova ;
	int xss, yss, j, k ;
	int off_h, off_v, off_t ;
	int fovh, fovv, fovt, bovh, bovv, bovt ;

	off_t = cnt * ( zs - ovt ) ;

	if ( cnt == 1 )
	{
		bovt = 0 ;
		fovt = ovt ;
	} else
	{
		bovt = ovt ;
		fovt = ovt ;
	}

	for ( j = 1 ; j <= blk_in_y ; j++ )
	{
		if ( j == 1 )
			off_v = 0 ;
		else
			off_v = ( j - 2 ) * ovv ;

		if (( j == 1 ) || ( j == blk_in_y ))
			yss = ys >> 1 ;
		else
			yss = ys ;

		if ( j == 1 )
		{
			fovv = ovv ;
			bovv = 0 ;
		} else if ( j == blk_in_y )
		{
			fovv = 0 ;
			bovv = ovv ;
		} else
		{
			fovv = ovv ;
			bovv = ovv ;
		}

		for ( k = 1 ; k <= blk_in_x ; k++ )
		{ 
			t = *dp++ ;
			v = *dp++ ;
			h = *dp++ ;
			va = *dp++ ;

			ot = *dp++ ;
			ov = *dp++ ;
			oh = *dp++ ;
			ova = *dp++ ;

			if ( k == 1 )
				off_h = 0 ;
			else
				off_h = ( k - 2 ) * ovh ;

			if (( k == 1 ) || ( k == blk_in_x ))
				xss = xs >> 1 ;
			else
				xss = xs ;
			
			if ( k == 1 )
			{
				fovh = ovh ;
				bovh = 0 ;
			} else if ( k == blk_in_x )
			{
				fovh = 0 ;
				bovh = ovh ;
			} else
			{
				fovh = ovh ;
				bovh = ovh ;
			}

			fprintf( ofd, "%d,%d,%d,%d,%d,%d,"
				"%d,%d,%d,%d,%d,%d,%d,%d,%d,"
				"%d,%d,"
				"%f,%d,%d,%d,%f,%d,%d,%d,"
				"%f,%f\n",
				j,k,cnt,	// index
				off_v, off_h, off_t,
				yss, xss, zs,
				bovv, bovh, bovt,
				fovv, fovh, fovt,
				wblk, wtype,
				(float)va / 1000, v, h, t,
				(float)ova / 1000, ov, oh, ot,
				(( float )ov -( float )v ) / (float)t,
				(( float )oh -( float )h ) / (float)t ) ;
		}
	}
}

	.text
	.file	"cs_motion_report.hip"
	.globl	_Z16ma_report_headerP8_IO_FILEiiiiii # -- Begin function _Z16ma_report_headerP8_IO_FILEiiiiii
	.type	_Z16ma_report_headerP8_IO_FILEiiiiii,@function
_Z16ma_report_headerP8_IO_FILEiiiiii:   # @_Z16ma_report_headerP8_IO_FILEiiiiii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	pushq	%rax
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
                                        # kill: def $r9d killed $r9d def $r9
	movq	%r9, (%rsp)                     # 8-byte Spill
	movl	%r8d, %ebp
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movl	64(%rsp), %r14d
	movl	$.L.str, %edi
	movl	$33, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	fwrite@PLT
	movl	$.L.str.1, %edi
	movl	$66, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	fwrite@PLT
	movl	$.L.str.2, %edi
	movl	$12, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	fwrite@PLT
	movl	$.L.str.3, %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	movl	%ebp, %r9d
	xorl	%eax, %eax
	pushq	%r14
	.cfi_adjust_cfa_offset 8
	pushq	8(%rsp)                         # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	callq	fprintf
	addq	$16, %rsp
	.cfi_adjust_cfa_offset -16
	movl	$.L.str.4, %edi
	movl	$48, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	fwrite@PLT
	movl	$.L.str.5, %edi
	movl	$183, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	fwrite@PLT
	movl	$.L.str.6, %edi
	movl	$54, %esi
	movl	$1, %edx
	movq	%rbx, %rcx
	addq	$8, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	jmp	fwrite@PLT                      # TAILCALL
.Lfunc_end0:
	.size	_Z16ma_report_headerP8_IO_FILEiiiiii, .Lfunc_end0-_Z16ma_report_headerP8_IO_FILEiiiiii
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z16ma_report_recordP8_IO_FILEPiiiiiiiiiiii
.LCPI1_0:
	.long	0x447a0000                      # float 1000
	.text
	.globl	_Z16ma_report_recordP8_IO_FILEPiiiiiiiiiiii
	.type	_Z16ma_report_recordP8_IO_FILEPiiiiiiiiiiii,@function
_Z16ma_report_recordP8_IO_FILEPiiiiiiiiiiii: # @_Z16ma_report_recordP8_IO_FILEPiiiiiiiiiiii
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	movl	%r9d, %r15d
	movl	%r8d, 16(%rsp)                  # 4-byte Spill
	movl	%ecx, %r9d
	movl	224(%rsp), %ecx
	movl	200(%rsp), %r10d
	xorl	%r11d, %r11d
	cmpl	$1, %edx
	movl	%ecx, %r13d
	cmovel	%r11d, %r13d
	testl	%r10d, %r10d
	jle	.LBB1_8
# %bb.1:                                # %.lr.ph107
	movl	%edx, %r8d
	movl	208(%rsp), %ebp
	movl	192(%rsp), %eax
	movl	%r15d, %r12d
	subl	%ecx, %r12d
	imull	%edx, %r12d
	movl	%eax, %r14d
	negl	%r14d
	movl	%ebp, %eax
	negl	%eax
	movl	%eax, 12(%rsp)                  # 4-byte Spill
	movl	$1, %ecx
	movss	.LCPI1_0(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	movq	%r15, 64(%rsp)                  # 8-byte Spill
	movl	%r9d, 24(%rsp)                  # 4-byte Spill
	movl	%edx, 20(%rsp)                  # 4-byte Spill
	movq	%r13, 56(%rsp)                  # 8-byte Spill
	movq	%r12, 48(%rsp)                  # 8-byte Spill
	movq	%r14, 40(%rsp)                  # 8-byte Spill
.LBB1_2:                                # =>This Loop Header: Depth=1
                                        #     Child Loop BB1_5 Depth 2
	movq	%rsi, (%rsp)                    # 8-byte Spill
	cmpl	$1, %ecx
	movl	216(%rsp), %ebx
	movl	%ebx, %eax
	cmovel	%r11d, %eax
	movq	%rax, 88(%rsp)                  # 8-byte Spill
	cmpl	%r10d, %ecx
	sete	%al
	movl	%ebx, %esi
	cmovel	%r11d, %esi
	cmpl	$1, %ecx
	cmovel	%ebx, %esi
	leal	-2(%rcx), %edx
	imull	%ebx, %edx
	movq	%rcx, 32(%rsp)                  # 8-byte Spill
	cmpl	$1, %ecx
	cmovel	%r11d, %edx
	sete	%cl
	orb	%al, %cl
	movl	16(%rsp), %eax                  # 4-byte Reload
                                        # kill: def $eax killed $eax def $rax
	sarl	%cl, %eax
	cmpl	$0, 192(%rsp)
	jle	.LBB1_3
# %bb.4:                                # %.lr.ph.preheader
                                        #   in Loop: Header=BB1_2 Depth=1
	movl	$1, %r14d
	movl	12(%rsp), %ebx                  # 4-byte Reload
	movq	(%rsp), %rcx                    # 8-byte Reload
	movq	%rsi, 80(%rsp)                  # 8-byte Spill
	movl	%edx, 28(%rsp)                  # 4-byte Spill
	movq	%rax, 72(%rsp)                  # 8-byte Spill
.LBB1_5:                                # %.lr.ph
                                        #   Parent Loop BB1_2 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movl	%r9d, %r12d
	movq	%rcx, %rax
	cmpl	$1, %r14d
	movl	%ebp, %ecx
	cmovel	%r11d, %ecx
	movq	%rcx, 120(%rsp)                 # 8-byte Spill
	movq	40(%rsp), %rcx                  # 8-byte Reload
                                        # kill: def $ecx killed $ecx killed $rcx
	addl	%r14d, %ecx
	movl	%ebp, %r13d
	cmovel	%r11d, %r13d
	sete	%dl
	cmpl	$1, %r14d
	movl	(%rax), %r10d
	movl	4(%rax), %esi
	movq	%rsi, 104(%rsp)                 # 8-byte Spill
	movl	8(%rax), %r9d
	movl	16(%rax), %ecx
	movq	%rcx, 112(%rsp)                 # 8-byte Spill
	movl	20(%rax), %r15d
	movq	%r15, 96(%rsp)                  # 8-byte Spill
	movl	%ebx, %ecx
	cmovel	%r11d, %ecx
	movq	%rcx, 128(%rsp)                 # 8-byte Spill
	cmovel	%ebp, %r13d
	movl	24(%rax), %r11d
	cvtsi2ssl	12(%rax), %xmm0
	sete	%cl
	cvtsi2ssl	28(%rax), %xmm1
	addq	$32, %rax
	movq	%rax, (%rsp)                    # 8-byte Spill
	orb	%dl, %cl
                                        # kill: def $r12d killed $r12d def $r12
	sarl	%cl, %r12d
	divss	%xmm3, %xmm0
	cvtss2sd	%xmm0, %xmm0
	cvtsi2ss	%r15d, %xmm2
	divss	%xmm3, %xmm1
	xorps	%xmm3, %xmm3
	cvtsi2ss	%esi, %xmm3
	cvtss2sd	%xmm1, %xmm1
	cvtsi2ss	%r10d, %xmm4
	movq	%r10, %r15
	subss	%xmm3, %xmm2
	xorps	%xmm3, %xmm3
	cvtsi2ss	%r11d, %xmm3
	divss	%xmm4, %xmm2
	cvtsi2ss	%r9d, %xmm5
	movq	%r9, %r10
	cvtss2sd	%xmm2, %xmm2
	subss	%xmm5, %xmm3
	divss	%xmm4, %xmm3
	cvtss2sd	%xmm3, %xmm3
	subq	$8, %rsp
	.cfi_adjust_cfa_offset 8
	movl	$.L.str.7, %esi
	movq	%rdi, %rbp
	movq	40(%rsp), %rdx                  # 8-byte Reload
                                        # kill: def $edx killed $edx killed $rdx
	movl	%r14d, %ecx
	movl	36(%rsp), %r9d                  # 4-byte Reload
	movb	$4, %al
	pushq	120(%rsp)                       # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	pushq	%r11
	.cfi_adjust_cfa_offset 8
	pushq	120(%rsp)                       # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	pushq	%r15
	movq	104(%rsp), %r15                 # 8-byte Reload
	.cfi_adjust_cfa_offset 8
	pushq	%r10
	.cfi_adjust_cfa_offset 8
	pushq	152(%rsp)                       # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	movl	296(%rsp), %r10d
	pushq	%r10
	.cfi_adjust_cfa_offset 8
	movl	296(%rsp), %r10d
	pushq	%r10
	.cfi_adjust_cfa_offset 8
	movl	296(%rsp), %r10d
	pushq	%r10
	.cfi_adjust_cfa_offset 8
	pushq	%r13
	movq	144(%rsp), %r13                 # 8-byte Reload
	.cfi_adjust_cfa_offset 8
	pushq	168(%rsp)                       # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	pushq	%r13
	.cfi_adjust_cfa_offset 8
	pushq	224(%rsp)                       # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	pushq	200(%rsp)                       # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	pushq	%r15
	.cfi_adjust_cfa_offset 8
	pushq	%r12
	movq	184(%rsp), %r12                 # 8-byte Reload
	.cfi_adjust_cfa_offset 8
	pushq	208(%rsp)                       # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	pushq	%r12
	.cfi_adjust_cfa_offset 8
	pushq	280(%rsp)                       # 8-byte Folded Reload
	.cfi_adjust_cfa_offset 8
	callq	fprintf
	movss	.LCPI1_0(%rip), %xmm3           # xmm3 = mem[0],zero,zero,zero
	xorl	%r11d, %r11d
	movq	%rbp, %rdi
	movl	368(%rsp), %ebp
	movl	180(%rsp), %r8d                 # 4-byte Reload
	movl	184(%rsp), %r9d                 # 4-byte Reload
	addq	$160, %rsp
	.cfi_adjust_cfa_offset -160
	movq	40(%rsp), %rax                  # 8-byte Reload
	addl	%r14d, %eax
	incl	%eax
	movl	%r14d, %ecx
	incl	%ecx
	addl	%ebp, %ebx
	movl	%ecx, %r14d
	movq	(%rsp), %rcx                    # 8-byte Reload
	cmpl	$1, %eax
	jne	.LBB1_5
# %bb.6:                                #   in Loop: Header=BB1_2 Depth=1
	movl	200(%rsp), %r10d
	movq	%rcx, %rsi
	jmp	.LBB1_7
.LBB1_3:                                #   in Loop: Header=BB1_2 Depth=1
	movq	(%rsp), %rsi                    # 8-byte Reload
.LBB1_7:                                # %._crit_edge
                                        #   in Loop: Header=BB1_2 Depth=1
	movq	32(%rsp), %rcx                  # 8-byte Reload
	leal	1(%rcx), %eax
	cmpl	%r10d, %ecx
	movl	%eax, %ecx
	jne	.LBB1_2
.LBB1_8:                                # %._crit_edge108
	addq	$136, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z16ma_report_recordP8_IO_FILEPiiiiiiiiiiii, .Lfunc_end1-_Z16ma_report_recordP8_IO_FILEPiiiiiiiiiiii
	.cfi_endproc
                                        # -- End function
	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"****==== video info (1) ====****\n"
	.size	.L.str, 34

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"vid_size_v,vid_size_h,vid_size_t,uv_ratio_v,uv_ratio_h,uv_ratio_t\n"
	.size	.L.str.1, 67

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"I,I,I,I,I,I\n"
	.size	.L.str.2, 13

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"%d,%d,%d,%d,%d,%d\n"
	.size	.L.str.3, 19

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"****==== encoder measurements analysis ====****\n"
	.size	.L.str.4, 49

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"indx_v,indx_h,indx_t,ofst_v,ofst_h,ofst_t,len_v,len_h,len_t,ovlp_b_v,ovlp_b_h,ovlp_b_t,ovlp_f_v,ovlp_f_h,ovlp_f_t,w_blk,w_type,mxv,mxp_v,mxp_h,mxp_t,mdv,mdp_v,mdp_h,mdp_t,vlc_v,vlc_h\n"
	.size	.L.str.5, 184

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,F,I,I,I,F,I,I,I,F,F\n"
	.size	.L.str.6, 55

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%f,%d,%d,%d,%f,%d,%d,%d,%f,%f\n"
	.size	.L.str.7, 82

	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_

	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
