	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pxa_camera_set_fmt
_pxa_camera_set_fmt:                    ## @pxa_camera_set_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	16(%rdi), %rdi
	callq	_to_soc_camera_host
	movq	(%rax), %r15
	movq	16(%r13), %r14
	movq	%r13, %rdi
	callq	_soc_camera_to_subdev
	movl	(%r15), %ecx
	leal	3(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	sarl	$2, %edx
	movl	%edx, -96(%rbp)
	movl	$0, -92(%rbp)
	movq	$0, -88(%rbp)
	movl	8(%r15), %eax
	movl	%eax, -80(%rbp)
	movl	16(%rbx), %esi
	movq	%r13, %rdi
	callq	_soc_camera_xlate_by_fourcc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_PXA_CAMERA_PCLK_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r15)
	je	LBB0_4
## %bb.3:
	leaq	-96(%rbp), %rax
	movq	%rax, 8(%r13)
LBB0_4:
	movq	%rbx, %r14
	movups	(%rbx), %xmm0
	movups	%xmm0, -64(%rbp)
	movq	(%r12), %rax
	movq	%rax, -72(%rbp)
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_mbus_fmt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-72(%rbp), %rcx
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_v4l2_subdev_call
	movl	%eax, %ebx
	movq	-72(%rbp), %rax
	cmpq	(%r12), %rax
	jne	LBB0_5
## %bb.7:
	movq	$0, 8(%r13)
	testl	%ebx, %ebx
	js	LBB0_8
## %bb.9:
	movl	-56(%rbp), %esi
	movl	-52(%rbp), %edi
	callq	_pxa_camera_check_frame
	testq	%rax, %rax
	je	LBB0_10
## %bb.14:
	movl	-56(%rbp), %ecx
	movl	-52(%rbp), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ebx
	negl	%ebx
	testl	%eax, %eax
	jg	LBB0_16
	jmp	LBB0_15
LBB0_1:
	movl	16(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_8:
	movl	16(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_16
LBB0_10:
	movq	_SOCAM_SENSE_PCLK_CHANGED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -92(%rbp)
	je	LBB0_15
## %bb.11:
	movq	-88(%rbp), %rdx
	movslq	-96(%rbp), %rax
	cmpq	%rax, %rdx
	jle	LBB0_13
## %bb.12:
	leaq	L_.str.3(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_13:
	movq	%r15, %rdi
	movq	%rdx, %rsi
	callq	_recalculate_fifo_timeout
LBB0_15:
	movups	-64(%rbp), %xmm0
	movups	%xmm0, (%r14)
	movq	%r12, (%r13)
LBB0_16:
	movl	%ebx, %eax
	addq	$72, %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	_PXA_CAMERA_PCLK_EN,4,2         ## @PXA_CAMERA_PCLK_EN
	.comm	_video,4,2                      ## @video
	.comm	_s_mbus_fmt,4,2                 ## @s_mbus_fmt
L_.str.1:                               ## @.str.1
	.asciz	"Failed to configure for format %x\n"

L_.str.2:                               ## @.str.2
	.asciz	"Camera driver produced an unsupported frame %dx%d\n"

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

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_pxa_camera_set_fmt
.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_fmt
_pxa_camera_set_fmt:                    ; @pxa_camera_set_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x0, [x0, #16]
	bl	_to_soc_camera_host
	ldr	x23, [x0]
	ldr	x21, [x20, #16]
	mov	x0, x20
	bl	_soc_camera_to_subdev
	mov	x24, x0
	ldr	w8, [x23]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	stp	w8, wzr, [sp, #40]
	str	xzr, [sp, #48]
	ldr	w8, [x23, #8]
	str	w8, [sp, #56]
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_soc_camera_xlate_by_fourcc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x22, x0
	ldr	w8, [x23, #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_3
; %bb.2:
	add	x8, sp, #40
	str	x8, [x20, #8]
LBB0_3:
	ldr	q0, [x19]
	stur	q0, [sp, #24]
	ldr	x8, [x22]
	str	x8, [sp, #16]
Lloh3:
	adrp	x8, _video@GOTPAGE
Lloh4:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _s_mbus_fmt@GOTPAGE
Lloh7:
	ldr	x8, [x8, _s_mbus_fmt@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	add	x3, sp, #16
	mov	x0, x24
	bl	_v4l2_subdev_call
	ldr	x8, [sp, #16]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.4:
	mov	x24, x0
	str	xzr, [x20, #8]
	tbnz	w0, #31, LBB0_11
; %bb.5:
	ldp	w1, w0, [sp, #32]
	bl	_pxa_camera_check_frame
	cbz	x0, LBB0_12
; %bb.6:
	ldp	w8, w2, [sp, #32]
	str	x8, [sp]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w24, w8
	cmp	w8, #0
	b.gt	LBB0_10
	b	LBB0_16
LBB0_7:
	ldr	w2, [x19, #16]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
LBB0_8:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_10:
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_11:
	ldr	w2, [x19, #16]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
	b	LBB0_10
LBB0_12:
	ldr	w8, [sp, #44]
Lloh20:
	adrp	x9, _SOCAM_SENSE_PCLK_CHANGED@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SOCAM_SENSE_PCLK_CHANGED@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.13:
	ldr	x2, [sp, #48]
	ldrsw	x8, [sp, #40]
	cmp	x2, x8
	b.le	LBB0_15
; %bb.14:
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh25:
	adrp	x8, _EIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_9
LBB0_15:
	mov	x0, x23
	mov	x1, x2
	bl	_recalculate_fifo_timeout
LBB0_16:
	ldur	q0, [sp, #24]
	str	q0, [x19]
	str	x22, [x20]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Format %x not found\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PXA_CAMERA_PCLK_EN,4,2         ; @PXA_CAMERA_PCLK_EN
	.comm	_video,4,2                      ; @video
	.comm	_s_mbus_fmt,4,2                 ; @s_mbus_fmt
l_.str.1:                               ; @.str.1
	.asciz	"Failed to configure for format %x\n"

l_.str.2:                               ; @.str.2
	.asciz	"Camera driver produced an unsupported frame %dx%d\n"

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

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