	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __video_try_or_set_format
___video_try_or_set_format:             ## @__video_try_or_set_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	%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	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r14
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	16(%rdi), %r15
	leaq	12(%rsi), %rbx
	movl	12(%rsi), %edi
	callq	_fimc_jpeg_fourcc
	testq	%rax, %rax
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	leaq	4(%r12), %r14
	movq	_FIMC_SD_PAD_SINK_CAM@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r8
	callq	_fimc_capture_try_format
	movl	(%r12), %eax
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.3:
	movl	%eax, %r13d
	movl	(%r14), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_1:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_5
LBB0_4:
	movl	%eax, (%r15)
	movl	(%r14), %eax
	movl	%eax, 4(%r15)
	xorl	%r13d, %r13d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_5:
	leaq	4(%r12), %rdx
	movq	_FIMC_SD_PAD_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	callq	_fimc_capture_try_format
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.8:
	movl	(%rbx), %edi
	callq	_fimc_jpeg_fourcc
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	%r13d, (%r12)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, 4(%r12)
LBB0_10:
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	leaq	24(%rdx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, 12(%rdx)
	je	LBB0_12
## %bb.11:
	movl	(%r12), %esi
	movl	4(%r12), %edx
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_19
LBB0_12:
	leaq	8(%rdx), %rax
	leaq	4(%rdx), %rcx
	testl	%r14d, %r14d
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	leaq	-104(%rbp), %r15
	cmoveq	%rdx, %r15
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rdx
	movl	8(%rdx), %edx
	leaq	-96(%rbp), %rsi
	cmoveq	%rax, %rsi
	movl	%edx, (%rsi)
	movl	(%r12), %eax
	movl	%eax, (%r15)
	movl	4(%r12), %eax
	leaq	-100(%rbp), %r13
	cmoveq	%rcx, %r13
	movl	%eax, (%r13)
	movq	%rbx, %rdi
	callq	_fimc_md_graph_lock
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	%r14d, %ecx
	callq	_fimc_pipeline_try_format
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_fimc_md_graph_unlock
	testl	%r14d, %r14d
	js	LBB0_19
## %bb.13:
	movl	(%r15), %esi
	movl	%esi, (%r12)
	movl	(%r13), %edx
	movl	%edx, 4(%r12)
LBB0_14:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	movq	%r12, %rcx
	callq	_fimc_adjust_mplane_format
	movq	(%rbx), %rax
	movq	_FMT_FLAGS_COMPRESSED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_19
## %bb.15:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_fimc_md_graph_lock
	movl	(%rbx), %edi
	movq	_IDX_SENSOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	___fimc_md_get_subdev
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movl	8(%r12), %esi
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	4(%rcx), %edx
	movq	%rax, %rdi
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	callq	_fimc_get_sensor_frame_desc
	jmp	LBB0_18
LBB0_17:
	movq	_EPIPE@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_18:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_fimc_md_graph_unlock
LBB0_19:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIMC_SD_PAD_SINK_CAM,4,2       ## @FIMC_SD_PAD_SINK_CAM
	.comm	_FIMC_SD_PAD_SOURCE,4,2         ## @FIMC_SD_PAD_SOURCE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FMT_FLAGS_COMPRESSED,4,2       ## @FMT_FLAGS_COMPRESSED
	.comm	_IDX_SENSOR,4,2                 ## @IDX_SENSOR
	.comm	_EPIPE,4,2                      ## @EPIPE
	.no_dead_strip	___video_try_or_set_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __video_try_or_set_format
___video_try_or_set_format:             ; @__video_try_or_set_format
	.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	x20, x4
	mov	x23, x3
	mov	x19, x2
	mov	x21, x1
	mov	x25, x0
	ldr	x24, [x0, #16]
	mov	x22, x1
	ldr	w0, [x22, #12]!
	bl	_fimc_jpeg_fourcc
	cbz	x0, LBB0_3
; %bb.1:
	add	x26, x21, #4
Lloh0:
	adrp	x8, _FIMC_SD_PAD_SINK_CAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FIMC_SD_PAD_SINK_CAM@GOTPAGEOFF]
Lloh2:
	ldr	w5, [x8]
	mov	x0, x24
	mov	x1, x21
	mov	x2, x26
	mov	x3, #0
	mov	x4, x22
	bl	_fimc_capture_try_format
	ldr	w28, [x21]
	cbz	w19, LBB0_4
; %bb.2:
	ldr	w27, [x26]
	b	LBB0_6
LBB0_3:
	mov	w27, #0
	b	LBB0_5
LBB0_4:
	mov	w27, #0
	ldr	w8, [x26]
	stp	w28, w8, [x24]
LBB0_5:
	mov	w28, #0
LBB0_6:
	add	x2, x21, #4
Lloh3:
	adrp	x8, _FIMC_SD_PAD_SOURCE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FIMC_SD_PAD_SOURCE@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
	mov	x0, x24
	mov	x1, x21
	mov	x3, #0
	mov	x4, x22
	bl	_fimc_capture_try_format
	str	x0, [x20]
	cbz	x0, LBB0_12
; %bb.7:
	cbz	w19, LBB0_10
; %bb.8:
	ldr	w0, [x22]
	bl	_fimc_jpeg_fourcc
	cbz	x0, LBB0_10
; %bb.9:
	stp	w28, w27, [x21]
LBB0_10:
	add	x22, x25, #24
	ldr	w8, [x25, #12]
	cbz	w8, LBB0_13
; %bb.11:
	mov	w23, #0
	ldp	w1, w2, [x21]
	b	LBB0_15
LBB0_12:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_20
LBB0_13:
	cmp	w19, #0
	mov	x8, sp
	csel	x26, x25, x8, eq
	ldr	x9, [x20]
	ldr	w9, [x9, #8]
	add	x10, x25, #8
	add	x11, x8, #8
	csel	x10, x10, x11, eq
	str	w9, [x10]
	ldp	w9, w10, [x21]
	str	w9, [x26]
	add	x9, x25, #4
	orr	x8, x8, #0x4
	csel	x25, x9, x8, eq
	str	w10, [x25]
	mov	x0, x22
	bl	_fimc_md_graph_lock
	mov	x0, x24
	mov	x1, x26
	mov	x2, x23
	mov	x3, x19
	bl	_fimc_pipeline_try_format
	mov	x23, x0
	mov	x0, x22
	bl	_fimc_md_graph_unlock
	tbnz	w23, #31, LBB0_20
; %bb.14:
	ldr	w1, [x26]
	ldr	w2, [x25]
	stp	w1, w2, [x21]
LBB0_15:
	ldr	x0, [x20]
	mov	x3, x21
	bl	_fimc_adjust_mplane_format
	ldr	x8, [x20]
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _FMT_FLAGS_COMPRESSED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _FMT_FLAGS_COMPRESSED@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_20
; %bb.16:
	mov	x0, x22
	bl	_fimc_md_graph_lock
	ldr	w0, [x22]
Lloh12:
	adrp	x8, _IDX_SENSOR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IDX_SENSOR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	___fimc_md_get_subdev
	cbz	x0, LBB0_18
; %bb.17:
	ldr	w1, [x21, #8]
	ldr	x8, [x20]
	ldr	w2, [x8, #4]
	mov	x3, x19
	bl	_fimc_get_sensor_frame_desc
	b	LBB0_19
LBB0_18:
Lloh15:
	adrp	x8, _EPIPE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EPIPE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_19:
	mov	x0, x22
	bl	_fimc_md_graph_unlock
LBB0_20:
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_FIMC_SD_PAD_SINK_CAM,4,2       ; @FIMC_SD_PAD_SINK_CAM
	.comm	_FIMC_SD_PAD_SOURCE,4,2         ; @FIMC_SD_PAD_SOURCE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FMT_FLAGS_COMPRESSED,4,2       ; @FMT_FLAGS_COMPRESSED
	.comm	_IDX_SENSOR,4,2                 ; @IDX_SENSOR
	.comm	_EPIPE,4,2                      ; @EPIPE
	.no_dead_strip	___video_try_or_set_format
.subsections_via_symbols
