	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_try_fmt_vid_cap
_vidioc_try_fmt_vid_cap:                ## @vidioc_try_fmt_vid_cap
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rdx
	movq	(%rsi), %rbx
	movq	(%rbx), %r15
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_DEB_EE
	movl	24(%r14), %esi
	movq	%rbx, %rdi
	callq	_saa7146_format_by_fourcc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	(%r14), %esi
	movq	8(%r15), %rcx
	movl	(%rcx), %edx
	movl	4(%rcx), %ecx
	movq	_V4L2_FIELD_ANY@GOTPCREL(%rip), %rdi
	cmpl	%esi, (%rdi)
	jne	LBB0_5
## %bb.3:
	movl	%ecx, %edi
	shrl	$31, %edi
	addl	%ecx, %edi
	sarl	%edi
	movl	$130, %esi
	cmpl	%edi, 4(%r14)
	jle	LBB0_4
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_5:
	leal	-128(%rsi), %edi
	cmpl	$3, %edi
	ja	LBB0_8
## %bb.6:
	leaq	LJTI0_0(%rip), %rbx
	movslq	(%rbx,%rdi,4), %rdi
	addq	%rbx, %rdi
	jmpq	*%rdi
LBB0_4:
	movl	$129, (%r15)
	movl	%ecx, %edi
	shrl	$31, %edi
	addl	%ecx, %edi
	sarl	%edi
LBB0_10:
	movl	%edi, %ecx
	jmp	LBB0_11
LBB0_7:
	movl	$129, (%r15)
	movl	$129, %esi
LBB0_11:
	movl	%esi, (%r14)
	movq	_V4L2_COLORSPACE_SMPTE170M@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, 20(%r14)
	movl	8(%r14), %esi
	cmpl	%edx, %esi
	jle	LBB0_13
## %bb.12:
	movl	%edx, 8(%r14)
	movl	%edx, %esi
LBB0_13:
	movl	4(%r14), %edx
	cmpl	%ecx, %edx
	jle	LBB0_15
## %bb.14:
	movl	%ecx, 4(%r14)
	movl	%ecx, %edx
LBB0_15:
	movl	(%rax), %edi
	movl	%edi, %ecx
	imull	%esi, %ecx
	leal	7(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$3, %eax
	movl	12(%r14), %ecx
	cmpl	%eax, %ecx
	jge	LBB0_17
## %bb.16:
	movl	%eax, 12(%r14)
	movl	%eax, %ecx
LBB0_17:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	imull	(%rbx), %edi
	movl	%edi, %ebx
	addl	%edi, %ebx
	leal	7(%rdi,%rdi), %edi
	cmovnsl	%ebx, %edi
	sarl	$3, %edi
	cmpl	%edi, %ecx
	jle	LBB0_19
## %bb.18:
	movl	%eax, 12(%r14)
	movl	%eax, %ecx
LBB0_19:
	movl	%edx, %r8d
	imull	%ecx, %r8d
	movl	%r8d, 16(%r14)
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DEB_D
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_DEB_D
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_9:
	movl	$128, (%r15)
	movl	%ecx, %edi
	shrl	$31, %edi
	addl	%ecx, %edi
	sarl	%edi
	movl	$131, %esi
	jmp	LBB0_10
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_7
	.long	L0_0_set_4
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"V4L2_BUF_TYPE_VIDEO_CAPTURE: dev:%p, fh:%p\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_FIELD_ANY,4,2             ## @V4L2_FIELD_ANY
L_.str.1:                               ## @.str.1
	.asciz	"no known field mode '%d'\n"

	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ## @V4L2_COLORSPACE_SMPTE170M
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"w:%d, h:%d, bytesperline:%d, sizeimage:%d\n"

	.no_dead_strip	_vidioc_try_fmt_vid_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_try_fmt_vid_cap
_vidioc_try_fmt_vid_cap:                ; @vidioc_try_fmt_vid_cap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x2, x1
	ldr	x20, [x1]
	ldr	x21, [x20]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_DEB_EE
	ldr	w1, [x19, #24]
	mov	x0, x20
	bl	_saa7146_format_by_fourcc
	cbz	x0, LBB0_9
; %bb.1:
	ldr	w1, [x19]
	ldr	x8, [x21, #8]
	ldp	w9, w8, [x8]
Lloh2:
	adrp	x10, _V4L2_FIELD_ANY@GOTPAGE
Lloh3:
	ldr	x10, [x10, _V4L2_FIELD_ANY@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	cmp	w10, w1
	b.ne	LBB0_4
; %bb.2:
	ldr	w10, [x19, #4]
	cmp	w8, #0
	cinc	w11, w8, lt
	cmp	w10, w11, asr #1
	b.gt	LBB0_7
; %bb.3:
	mov	w1, #130
	b	LBB0_6
LBB0_4:
	sub	w10, w1, #128
	cmp	w10, #3
	b.hi	LBB0_8
; %bb.5:
Lloh5:
	adrp	x11, lJTI0_0@PAGE
Lloh6:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_6
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_6:
	mov	w10, #129
	str	w10, [x21]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	b	LBB0_11
LBB0_7:
	mov	w1, #129
	str	w1, [x21]
	b	LBB0_11
LBB0_8:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DEB_D
LBB0_9:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_20
LBB0_10:
	mov	w10, #128
	str	w10, [x21]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	mov	w1, #131
LBB0_11:
	str	w1, [x19]
Lloh12:
	adrp	x10, _V4L2_COLORSPACE_SMPTE170M@GOTPAGE
Lloh13:
	ldr	x10, [x10, _V4L2_COLORSPACE_SMPTE170M@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	str	w10, [x19, #20]
	ldr	w1, [x19, #8]
	cmp	w1, w9
	b.le	LBB0_13
; %bb.12:
	str	w9, [x19, #8]
	mov	x1, x9
LBB0_13:
	ldr	w9, [x19, #4]
	cmp	w9, w8
	b.le	LBB0_15
; %bb.14:
	str	w8, [x19, #4]
	mov	x9, x8
LBB0_15:
	ldr	w11, [x0]
	mul	w8, w11, w1
	add	w10, w8, #7
	cmp	w8, #0
	csel	w8, w10, w8, lt
	asr	w10, w8, #3
	ldr	w8, [x19, #12]
	cmp	w8, w10
	b.ge	LBB0_17
; %bb.16:
	str	w10, [x19, #12]
	mov	x8, x10
LBB0_17:
Lloh15:
	adrp	x12, _PAGE_SIZE@GOTPAGE
Lloh16:
	ldr	x12, [x12, _PAGE_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w12, [x12]
	mul	w11, w11, w12
	lsl	w11, w11, #1
	add	w12, w11, #7
	cmp	w11, #0
	csel	w11, w12, w11, lt
	cmp	w8, w11, asr #3
	b.le	LBB0_19
; %bb.18:
	str	w10, [x19, #12]
	mov	x8, x10
LBB0_19:
	mul	w10, w9, w8
	str	w10, [x19, #16]
	stp	x8, x10, [sp, #8]
	str	x9, [sp]
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DEB_D
	mov	w0, #0
LBB0_20:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_10-LBB0_6)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"V4L2_BUF_TYPE_VIDEO_CAPTURE: dev:%p, fh:%p\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_FIELD_ANY,4,2             ; @V4L2_FIELD_ANY
l_.str.1:                               ; @.str.1
	.asciz	"no known field mode '%d'\n"

	.comm	_V4L2_COLORSPACE_SMPTE170M,4,2  ; @V4L2_COLORSPACE_SMPTE170M
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"w:%d, h:%d, bytesperline:%d, sizeimage:%d\n"

	.no_dead_strip	_vidioc_try_fmt_vid_cap
.subsections_via_symbols
