	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __camif_video_try_format
___camif_video_try_format:              ## @__camif_video_try_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	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	addq	$24, %rsi
	xorl	%edx, %edx
	callq	_s3c_camif_find_format
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, %eax
	jmp	LBB0_5
LBB0_2:
	testq	%r13, %r13
	je	LBB0_4
## %bb.3:
	movq	%r15, (%r13)
LBB0_4:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r13
	leaq	4(%r12), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%r12), %esi
	movl	4(%r12), %edx
	movl	8(%r14), %ecx
	movl	12(%r14), %r8d
	movl	8(%r12), %r9d
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
	movq	_SCALER_MAX_RATIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	bsfl	8(%r14), %ecx
	addb	$-2, %cl
	movl	$1, %ebx
	movl	$1, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	callq	_min
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movl	%eax, %r15d
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	bsfl	12(%r14), %ecx
	movq	_SCALER_MAX_RATIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	movl	%ebx, %esi
	callq	_min
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_u32@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shlq	$4, %r13
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx,%r13), %esi
	movl	8(%r14), %eax
	xorl	%edx, %edx
	divl	%r15d
	movl	%eax, %edx
	callq	_max_t
	movl	4(%rbx,%r13), %esi
	movq	%rbx, %r15
	movl	%eax, %edi
	callq	_round_up
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_u32@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r14), %eax
	xorl	%edx, %edx
	divl	-56(%rbp)                       ## 4-byte Folded Reload
	movl	$8, %esi
	movl	%eax, %edx
	callq	_max_t
	movl	%eax, %edi
	movl	$8, %esi
	callq	_round_up
	movl	%eax, %r14d
	movl	12(%rbx,%r13), %edx
	movl	4(%rbx,%r13), %eax
	movl	8(%rbx,%r13), %ebx
	bsfl	%eax, %eax
	movl	$-1, %ecx
	cmovnel	%eax, %ecx
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %esi
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movl	%r14d, %r9d
	pushq	$0
	pushq	$0
	pushq	%rbx
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movl	(%r12), %esi
	movl	4(%r12), %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %eax
	imull	%esi, %eax
	movl	%eax, 8(%r12)
	movl	%edx, %eax
	imull	%esi, %eax
	imull	4(%rcx), %eax
	movq	%rcx, %rdi
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movl	%ecx, 12(%r12)
	movl	8(%rdi), %eax
	movl	%eax, 24(%r12)
	movq	_V4L2_COLORSPACE_JPEG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r12)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %ecx
	movl	%r14d, %r8d
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	xorl	%eax, %eax
	pushq	-56(%rbp)                       ## 8-byte Folded Reload
	callq	_pr_debug
	xorl	%eax, %eax
	addq	$16, %rsp
LBB0_5:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fmt: %ux%u, crop: %ux%u, bytesperline: %u\n"

	.comm	_SCALER_MAX_RATIO,4,2           ## @SCALER_MAX_RATIO
	.comm	_u32,4,2                        ## @u32
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ## @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
L_.str.1:                               ## @.str.1
	.asciz	"%ux%u, wmin: %d, hmin: %d, sc_hrmax: %d, sc_vrmax: %d\n"

	.no_dead_strip	___camif_video_try_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __camif_video_try_format
___camif_video_try_format:              ; @__camif_video_try_format
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x25, [x0, #8]
	add	x1, x1, #24
	mov	w2, #0
	bl	_s3c_camif_find_format
	mov	x20, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	cbz	x22, LBB0_4
; %bb.3:
	str	x20, [x22]
LBB0_4:
	ldr	x8, [x25]
	ldr	x24, [x8]
	ldr	x26, [x21]
	ldr	w1, [x19]
	mov	x21, x19
	ldr	w2, [x21, #4]!
	ldp	w3, w4, [x25, #8]
	ldr	w5, [x19, #8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
Lloh5:
	adrp	x23, _SCALER_MAX_RATIO@GOTPAGE
Lloh6:
	ldr	x23, [x23, _SCALER_MAX_RATIO@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	w8, [x25, #8]
	rbit	w8, w8
	clz	w8, w8
	sub	w8, w8, #2
	mov	w27, #1
	lsl	w1, w27, w8
	bl	_min
	mov	x22, x0
	ldr	w0, [x23]
	ldr	w8, [x25, #12]
	rbit	w8, w8
	clz	w8, w8
	lsl	w1, w27, w8
	bl	_min
	mov	x23, x0
Lloh7:
	adrp	x27, _u32@GOTPAGE
Lloh8:
	ldr	x27, [x27, _u32@GOTPAGEOFF]
	ldr	w0, [x27]
	add	x26, x24, x26, lsl #4
	ldr	w1, [x26]
	ldr	w8, [x25, #8]
	udiv	w2, w8, w22
	bl	_max_t
	ldr	w1, [x26, #4]
	bl	_round_up
	mov	x24, x0
	ldr	w0, [x27]
	ldr	w8, [x25, #12]
	udiv	w2, w8, w23
	mov	w1, #8
	bl	_max_t
	mov	w1, #8
	bl	_round_up
	mov	x25, x0
	ldp	w6, w2, [x26, #8]
	ldr	w8, [x26, #4]
	rbit	w9, w8
	clz	w9, w9
	cmp	w8, #0
	csinv	w3, w9, wzr, ne
	str	wzr, [sp]
	mov	x0, x19
	mov	x1, x24
	mov	x4, x21
	mov	x5, x25
	mov	w7, #0
	bl	_v4l_bound_align_image
	ldr	w1, [x19]
	ldr	w2, [x21]
	mul	w8, w2, w1
	ldp	w9, w10, [x20]
	mul	w8, w8, w10
	add	w10, w8, #7
	cmp	w8, #0
	csel	w8, w10, w8, lt
	mul	w9, w9, w1
	asr	w8, w8, #3
	stp	w9, w8, [x19, #8]
	ldr	w8, [x20, #8]
	str	w8, [x19, #24]
Lloh9:
	adrp	x8, _V4L2_COLORSPACE_JPEG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_COLORSPACE_JPEG@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _V4L2_FIELD_NONE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #16]
	str	x23, [sp]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x3, x24
	mov	x4, x25
	mov	x5, x22
	bl	_pr_debug
	mov	w0, #0
LBB0_5:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fmt: %ux%u, crop: %ux%u, bytesperline: %u\n"

	.comm	_SCALER_MAX_RATIO,4,2           ; @SCALER_MAX_RATIO
	.comm	_u32,4,2                        ; @u32
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ; @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
l_.str.1:                               ; @.str.1
	.asciz	"%ux%u, wmin: %d, hmin: %d, sc_hrmax: %d, sc_vrmax: %d\n"

	.no_dead_strip	___camif_video_try_format
.subsections_via_symbols
