// File: /workspace/github_cpp_makefile_star2_O1/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, %r12d      # imm = 0xC02C564A
xorps %xmm0, %xmm0
leaq -0xe0(%rbp), %r15
movaps %xmm0, (%r15)
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x20(%r15)
movaps %xmm0, 0x10(%r15)
movl %esi, 0x4(%r15)
movq 0x5d59(%rip), %r14      # 0x7fd8
movq (%r14), %rcx
leaq 0x2fd6(%rip), %rdi      # 0x525f
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
callq 0x21e0
movl 0x8(%rbx), %edi
leaq 0x13ffb8(%r12), %rsi
movq %rsi, -0x68(%rbp)
movq %r15, %rdx
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x23c0
leaq 0x80001(%r12), %r15
leaq -0xa0(%rbp), %r12
leaq 0x2fe8(%rip), %r13      # 0x52b3
movq (%r14), %rdi
movl -0xb4(%rbp), %ecx
leaq 0x2f98(%rip), %rsi      # 0x5273
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 0x239d
movq (%r14), %rdi
movl -0x54(%rbp), %edx
movl -0x50(%rbp), %ecx
leaq 0x2f6c(%rip), %rsi      # 0x5298
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 %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
js 0x2395
movq (%r14), %rdi
movl -0x8c(%rbp), %edx
movl -0x88(%rbp), %ecx
movq %r13, %rsi
xorl %eax, %eax
callq 0x2120
incl -0xa0(%rbp)
jmp 0x2360
incl -0x60(%rbp)
jmp 0x2301
incl -0xe0(%rbp)
movl 0x8(%rbx), %edi
movq -0x68(%rbp), %rsi
leaq -0xe0(%rbp), %rdx
xorl %eax, %eax
callq 0x2110
testl %eax, %eax
jns 0x22cb
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq