	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pxa_camera_set_crop
_pxa_camera_set_crop:                   ## @pxa_camera_set_crop
	.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	$88, %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, %r13
	movq	8(%rdi), %rdi
	callq	_to_soc_camera_host
	movq	(%rax), %rbx
	movq	8(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_soc_camera_to_subdev
	movq	%rax, %r12
	movl	(%rbx), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movl	%ecx, -104(%rbp)
	movl	$0, -100(%rbp)
	movq	$0, -96(%rbp)
	movl	8(%rbx), %eax
	movl	%eax, -88(%rbp)
	movq	24(%r13), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_PXA_CAMERA_PCLK_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	testl	%eax, 4(%rbx)
	je	LBB0_2
## %bb.1:
	leaq	-104(%rbp), %rax
	movq	%rax, 16(%r13)
LBB0_2:
	movq	32(%r13), %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	_video@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_s_crop@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r15, %rcx
	callq	_v4l2_subdev_call
	movq	$0, 16(%r13)
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	(%r14), %esi
	movq	_g_mbus_fmt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-80(%rbp), %rcx
	movq	%r12, %r15
	movq	%r12, %rdi
	callq	_v4l2_subdev_call
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_14
## %bb.5:
	movl	-80(%rbp), %esi
	movl	-76(%rbp), %edi
	callq	_pxa_camera_check_frame
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	leaq	-76(%rbp), %rdi
	movq	_V4L2_PIX_FMT_YUV422P@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	cmpq	(%rcx), %rdx
	sete	%al
	shll	$2, %eax
	subq	$8, %rsp
	leaq	-80(%rbp), %r12
	movl	$48, %esi
	movl	$2048, %edx                     ## imm = 0x800
	movl	$1, %ecx
	movq	%r12, %r8
	movl	$32, %r9d
	pushq	%rax
	pushq	$0
	pushq	$2048                           ## imm = 0x800
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movl	(%r14), %esi
	movq	_s_mbus_fmt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r12, %rcx
	callq	_v4l2_subdev_call
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_14
## %bb.7:
	movl	-80(%rbp), %esi
	movl	-76(%rbp), %edi
	callq	_pxa_camera_check_frame
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	8(%r13), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_3:
	movl	%eax, %ebx
	movl	20(%r15), %edx
	movl	16(%r15), %ecx
	movl	8(%r15), %r9d
	movl	12(%r15), %r8d
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_14
LBB0_9:
	movq	_SOCAM_SENSE_PCLK_CHANGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -100(%rbp)
	je	LBB0_13
## %bb.10:
	movq	-96(%rbp), %rdx
	movslq	-104(%rbp), %rax
	cmpq	%rax, %rdx
	jle	LBB0_12
## %bb.11:
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_12:
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	movq	%rdx, %rsi
	callq	_recalculate_fifo_timeout
LBB0_13:
	movl	-76(%rbp), %eax
	movl	%eax, 4(%r13)
	movl	-80(%rbp), %eax
	movl	%eax, (%r13)
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_pxa_camera_setup_cicr
LBB0_14:
	movl	%ebx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PXA_CAMERA_PCLK_EN,4,2         ## @PXA_CAMERA_PCLK_EN
	.comm	_video,4,2                      ## @video
	.comm	_s_crop,4,2                     ## @s_crop
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to crop to %ux%u@%u:%u\n"

	.comm	_g_mbus_fmt,4,2                 ## @g_mbus_fmt
	.comm	_V4L2_PIX_FMT_YUV422P,8,3       ## @V4L2_PIX_FMT_YUV422P
	.comm	_s_mbus_fmt,4,2                 ## @s_mbus_fmt
L_.str.1:                               ## @.str.1
	.asciz	"Inconsistent state. Use S_FMT to repair\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SOCAM_SENSE_PCLK_CHANGED,4,2   ## @SOCAM_SENSE_PCLK_CHANGED
L_.str.2:                               ## @.str.2
	.asciz	"pixel clock %lu set by the camera too high!"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_pxa_camera_set_crop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pxa_camera_set_crop
_pxa_camera_set_crop:                   ; @pxa_camera_set_crop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x25, x1
	mov	x19, x0
	ldr	x0, [x0, #8]
	bl	_to_soc_camera_host
	ldr	x21, [x0]
	ldr	x20, [x19, #8]
	mov	x0, x19
	bl	_soc_camera_to_subdev
	mov	x24, x0
	ldr	w8, [x21]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	stp	w8, wzr, [sp, #56]
	str	xzr, [sp, #64]
	ldr	w8, [x21, #8]
	str	w8, [sp, #72]
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	ldr	x22, [x8]
	ldr	w8, [x21, #4]
Lloh0:
	adrp	x9, _PXA_CAMERA_PCLK_EN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PXA_CAMERA_PCLK_EN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	add	x8, sp, #56
	str	x8, [x19, #16]
LBB0_2:
	ldr	x26, [x19, #32]
Lloh3:
	adrp	x27, _video@GOTPAGE
Lloh4:
	ldr	x27, [x27, _video@GOTPAGEOFF]
	ldr	w1, [x27]
Lloh5:
	adrp	x8, _s_crop@GOTPAGE
Lloh6:
	ldr	x8, [x8, _s_crop@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x24
	mov	x3, x25
	bl	_v4l2_subdev_call
	str	xzr, [x19, #16]
	tbnz	w0, #31, LBB0_8
; %bb.3:
	ldr	w1, [x27]
Lloh8:
	adrp	x8, _g_mbus_fmt@GOTPAGE
Lloh9:
	ldr	x8, [x8, _g_mbus_fmt@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	add	x25, sp, #32
	add	x3, sp, #32
	mov	x0, x24
	bl	_v4l2_subdev_call
	mov	x23, x0
	tbnz	w0, #31, LBB0_15
; %bb.4:
	ldp	w1, w0, [sp, #32]
	bl	_pxa_camera_check_frame
	cbz	x0, LBB0_9
; %bb.5:
	orr	x0, x25, #0x4
Lloh11:
	adrp	x8, _V4L2_PIX_FMT_YUV422P@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_PIX_FMT_YUV422P@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x22, x8
	cset	w8, eq
	lsl	w8, w8, #2
	str	w8, [sp]
	add	x4, sp, #32
	mov	w1, #48
	mov	w2, #2048
	mov	w3, #1
	mov	w5, #32
	mov	w6, #2048
	mov	w7, #0
	bl	_v4l_bound_align_image
	ldr	w1, [x27]
Lloh14:
	adrp	x8, _s_mbus_fmt@GOTPAGE
Lloh15:
	ldr	x8, [x8, _s_mbus_fmt@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	add	x3, sp, #32
	mov	x0, x24
	bl	_v4l2_subdev_call
	mov	x23, x0
	tbnz	w0, #31, LBB0_15
; %bb.6:
	ldp	w1, w0, [sp, #32]
	bl	_pxa_camera_check_frame
	cbz	x0, LBB0_9
; %bb.7:
	ldr	x0, [x19, #8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
	mov	x23, x0
	ldp	w9, w8, [x25, #16]
	ldp	w11, w10, [x25, #8]
	stp	x10, x11, [sp, #16]
	stp	x8, x9, [sp]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
	b	LBB0_15
LBB0_9:
	ldr	w8, [sp, #60]
Lloh23:
	adrp	x9, _SOCAM_SENSE_PCLK_CHANGED@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SOCAM_SENSE_PCLK_CHANGED@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.10:
	ldr	x2, [sp, #64]
	ldrsw	x8, [sp, #56]
	cmp	x2, x8
	b.le	LBB0_13
; %bb.11:
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh28:
	adrp	x8, _EIO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_15
LBB0_13:
	mov	x0, x21
	mov	x1, x2
	bl	_recalculate_fifo_timeout
LBB0_14:
	ldr	d0, [sp, #32]
	str	d0, [x19]
	ldr	w1, [x26]
	mov	x0, x19
	mov	x2, x22
	bl	_pxa_camera_setup_cicr
LBB0_15:
	mov	x0, x23
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_PXA_CAMERA_PCLK_EN,4,2         ; @PXA_CAMERA_PCLK_EN
	.comm	_video,4,2                      ; @video
	.comm	_s_crop,4,2                     ; @s_crop
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to crop to %ux%u@%u:%u\n"

	.comm	_g_mbus_fmt,4,2                 ; @g_mbus_fmt
	.comm	_V4L2_PIX_FMT_YUV422P,8,3       ; @V4L2_PIX_FMT_YUV422P
	.comm	_s_mbus_fmt,4,2                 ; @s_mbus_fmt
l_.str.1:                               ; @.str.1
	.asciz	"Inconsistent state. Use S_FMT to repair\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SOCAM_SENSE_PCLK_CHANGED,4,2   ; @SOCAM_SENSE_PCLK_CHANGED
l_.str.2:                               ; @.str.2
	.asciz	"pixel clock %lu set by the camera too high!"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_pxa_camera_set_crop
.subsections_via_symbols
