	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_jpeg_try_fmt_vid_cap
_s5p_jpeg_try_fmt_vid_cap:              ## @s5p_jpeg_try_fmt_vid_cap
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rdi
	callq	_fh_to_ctx
	movq	%rax, %rbx
	movq	(%r14), %rsi
	movq	_FMT_TYPE_CAPTURE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rax, %rdi
	callq	_s5p_jpeg_find_format
	movq	24(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_16
## %bb.1:
	movq	(%rdi), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_15
## %bb.2:
	movq	(%rbx), %rcx
	movq	_S5P_JPEG_DECODE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_15
## %bb.3:
	movq	_SJPEG_FMT_NON_RGB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_9
## %bb.4:
	movq	8(%rbx), %rdi
	cmpq	%rdi, 8(%rax)
	jge	LBB0_9
## %bb.5:
	movl	16(%rax), %esi
	movq	%r14, %rdx
	movq	%rbx, %rcx
	callq	_s5p_jpeg_adjust_fourcc_to_subsampling
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	movq	(%r14), %rsi
	jmp	LBB0_8
LBB0_16:
	addq	$8, %rdi
	movq	(%r14), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_v4l2_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_V4L2_PIX_FMT_GREY@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rsi, (%r14)
LBB0_8:
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_s5p_jpeg_find_format
LBB0_9:
	movq	8(%rbx), %rcx
	movq	_V4L2_JPEG_CHROMA_SUBSAMPLING_420@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_15
## %bb.10:
	testb	$1, 16(%rbx)
	je	LBB0_15
## %bb.11:
	movq	(%r14), %rcx
	movq	_V4L2_PIX_FMT_NV12@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_14
## %bb.12:
	movq	_V4L2_PIX_FMT_NV21@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_14
## %bb.13:
	movq	_V4L2_PIX_FMT_YUV420@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_15
LBB0_14:
	movq	_V4L2_PIX_FMT_RGB565@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rsi, (%r14)
	movl	(%r15), %edx
	movq	%rbx, %rdi
	callq	_s5p_jpeg_find_format
LBB0_15:
	movl	(%r15), %ecx
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vidioc_try_fmt                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FMT_TYPE_CAPTURE,4,2           ## @FMT_TYPE_CAPTURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fourcc format (0x%08x) invalid.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_S5P_JPEG_DECODE,8,3            ## @S5P_JPEG_DECODE
	.comm	_SJPEG_FMT_NON_RGB,4,2          ## @SJPEG_FMT_NON_RGB
	.comm	_V4L2_PIX_FMT_GREY,8,3          ## @V4L2_PIX_FMT_GREY
	.comm	_V4L2_JPEG_CHROMA_SUBSAMPLING_420,8,3 ## @V4L2_JPEG_CHROMA_SUBSAMPLING_420
	.comm	_V4L2_PIX_FMT_NV12,8,3          ## @V4L2_PIX_FMT_NV12
	.comm	_V4L2_PIX_FMT_NV21,8,3          ## @V4L2_PIX_FMT_NV21
	.comm	_V4L2_PIX_FMT_YUV420,8,3        ## @V4L2_PIX_FMT_YUV420
	.comm	_V4L2_PIX_FMT_RGB565,8,3        ## @V4L2_PIX_FMT_RGB565
	.no_dead_strip	_s5p_jpeg_try_fmt_vid_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5p_jpeg_try_fmt_vid_cap
_s5p_jpeg_try_fmt_vid_cap:              ; @s5p_jpeg_try_fmt_vid_cap
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x0, x1
	bl	_fh_to_ctx
	mov	x20, x0
	ldr	x1, [x19]
Lloh0:
	adrp	x21, _FMT_TYPE_CAPTURE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FMT_TYPE_CAPTURE@GOTPAGEOFF]
	ldr	w2, [x21]
	bl	_s5p_jpeg_find_format
	ldr	x8, [x20, #24]
	cbz	x0, LBB0_7
; %bb.1:
	mov	x1, x0
	ldr	x8, [x8]
	ldr	w8, [x8]
	cbz	w8, LBB0_16
; %bb.2:
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _S5P_JPEG_DECODE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _S5P_JPEG_DECODE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.3:
	ldr	w8, [x1]
Lloh5:
	adrp	x9, _SJPEG_FMT_NON_RGB@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SJPEG_FMT_NON_RGB@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.4:
	ldr	x8, [x1, #8]
	ldr	x0, [x20, #8]
	cmp	x8, x0
	b.ge	LBB0_10
; %bb.5:
	ldr	w1, [x1, #16]
	mov	x2, x19
	mov	x3, x20
	bl	_s5p_jpeg_adjust_fourcc_to_subsampling
	tbnz	w0, #31, LBB0_8
; %bb.6:
	ldr	x1, [x19]
	b	LBB0_9
LBB0_7:
	add	x0, x8, #8
	ldr	x2, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_v4l2_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh13:
	adrp	x8, _V4L2_PIX_FMT_GREY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _V4L2_PIX_FMT_GREY@GOTPAGEOFF]
Lloh15:
	ldr	x1, [x8]
	str	x1, [x19]
LBB0_9:
	ldr	w2, [x21]
	mov	x0, x20
	bl	_s5p_jpeg_find_format
	mov	x1, x0
LBB0_10:
	ldr	x8, [x20, #8]
Lloh16:
	adrp	x9, _V4L2_JPEG_CHROMA_SUBSAMPLING_420@GOTPAGE
Lloh17:
	ldr	x9, [x9, _V4L2_JPEG_CHROMA_SUBSAMPLING_420@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.11:
	ldrb	w8, [x20, #16]
	tbz	w8, #0, LBB0_16
; %bb.12:
	ldr	x8, [x19]
Lloh19:
	adrp	x9, _V4L2_PIX_FMT_NV12@GOTPAGE
Lloh20:
	ldr	x9, [x9, _V4L2_PIX_FMT_NV12@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.13:
Lloh22:
	adrp	x9, _V4L2_PIX_FMT_NV21@GOTPAGE
Lloh23:
	ldr	x9, [x9, _V4L2_PIX_FMT_NV21@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.14:
Lloh25:
	adrp	x9, _V4L2_PIX_FMT_YUV420@GOTPAGE
Lloh26:
	ldr	x9, [x9, _V4L2_PIX_FMT_YUV420@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
LBB0_15:
Lloh28:
	adrp	x8, _V4L2_PIX_FMT_RGB565@GOTPAGE
Lloh29:
	ldr	x8, [x8, _V4L2_PIX_FMT_RGB565@GOTPAGEOFF]
Lloh30:
	ldr	x1, [x8]
	str	x1, [x19]
	ldr	w2, [x21]
	mov	x0, x20
	bl	_s5p_jpeg_find_format
	mov	x1, x0
LBB0_16:
	ldr	w3, [x21]
	mov	x0, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_vidioc_try_fmt
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_FMT_TYPE_CAPTURE,4,2           ; @FMT_TYPE_CAPTURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fourcc format (0x%08x) invalid.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_S5P_JPEG_DECODE,8,3            ; @S5P_JPEG_DECODE
	.comm	_SJPEG_FMT_NON_RGB,4,2          ; @SJPEG_FMT_NON_RGB
	.comm	_V4L2_PIX_FMT_GREY,8,3          ; @V4L2_PIX_FMT_GREY
	.comm	_V4L2_JPEG_CHROMA_SUBSAMPLING_420,8,3 ; @V4L2_JPEG_CHROMA_SUBSAMPLING_420
	.comm	_V4L2_PIX_FMT_NV12,8,3          ; @V4L2_PIX_FMT_NV12
	.comm	_V4L2_PIX_FMT_NV21,8,3          ; @V4L2_PIX_FMT_NV21
	.comm	_V4L2_PIX_FMT_YUV420,8,3        ; @V4L2_PIX_FMT_YUV420
	.comm	_V4L2_PIX_FMT_RGB565,8,3        ; @V4L2_PIX_FMT_RGB565
	.no_dead_strip	_s5p_jpeg_try_fmt_vid_cap
.subsections_via_symbols
