	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ccp2_try_format
_ccp2_try_format:                       ## @ccp2_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rcx, %rbx
	cmpl	$128, %edx
	je	LBB0_9
## %bb.1:
	cmpl	$129, %edx
	jne	LBB0_10
## %bb.2:
	movq	8(%rbx), %rax
	movq	_MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	_MEDIA_BUS_FMT_SGRBG10_1X10@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
LBB0_4:
	movl	(%rdi), %eax
	movq	_CCP2_INPUT_SENSOR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.5:
	movq	_u32@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	24(%rbx), %rsi
	movq	_ISPCCP2_DAT_START_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ISPCCP2_DAT_START_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_clamp_t
	movq	%rax, 24(%rbx)
	movl	(%r14), %edi
	movq	16(%rbx), %rsi
	movq	_ISPCCP2_DAT_SIZE_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ISPCCP2_DAT_SIZE_MAX@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_9:
	movl	$129, %edx
	movl	%r8d, %ecx
	callq	___ccp2_get_format
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	$32, %edx
	callq	_memcpy
	movq	_MEDIA_BUS_FMT_SGRBG10_1X10@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	jmp	LBB0_10
LBB0_7:
	movq	_CCP2_INPUT_MEMORY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_10
## %bb.8:
	movq	_u32@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	24(%rbx), %rsi
	movq	_ISPCCP2_LCM_HSIZE_COUNT_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ISPCCP2_LCM_HSIZE_COUNT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_clamp_t
	movq	%rax, 24(%rbx)
	movl	(%r14), %edi
	movq	16(%rbx), %rsi
	movq	_ISPCCP2_LCM_VSIZE_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ISPCCP2_LCM_VSIZE_MAX@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %ecx
	callq	_clamp_t
	movq	%rax, 16(%rbx)
LBB0_10:
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	_V4L2_COLORSPACE_SRGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8,8,3 ## @MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8
	.comm	_MEDIA_BUS_FMT_SGRBG10_1X10,8,3 ## @MEDIA_BUS_FMT_SGRBG10_1X10
	.comm	_CCP2_INPUT_SENSOR,4,2          ## @CCP2_INPUT_SENSOR
	.comm	_u32,4,2                        ## @u32
	.comm	_ISPCCP2_DAT_START_MIN,4,2      ## @ISPCCP2_DAT_START_MIN
	.comm	_ISPCCP2_DAT_START_MAX,4,2      ## @ISPCCP2_DAT_START_MAX
	.comm	_ISPCCP2_DAT_SIZE_MIN,4,2       ## @ISPCCP2_DAT_SIZE_MIN
	.comm	_ISPCCP2_DAT_SIZE_MAX,4,2       ## @ISPCCP2_DAT_SIZE_MAX
	.comm	_CCP2_INPUT_MEMORY,4,2          ## @CCP2_INPUT_MEMORY
	.comm	_ISPCCP2_LCM_HSIZE_COUNT_MIN,4,2 ## @ISPCCP2_LCM_HSIZE_COUNT_MIN
	.comm	_ISPCCP2_LCM_HSIZE_COUNT_MAX,4,2 ## @ISPCCP2_LCM_HSIZE_COUNT_MAX
	.comm	_ISPCCP2_LCM_VSIZE_MIN,4,2      ## @ISPCCP2_LCM_VSIZE_MIN
	.comm	_ISPCCP2_LCM_VSIZE_MAX,4,2      ## @ISPCCP2_LCM_VSIZE_MAX
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ## @V4L2_COLORSPACE_SRGB
	.no_dead_strip	_ccp2_try_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ccp2_try_format
_ccp2_try_format:                       ; @ccp2_try_format
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x3
	cmp	w2, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w2, #129
	b.ne	LBB0_10
; %bb.2:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _MEDIA_BUS_FMT_SGRBG10_1X10@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MEDIA_BUS_FMT_SGRBG10_1X10@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_4:
	ldr	w8, [x0]
Lloh6:
	adrp	x9, _CCP2_INPUT_SENSOR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CCP2_INPUT_SENSOR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.5:
Lloh9:
	adrp	x20, _u32@GOTPAGE
Lloh10:
	ldr	x20, [x20, _u32@GOTPAGEOFF]
	ldr	w0, [x20]
	ldr	x1, [x19, #24]
Lloh11:
	adrp	x8, _ISPCCP2_DAT_START_MIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ISPCCP2_DAT_START_MIN@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x8, _ISPCCP2_DAT_START_MAX@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ISPCCP2_DAT_START_MAX@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	bl	_clamp_t
	str	x0, [x19, #24]
	ldr	w0, [x20]
	ldr	x1, [x19, #16]
Lloh17:
	adrp	x8, _ISPCCP2_DAT_SIZE_MIN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ISPCCP2_DAT_SIZE_MIN@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
Lloh20:
	adrp	x8, _ISPCCP2_DAT_SIZE_MAX@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ISPCCP2_DAT_SIZE_MAX@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	mov	w2, #129
	mov	x3, x4
	bl	___ccp2_get_format
	mov	x1, x0
	mov	x0, x19
	mov	w2, #32
	bl	_memcpy
Lloh22:
	adrp	x8, _MEDIA_BUS_FMT_SGRBG10_1X10@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MEDIA_BUS_FMT_SGRBG10_1X10@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	b	LBB0_10
LBB0_7:
Lloh25:
	adrp	x9, _CCP2_INPUT_MEMORY@GOTPAGE
Lloh26:
	ldr	x9, [x9, _CCP2_INPUT_MEMORY@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.8:
Lloh28:
	adrp	x20, _u32@GOTPAGE
Lloh29:
	ldr	x20, [x20, _u32@GOTPAGEOFF]
	ldr	w0, [x20]
	ldr	x1, [x19, #24]
Lloh30:
	adrp	x8, _ISPCCP2_LCM_HSIZE_COUNT_MIN@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ISPCCP2_LCM_HSIZE_COUNT_MIN@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
Lloh33:
	adrp	x8, _ISPCCP2_LCM_HSIZE_COUNT_MAX@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ISPCCP2_LCM_HSIZE_COUNT_MAX@GOTPAGEOFF]
Lloh35:
	ldr	w3, [x8]
	bl	_clamp_t
	str	x0, [x19, #24]
	ldr	w0, [x20]
	ldr	x1, [x19, #16]
Lloh36:
	adrp	x8, _ISPCCP2_LCM_VSIZE_MIN@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ISPCCP2_LCM_VSIZE_MIN@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
Lloh39:
	adrp	x8, _ISPCCP2_LCM_VSIZE_MAX@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ISPCCP2_LCM_VSIZE_MAX@GOTPAGEOFF]
LBB0_9:
	ldr	w3, [x8]
	bl	_clamp_t
	str	x0, [x19, #16]
LBB0_10:
Lloh41:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
Lloh44:
	adrp	x9, _V4L2_COLORSPACE_SRGB@GOTPAGE
Lloh45:
	ldr	x9, [x9, _V4L2_COLORSPACE_SRGB@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	stp	w9, w8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8,8,3 ; @MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8
	.comm	_MEDIA_BUS_FMT_SGRBG10_1X10,8,3 ; @MEDIA_BUS_FMT_SGRBG10_1X10
	.comm	_CCP2_INPUT_SENSOR,4,2          ; @CCP2_INPUT_SENSOR
	.comm	_u32,4,2                        ; @u32
	.comm	_ISPCCP2_DAT_START_MIN,4,2      ; @ISPCCP2_DAT_START_MIN
	.comm	_ISPCCP2_DAT_START_MAX,4,2      ; @ISPCCP2_DAT_START_MAX
	.comm	_ISPCCP2_DAT_SIZE_MIN,4,2       ; @ISPCCP2_DAT_SIZE_MIN
	.comm	_ISPCCP2_DAT_SIZE_MAX,4,2       ; @ISPCCP2_DAT_SIZE_MAX
	.comm	_CCP2_INPUT_MEMORY,4,2          ; @CCP2_INPUT_MEMORY
	.comm	_ISPCCP2_LCM_HSIZE_COUNT_MIN,4,2 ; @ISPCCP2_LCM_HSIZE_COUNT_MIN
	.comm	_ISPCCP2_LCM_HSIZE_COUNT_MAX,4,2 ; @ISPCCP2_LCM_HSIZE_COUNT_MAX
	.comm	_ISPCCP2_LCM_VSIZE_MIN,4,2      ; @ISPCCP2_LCM_VSIZE_MIN
	.comm	_ISPCCP2_LCM_VSIZE_MAX,4,2      ; @ISPCCP2_LCM_VSIZE_MAX
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ; @V4L2_COLORSPACE_SRGB
	.no_dead_strip	_ccp2_try_format
.subsections_via_symbols
