	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5k4ecgx_set_fmt
_s5k4ecgx_set_fmt:                      ## @s5k4ecgx_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_to_s5k4ecgx
	movq	%rax, %r15
	movq	$0, -48(%rbp)
	leaq	8(%r13), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_s5k4ecgx_try_fmt
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_s5k4ecgx_try_frame_size
	movq	_V4L2_COLORSPACE_JPEG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r13)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	movq	(%r13), %rax
	movq	_V4L2_SUBDEV_FORMAT_TRY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	xorl	%r15d, %r15d
	testq	%r14, %r14
	je	LBB0_7
## %bb.2:
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_v4l2_subdev_get_try_format
	movq	(%rbx), %rcx
	movq	%rcx, (%rax)
	jmp	LBB0_7
LBB0_3:
	movq	%r15, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	cmpl	$0, 24(%r15)
	je	LBB0_4
## %bb.5:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_4:
	movq	-48(%rbp), %rax
	movq	%rax, 16(%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r15)
	movl	$1, (%r15)
	xorl	%r15d, %r15d
LBB0_6:
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_7:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ## @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_SUBDEV_FORMAT_TRY,8,3     ## @V4L2_SUBDEV_FORMAT_TRY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_s5k4ecgx_set_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5k4ecgx_set_fmt
_s5k4ecgx_set_fmt:                      ; @s5k4ecgx_set_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x24, x2
	mov	x20, x1
	mov	x21, x0
	bl	_to_s5k4ecgx
	mov	x19, x0
	str	xzr, [sp, #8]
	add	x22, x24, #8
	mov	x0, x21
	mov	x1, x22
	bl	_s5k4ecgx_try_fmt
	mov	x23, x0
	add	x1, sp, #8
	mov	x0, x22
	bl	_s5k4ecgx_try_frame_size
Lloh0:
	adrp	x8, _V4L2_COLORSPACE_JPEG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_COLORSPACE_JPEG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _V4L2_FIELD_NONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [x24, #8]
	ldr	x8, [x24]
Lloh6:
	adrp	x9, _V4L2_SUBDEV_FORMAT_TRY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_TRY@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	cbz	x20, LBB0_5
; %bb.2:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	bl	_v4l2_subdev_get_try_format
	mov	w21, #0
	ldr	x8, [x22]
	str	x8, [x0]
	b	LBB0_8
LBB0_3:
	add	x20, x19, #4
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_6
; %bb.4:
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_5:
	mov	w21, #0
	b	LBB0_8
LBB0_6:
	mov	w21, #0
	ldr	x8, [sp, #8]
	stp	x23, x8, [x19, #8]
	mov	w8, #1
	str	w8, [x19]
LBB0_7:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ; @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_SUBDEV_FORMAT_TRY,8,3     ; @V4L2_SUBDEV_FORMAT_TRY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_s5k4ecgx_set_fmt
.subsections_via_symbols
