// File: /workspace/github_cpp_makefile_star2_O2/OtherCrashOverride[P]xu4enc/./M2M.h
// Function: M2M::EnumFormats(unsigned int)
void EnumFormats(uint32_t v4l2BufType)
	{
		int io;

		v4l2_fmtdesc formatDesc = { 0 };
		formatDesc.type = v4l2BufType; //V4L2_BUF_TYPE_VIDEO_CAPTURE;

		fprintf(stderr, "Supported formats:\n");
		while (true)
		{
			io = ioctl(mfc_fd, VIDIOC_ENUM_FMT, &formatDesc);
			if (io < 0)
			{
				//printf("VIDIOC_ENUM_FMT failed.\n");
				break;
			}

			fprintf(stderr, "\tdescription = %s, pixelformat=0x%x\n", formatDesc.description, formatDesc.pixelformat);


			v4l2_frmsizeenum formatSize = { 0 };
			formatSize.pixel_format = formatDesc.pixelformat;

			while (true)
			{
				io = ioctl(mfc_fd, VIDIOC_ENUM_FRAMESIZES, &formatSize);
				if (io < 0)
				{
					//printf("VIDIOC_ENUM_FRAMESIZES failed.\n");
					break;
				}

				fprintf(stderr, "\t\twidth = %d, height = %d\n", formatSize.discrete.width, formatSize.discrete.height);


				v4l2_frmivalenum frameInterval = { 0 };
				frameInterval.pixel_format = formatSize.pixel_format;
				frameInterval.width = formatSize.discrete.width;
				frameInterval.height = formatSize.discrete.height;

				while (true)
				{
					io = ioctl(mfc_fd, VIDIOC_ENUM_FRAMEINTERVALS, &frameInterval);
					if (io < 0)
					{
						//printf("VIDIOC_ENUM_FRAMEINTERVALS failed.\n");
						break;
					}

					fprintf(stderr, "\t\t\tnumerator = %d, denominator = %d\n", frameInterval.discrete.numerator, frameInterval.discrete.denominator);
					++frameInterval.index;
				}


				++formatSize.index;
			}

			++formatDesc.index;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
movl $0xc02c564a, %r14d      # imm = 0xC02C564A
xorps %xmm0, %xmm0
leaq -0xd4(%rbp), %rax
movaps %xmm0, -0xc(%rax)
movaps %xmm0, 0x24(%rax)
movaps %xmm0, 0x14(%rax)
movaps %xmm0, 0x4(%rax)
movl %esi, -0x8(%rax)
movq 0x4285(%rip), %r15      # 0x6fd8
movq (%r15), %rcx
leaq 0x1502(%rip), %rdi      # 0x425f
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
callq 0x21e0
leaq 0x13ffb8(%r14), %rsi
leaq -0xe0(%rbp), %rdx
leaq 0x80001(%r14), %r12
movl 0x8(%rbx), %edi
movq %rsi, %r14
movq %rdx, %r13
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x2e80
movq (%r15), %rdi
movl -0xb4(%rbp), %ecx
leaq 0x14ce(%rip), %rsi      # 0x4273
leaq -0xd4(%rbp), %rdx
xorl %eax, %eax
callq 0x2120
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movups %xmm0, -0x44(%rbp)
movaps %xmm0, -0x50(%rbp)
movl -0xb4(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl 0x8(%rbx), %edi
movl $0xc02c564a, %esi       # imm = 0xC02C564A
leaq -0x60(%rbp), %rdx
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x2e6f
movq (%r15), %rdi
movl -0x54(%rbp), %edx
movl -0x50(%rbp), %ecx
leaq 0x14a2(%rip), %rsi      # 0x4298
xorl %eax, %eax
callq 0x2120
xorps %xmm0, %xmm0
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
andl $0x0, -0x70(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x9c(%rbp)
movq -0x54(%rbp), %rax
movq %rax, -0x98(%rbp)
movl 0x8(%rbx), %edi
movq %r12, %rsi
leaq -0xa0(%rbp), %rdx
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x2e67
movq (%r15), %rdi
movl -0x8c(%rbp), %edx
movl -0x88(%rbp), %ecx
leaq 0x145b(%rip), %rsi      # 0x42b3
xorl %eax, %eax
callq 0x2120
incl -0xa0(%rbp)
jmp 0x2e2a
incl -0x60(%rbp)
jmp 0x2dcb
incl -0xe0(%rbp)
movq %r14, %rsi
movq %r13, %rdx
jmp 0x2d7d
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq