	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_mobile_ceu_try_fmt
_sh_mobile_ceu_try_fmt:                 ## @sh_mobile_ceu_try_fmt
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %rbx
	callq	_soc_camera_to_subdev
	movq	%rax, %r12
	movl	(%r13), %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_soc_camera_xlate_by_fourcc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	leaq	4(%r13), %rdi
	leaq	8(%r13), %r8
	subq	$8, %rsp
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	$2, %esi
	movl	$2560, %edx                     ## imm = 0xA00
	movl	$1, %ecx
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	$4, %r9d
	pushq	$0
	pushq	$2
	pushq	$1920                           ## imm = 0x780
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movq	%r12, %rbx
	movl	4(%r13), %r12d
	movl	8(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movl	$8, %esi
	callq	_DIV_ROUND_UP
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	imull	%r12d, %eax
	movl	%eax, 12(%r13)
	imull	8(%r13), %eax
	movl	%eax, 16(%r13)
	movq	(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, (%r13)
	movq	_video@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_try_fmt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r13, %rcx
	callq	_v4l2_subdev_call
	movl	%eax, %r14d
	movl	%r15d, (%r13)
	andl	$-4, %r15d
	cmpl	$128, %r15d
	jne	LBB0_14
## %bb.3:
	testl	%r14d, %r14d
	js	LBB0_14
## %bb.4:
	movq	%r12, %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r15d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r12d
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%ebx, %r15d
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	jl	LBB0_6
## %bb.5:
	cmpl	%edx, %r12d
	jl	LBB0_6
## %bb.10:
	cmpl	%ebx, %r15d
	jg	LBB0_11
LBB0_12:
	cmpl	%edx, (%rax)
	jg	LBB0_13
	jmp	LBB0_14
LBB0_1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_14
LBB0_6:
	movabsq	$8246337210880, %rax            ## imm = 0x78000000A00
	movq	%rax, 4(%r13)
	movl	(%rcx), %esi
	movq	_try_fmt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rcx
	callq	_v4l2_subdev_call
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_8
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r15d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_8:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%r12d, (%rax)
LBB0_9:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	cmpl	%ebx, %r15d
	jle	LBB0_12
LBB0_11:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%ebx, (%rcx)
	cmpl	%edx, (%rax)
	jle	LBB0_14
LBB0_13:
	movl	%edx, (%rax)
LBB0_14:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Format %x not found\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_video,4,2                      ## @video
	.comm	_try_fmt,4,2                    ## @try_fmt
L_.str.1:                               ## @.str.1
	.asciz	"FIXME: try_fmt() returned %d\n"

	.no_dead_strip	_sh_mobile_ceu_try_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function sh_mobile_ceu_try_fmt
lCPI0_0:
	.long	2560                            ; 0xa00
	.long	1920                            ; 0x780
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_sh_mobile_ceu_try_fmt:                 ; @sh_mobile_ceu_try_fmt
	.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, x1
	mov	x21, x0
	bl	_soc_camera_to_subdev
	mov	x23, x0
	ldr	w25, [x22]
	mov	x0, x21
	mov	x1, x25
	bl	_soc_camera_xlate_by_fourcc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x24, x0
	add	x20, x22, #4
	add	x19, x22, #8
	str	wzr, [sp]
	mov	x0, x20
	mov	w1, #2
	mov	w2, #2560
	mov	w3, #1
	mov	x4, x19
	mov	w5, #4
	mov	w6, #1920
	mov	w7, #2
	bl	_v4l_bound_align_image
	ldp	w27, w8, [x22, #4]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	ldr	x8, [x24, #8]
	ldr	w0, [x8]
	mov	w1, #8
	bl	_DIV_ROUND_UP
	mul	w8, w0, w27
	ldr	w9, [x22, #8]
	mul	w9, w9, w8
	stp	w8, w9, [x22, #12]
	ldr	x8, [x24]
	ldr	w8, [x8]
	str	w8, [x22]
Lloh0:
	adrp	x28, _video@GOTPAGE
Lloh1:
	ldr	x28, [x28, _video@GOTPAGEOFF]
	ldr	w1, [x28]
Lloh2:
	adrp	x26, _try_fmt@GOTPAGE
Lloh3:
	ldr	x26, [x26, _try_fmt@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x23
	mov	x3, x22
	bl	_v4l2_subdev_call
	mov	x24, x0
	str	w25, [x22]
	and	w8, w25, #0xfffffffc
	cmp	w8, #128
	b.ne	LBB0_14
; %bb.2:
	tbnz	w24, #31, LBB0_14
; %bb.3:
	ldr	w25, [x20]
	ldr	w8, [x19]
	cmp	w25, w27
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	b.lt	LBB0_5
; %bb.4:
	cmp	w8, w9
	b.ge	LBB0_10
LBB0_5:
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
Lloh4:
	adrp	x8, lCPI0_0@PAGE
Lloh5:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x22, #4]
	ldr	w1, [x28]
	ldr	w2, [x26]
	mov	x0, x23
	mov	x3, x22
	bl	_v4l2_subdev_call
	mov	x24, x0
	tbnz	w0, #31, LBB0_8
; %bb.6:
	ldr	w25, [x20]
	b	LBB0_9
LBB0_7:
	ldr	w0, [x21]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x25
	bl	_dev_warn
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_14
LBB0_8:
	ldr	w0, [x21]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x24
	bl	_dev_err
	str	w25, [x20]
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	str	w8, [x19]
LBB0_9:
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
LBB0_10:
	cmp	w25, w27
	b.le	LBB0_12
; %bb.11:
	str	w27, [x20]
LBB0_12:
	ldr	w8, [x19]
	cmp	w8, w9
	b.le	LBB0_14
; %bb.13:
	str	w9, [x19]
LBB0_14:
	mov	x0, x24
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdr	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Format %x not found\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_video,4,2                      ; @video
	.comm	_try_fmt,4,2                    ; @try_fmt
l_.str.1:                               ; @.str.1
	.asciz	"FIXME: try_fmt() returned %d\n"

	.no_dead_strip	_sh_mobile_ceu_try_fmt
.subsections_via_symbols
