	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpif_check_format
_vpif_check_format:                     ## @vpif_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	24(%rdi), %r15
	movq	_VPIF_VIDEO_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %ebx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	$2, %edi
	callq	_vpif_dbg
	movq	16(%r13), %rax
	movq	_VPIF_IF_RAW_BAYER@GOTPCREL(%rip), %rdx
	movq	8(%r12), %rcx
	cmpq	(%rdx), %rax
	jne	LBB0_5
## %bb.1:
	movq	_V4L2_PIX_FMT_SBGGR8@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rcx
	je	LBB0_9
## %bb.2:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_8
## %bb.3:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_4
LBB0_5:
	movq	_V4L2_PIX_FMT_YUV422P@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rcx
	je	LBB0_9
## %bb.6:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
LBB0_8:
	movq	%rax, 8(%r12)
LBB0_9:
	movl	%ebx, %edi
	callq	_VPIF_VALID_FIELD
	testl	%eax, %eax
	je	LBB0_10
## %bb.12:
	movq	_V4L2_FIELD_ANY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_13
	jmp	LBB0_14
LBB0_10:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_11
LBB0_13:
	leaq	16(%r13), %rdi
	callq	_vpif_get_default_field
LBB0_14:
	movl	16(%r12), %ebx
	movl	8(%r13), %eax
	cmpl	%eax, %ebx
	jge	LBB0_17
## %bb.15:
	movl	%eax, %ebx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_16
LBB0_17:
	movq	_V4L2_MEMORY_USERPTR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	shlq	$4, %rsi
	cmpq	(%r15,%rsi), %rax
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_19
## %bb.18:
	leaq	20(%r12), %rax
	jmp	LBB0_20
LBB0_19:
	movq	_config_params@GOTPCREL(%rip), %rcx
	movq	(%r13), %rax
	shlq	$2, %rax
	addq	(%rcx), %rax
LBB0_20:
	movl	(%rax), %eax
	leal	(%rbx,%rbx), %ecx
	cltd
	idivl	%ecx
	movl	%eax, %r15d
	movl	12(%r13), %eax
	cmpl	%eax, %r15d
	jge	LBB0_23
## %bb.21:
	movl	%eax, %r15d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_22
LBB0_23:
	movq	%rsi, %r13
	movl	%ebx, %edi
	movl	$8, %esi
	callq	_ALIGN
	testl	%eax, %eax
	je	LBB0_24
## %bb.27:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movq	%r13, %rdx
	jne	LBB0_28
	jmp	LBB0_29
LBB0_24:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_25
## %bb.26:
	movq	%r13, %rdx
	leal	7(%rbx), %eax
	addl	$14, %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	andl	$-8, %ebx
LBB0_28:
	movl	%ebx, 16(%r12)
	imull	%ebx, %r15d
	addl	%r15d, %r15d
	movl	%r15d, 20(%r12)
LBB0_29:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	12(%rcx,%rdx), %eax
	movl	%eax, 28(%r12)
	movl	8(%rcx,%rdx), %eax
	movl	%eax, 24(%r12)
	xorl	%r14d, %r14d
	jmp	LBB0_30
LBB0_16:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	jmp	LBB0_4
LBB0_11:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_4
LBB0_22:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	jmp	LBB0_4
LBB0_7:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_4
LBB0_25:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
LBB0_4:
	movl	$2, %edi
	callq	_vpif_dbg
LBB0_30:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ## @VPIF_VIDEO_INDEX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vpif_check_format\n"

	.comm	_VPIF_IF_RAW_BAYER,8,3          ## @VPIF_IF_RAW_BAYER
	.comm	_V4L2_PIX_FMT_SBGGR8,8,3        ## @V4L2_PIX_FMT_SBGGR8
L_.str.1:                               ## @.str.1
	.asciz	"invalid pix format\n"

	.comm	_V4L2_PIX_FMT_YUV422P,8,3       ## @V4L2_PIX_FMT_YUV422P
L_.str.2:                               ## @.str.2
	.asciz	"invalid pixel format\n"

L_.str.3:                               ## @.str.3
	.asciz	"invalid field format\n"

	.comm	_V4L2_FIELD_ANY,4,2             ## @V4L2_FIELD_ANY
L_.str.4:                               ## @.str.4
	.asciz	"invalid hpitch\n"

	.comm	_V4L2_MEMORY_USERPTR,8,3        ## @V4L2_MEMORY_USERPTR
	.comm	_config_params,8,3              ## @config_params
L_.str.5:                               ## @.str.5
	.asciz	"Invalid vpitch\n"

L_.str.6:                               ## @.str.6
	.asciz	"invalid pitch alignment\n"

	.no_dead_strip	_vpif_check_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpif_check_format
_vpif_check_format:                     ; @vpif_check_format
	.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, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x25, [x0, #24]
Lloh0:
	adrp	x8, _VPIF_VIDEO_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VPIF_VIDEO_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	x26, [x8]
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	ldr	w23, [x1]
Lloh5:
	ldr	w8, [x8]
	neg	w19, w8
Lloh6:
	adrp	x27, _debug@GOTPAGE
Lloh7:
	ldr	x27, [x27, _debug@GOTPAGEOFF]
	ldr	w1, [x27]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #2
	bl	_vpif_dbg
	mov	x24, x22
	ldr	x8, [x24, #16]!
Lloh10:
	adrp	x9, _VPIF_IF_RAW_BAYER@GOTPAGE
Lloh11:
	ldr	x9, [x9, _VPIF_IF_RAW_BAYER@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x9]
	ldr	x9, [x20, #8]
	cmp	x8, x10
	b.ne	LBB0_4
; %bb.1:
Lloh13:
	adrp	x8, _V4L2_PIX_FMT_SBGGR8@GOTPAGE
Lloh14:
	ldr	x8, [x8, _V4L2_PIX_FMT_SBGGR8@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_7
; %bb.2:
	cbnz	w21, LBB0_6
; %bb.3:
	ldr	w1, [x27]
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_29
LBB0_4:
Lloh18:
	adrp	x8, _V4L2_PIX_FMT_YUV422P@GOTPAGE
Lloh19:
	ldr	x8, [x8, _V4L2_PIX_FMT_YUV422P@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_7
; %bb.5:
	cbz	w21, LBB0_27
LBB0_6:
	str	x8, [x20, #8]
LBB0_7:
	mov	x0, x23
	bl	_VPIF_VALID_FIELD
	cbz	w0, LBB0_9
; %bb.8:
Lloh21:
	adrp	x8, _V4L2_FIELD_ANY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _V4L2_FIELD_ANY@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w23, w8
	b.eq	LBB0_10
	b	LBB0_11
LBB0_9:
	cbz	w21, LBB0_25
LBB0_10:
	mov	x0, x24
	bl	_vpif_get_default_field
LBB0_11:
	ldr	w23, [x20, #16]
	ldr	w8, [x22, #8]
	cmp	w23, w8
	b.ge	LBB0_13
; %bb.12:
	mov	x23, x8
	cbz	w21, LBB0_24
LBB0_13:
Lloh24:
	adrp	x8, _V4L2_MEMORY_USERPTR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _V4L2_MEMORY_USERPTR@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	lsl	x9, x26, #4
	ldr	x9, [x25, x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:
	add	x8, x20, #20
	b	LBB0_16
LBB0_15:
Lloh27:
	adrp	x8, _config_params@GOTPAGE
Lloh28:
	ldr	x8, [x8, _config_params@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	ldr	x9, [x22]
	add	x8, x8, x9, lsl #2
LBB0_16:
	ldr	w8, [x8]
	lsl	w9, w23, #1
	sdiv	w24, w8, w9
	ldr	w8, [x22, #12]
	cmp	w24, w8
	b.ge	LBB0_18
; %bb.17:
	mov	x24, x8
	cbz	w21, LBB0_26
LBB0_18:
	mov	x0, x23
	mov	w1, #8
	bl	_ALIGN
	cbz	w0, LBB0_20
; %bb.19:
	cbnz	w21, LBB0_22
	b	LBB0_23
LBB0_20:
	cbz	w21, LBB0_28
; %bb.21:
	add	w8, w23, #7
	add	w9, w23, #14
	cmp	w8, #0
	csel	w8, w9, w8, lt
	and	w23, w8, #0xfffffff8
LBB0_22:
	mul	w8, w24, w23
	lsl	w8, w8, #1
	stp	w23, w8, [x20, #16]
LBB0_23:
	mov	w19, #0
	add	x8, x25, x26, lsl #4
	ldr	d0, [x8, #8]
	str	d0, [x20, #24]
	b	LBB0_30
LBB0_24:
	ldr	w1, [x27]
Lloh30:
	adrp	x2, l_.str.4@PAGE
Lloh31:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_29
LBB0_25:
	ldr	w1, [x27]
Lloh32:
	adrp	x2, l_.str.3@PAGE
Lloh33:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_29
LBB0_26:
	ldr	w1, [x27]
Lloh34:
	adrp	x2, l_.str.5@PAGE
Lloh35:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_29
LBB0_27:
	ldr	w1, [x27]
Lloh36:
	adrp	x2, l_.str.2@PAGE
Lloh37:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_29
LBB0_28:
	ldr	w1, [x27]
Lloh38:
	adrp	x2, l_.str.6@PAGE
Lloh39:
	add	x2, x2, l_.str.6@PAGEOFF
LBB0_29:
	mov	w0, #2
	bl	_vpif_dbg
LBB0_30:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ; @VPIF_VIDEO_INDEX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vpif_check_format\n"

	.comm	_VPIF_IF_RAW_BAYER,8,3          ; @VPIF_IF_RAW_BAYER
	.comm	_V4L2_PIX_FMT_SBGGR8,8,3        ; @V4L2_PIX_FMT_SBGGR8
l_.str.1:                               ; @.str.1
	.asciz	"invalid pix format\n"

	.comm	_V4L2_PIX_FMT_YUV422P,8,3       ; @V4L2_PIX_FMT_YUV422P
l_.str.2:                               ; @.str.2
	.asciz	"invalid pixel format\n"

l_.str.3:                               ; @.str.3
	.asciz	"invalid field format\n"

	.comm	_V4L2_FIELD_ANY,4,2             ; @V4L2_FIELD_ANY
l_.str.4:                               ; @.str.4
	.asciz	"invalid hpitch\n"

	.comm	_V4L2_MEMORY_USERPTR,8,3        ; @V4L2_MEMORY_USERPTR
	.comm	_config_params,8,3              ; @config_params
l_.str.5:                               ; @.str.5
	.asciz	"Invalid vpitch\n"

l_.str.6:                               ; @.str.6
	.asciz	"invalid pitch alignment\n"

	.no_dead_strip	_vpif_check_format
.subsections_via_symbols
