	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpfe_check_format
_vpfe_check_format:                     ## @vpfe_check_format
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rsi), %rdi
	callq	_vpfe_lookup_pix_format
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	32(%rbx), %rdi
	movq	%rdi, (%r15)
	callq	_vpfe_lookup_pix_format
	movq	%rax, %r14
LBB0_2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_ccdc_dev@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	leaq	-56(%rbp), %rdi
	xorl	%esi, %esi
	callq	*(%rax)
	testq	%rax, %rax
	js	LBB0_7
## %bb.3:
	movl	$1, %ebx
	leaq	-56(%rbp), %r12
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	cmpq	-56(%rbp), %rax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r13), %rax
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	*(%rax)
	incl	%ebx
	testq	%rax, %rax
	jns	LBB0_5
LBB0_7:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	32(%rbx), %rdi
	movq	%rdi, (%r15)
	callq	_vpfe_lookup_pix_format
	movq	%rax, %r14
	jmp	LBB0_8
LBB0_6:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_8:
	movl	8(%r15), %eax
	movq	_V4L2_FIELD_ANY@GOTPCREL(%rip), %rdx
	movl	40(%rbx), %ecx
	cmpl	(%rdx), %eax
	jne	LBB0_9
LBB0_15:
	movl	%ecx, 8(%r15)
	jmp	LBB0_16
LBB0_9:
	cmpl	%eax, %ecx
	jne	LBB0_10
LBB0_16:
	movl	%ecx, %eax
LBB0_19:
	addl	$-128, %eax
	andl	$-3, %eax
	xorl	%r12d, %r12d
	cmpl	$1, %eax
	adcq	$1, %r12
	movq	8(%rbx), %rdx
	movq	16(%rbx), %rcx
	movq	8(%r14), %r8
	movq	%r8, %rax
	shrq	$32, %rax
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_20
## %bb.21:
	movl	$32, %eax
	xorl	%edx, %edx
	idivq	%r8
	movq	%rax, %r13
	jmp	LBB0_22
LBB0_20:
	movl	$32, %eax
	xorl	%edx, %edx
	divl	%r8d
	movl	%eax, %r13d
LBB0_22:
	movl	12(%r15), %edx
	movl	16(%r15), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%eax, %eax
	callq	_v4l2_info
	movl	12(%r15), %edi
	movq	%r13, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_clamp
	movl	%eax, 12(%r15)
	movl	16(%r15), %edi
	movq	%r12, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_clamp
	movl	%eax, 16(%r15)
	cmpl	$130, 8(%r15)
	jne	LBB0_24
## %bb.23:
	andl	$-2, %eax
	movl	%eax, 16(%r15)
LBB0_24:
	xorl	%esi, %esi
	movl	12(%r15), %edx
	movl	8(%r14), %r8d
	movl	%edx, %r9d
	imull	%r8d, %r9d
	addl	$31, %r9d
	andl	$-32, %r9d
	movl	%r9d, 20(%r15)
	movq	(%r15), %rcx
	movq	_V4L2_PIX_FMT_NV12@GOTPCREL(%rip), %r10
	movl	%eax, %ebx
	imull	%r9d, %ebx
	movl	%ebx, %edi
	sarl	%edi
	cmpq	(%r10), %rcx
	cmovnel	%esi, %edi
	addl	%ebx, %edi
	movl	%edi, 24(%r15)
	movl	%edi, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_v4l2_info
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	cmpl	$130, %eax
	je	LBB0_13
## %bb.11:
	cmpl	$129, %eax
	je	LBB0_17
## %bb.12:
	cmpl	$128, %eax
	jne	LBB0_15
LBB0_13:
	cmpl	$0, 24(%rbx)
	jne	LBB0_19
## %bb.14:
	movl	$129, %ecx
	jmp	LBB0_15
LBB0_17:
	movl	$130, %ecx
	cmpl	$0, 24(%rbx)
	jne	LBB0_15
## %bb.18:
	movl	$129, %eax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_ccdc_dev,8,3                   ## @ccdc_dev
	.comm	_V4L2_FIELD_ANY,4,2             ## @V4L2_FIELD_ANY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"width = %d, height = %d, bpp = %d\n"

	.comm	_V4L2_PIX_FMT_NV12,8,3          ## @V4L2_PIX_FMT_NV12
L_.str.1:                               ## @.str.1
	.asciz	"adjusted width = %d, height = %d, bpp = %d, bytesperline = %d, sizeimage = %d\n"

	.no_dead_strip	_vpfe_check_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpfe_check_format
_vpfe_check_format:                     ; @vpfe_check_format
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
	ldr	x0, [x1]
	bl	_vpfe_lookup_pix_format
	mov	x21, x0
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	x0, [x19, #32]
	str	x0, [x20]
	bl	_vpfe_lookup_pix_format
	mov	x21, x0
LBB0_2:
Lloh0:
	adrp	x23, _ccdc_dev@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ccdc_dev@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x8, [x8]
	add	x0, sp, #24
	mov	w1, #0
	blr	x8
	tbnz	x0, #63, LBB0_6
; %bb.3:
	mov	w22, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x9, [sp, #24]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x23]
	ldr	x8, [x8]
	add	x0, sp, #24
	mov	x1, x22
	blr	x8
	add	w22, w22, #1
	tbz	x0, #63, LBB0_4
LBB0_6:
	ldr	x0, [x19, #32]
	str	x0, [x20]
	bl	_vpfe_lookup_pix_format
	mov	x21, x0
LBB0_7:
	ldr	w9, [x20, #8]
Lloh2:
	adrp	x8, _V4L2_FIELD_ANY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_FIELD_ANY@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x8]
	ldr	w8, [x19, #40]
	cmp	w9, w10
	b.ne	LBB0_9
LBB0_8:
	str	w8, [x20, #8]
	b	LBB0_18
LBB0_9:
	cmp	w8, w9
	b.eq	LBB0_18
; %bb.10:
	cmp	w9, #130
	b.eq	LBB0_13
; %bb.11:
	cmp	w9, #129
	b.eq	LBB0_15
; %bb.12:
	cmp	w9, #128
	b.ne	LBB0_8
LBB0_13:
	ldr	w10, [x19, #24]
	mov	x8, x9
	cbnz	w10, LBB0_18
; %bb.14:
	mov	w8, #129
	b	LBB0_8
LBB0_15:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_17
; %bb.16:
	mov	w8, #130
	b	LBB0_8
LBB0_17:
	mov	w8, #129
LBB0_18:
	sub	w8, w8, #128
	tst	w8, #0xfffffffd
	mov	w8, #1
	cinc	x22, x8, eq
	ldp	x23, x24, [x19, #8]
	ldr	x4, [x21, #8]
	mov	w8, #32
	ldp	w2, w3, [x20, #12]
	sdiv	x25, x8, x4
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_v4l2_info
	ldr	w0, [x20, #12]
	mov	x1, x25
	mov	x2, x23
	bl	_clamp
	str	w0, [x20, #12]
	ldr	w0, [x20, #16]
	mov	x1, x22
	mov	x2, x24
	bl	_clamp
	mov	x3, x0
	str	w3, [x20, #16]
	ldr	w8, [x20, #8]
	cmp	w8, #130
	b.ne	LBB0_20
; %bb.19:
	and	w3, w3, #0xfffffffe
	str	w3, [x20, #16]
LBB0_20:
	ldr	w2, [x20, #12]
	ldr	w4, [x21, #8]
	orr	w8, wzr, #0x1f
	madd	w8, w2, w4, w8
	and	w8, w8, #0xffffffe0
	ldr	x9, [x20]
Lloh7:
	adrp	x10, _V4L2_PIX_FMT_NV12@GOTPAGE
Lloh8:
	ldr	x10, [x10, _V4L2_PIX_FMT_NV12@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	mul	w11, w3, w8
	asr	w12, w11, #1
	cmp	x9, x10
	csel	w9, w12, wzr, eq
	add	w9, w11, w9
	stp	w8, w9, [x20, #20]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	stp	x8, x9, [sp]
	mov	x0, x19
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_v4l2_info
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ccdc_dev,8,3                   ; @ccdc_dev
	.comm	_V4L2_FIELD_ANY,4,2             ; @V4L2_FIELD_ANY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"width = %d, height = %d, bpp = %d\n"

	.comm	_V4L2_PIX_FMT_NV12,8,3          ; @V4L2_PIX_FMT_NV12
l_.str.1:                               ; @.str.1
	.asciz	"adjusted width = %d, height = %d, bpp = %d, bytesperline = %d, sizeimage = %d\n"

	.no_dead_strip	_vpfe_check_format
.subsections_via_symbols
