	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5k6aa_set_prev_config
_s5k6aa_set_prev_config:                ## @s5k6aa_set_prev_config
	.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
	pushq	%rax
	.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
	addq	$32, %rdi
	callq	_v4l2_get_subdevdata
	movq	%rax, %r14
	movq	16(%r13), %rax
	movq	(%rax), %rax
	movq	_S5K6AA_MAX_HIGHRES_FR_TIME@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
## %bb.2:
	movq	_FR_RATE_Q_BEST_QUALITY@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_FR_RATE_Q_BEST_FRRATE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rbx), %r15d
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_s5k6aa_set_output_framefmt
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:
	movl	%r15d, %edi
	callq	_REG_P_MAX_OUT_RATE
	movq	(%r13), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_s5k6aa_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.5:
	movl	%r15d, %edi
	callq	_REG_P_MIN_OUT_RATE
	movq	8(%r13), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_s5k6aa_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	movl	%r15d, %edi
	callq	_REG_P_CLK_INDEX
	movq	8(%rbx), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_s5k6aa_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	movl	%r15d, %edi
	callq	_REG_P_FR_RATE_TYPE
	movq	_FR_RATE_DYNAMIC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_s5k6aa_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.8:
	movl	%r15d, %edi
	callq	_REG_P_FR_RATE_Q_TYPE
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_s5k6aa_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	movl	%r15d, %edi
	callq	_REG_P_MAX_FR_TIME
	movq	16(%r13), %rcx
	movq	(%rcx), %rdx
	addq	$33, %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_s5k6aa_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movl	%r15d, %edi
	callq	_REG_P_MIN_FR_TIME
	movq	16(%r13), %rcx
	movq	(%rcx), %rdx
	addq	$-33, %rdx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_s5k6aa_write
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.11:
	movq	%r14, %rdi
	movl	$250, %esi
	movl	%r15d, %edx
	callq	_s5k6aa_new_config_sync
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	movq	%r14, %rdi
	callq	_s5k6aa_preview_config_status
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.13:
	movq	$0, 24(%r13)
	xorl	%r12d, %r12d
LBB0_14:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r13), %rax
	movq	(%rax), %r8
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r14, %rdx
	movl	%r12d, %r9d
	callq	_v4l2_dbg
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S5K6AA_MAX_HIGHRES_FR_TIME,8,3 ## @S5K6AA_MAX_HIGHRES_FR_TIME
	.comm	_FR_RATE_Q_BEST_FRRATE,8,3      ## @FR_RATE_Q_BEST_FRRATE
	.comm	_FR_RATE_Q_BEST_QUALITY,8,3     ## @FR_RATE_Q_BEST_QUALITY
	.comm	_FR_RATE_DYNAMIC,8,3            ## @FR_RATE_DYNAMIC
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Frame interval: %d +/- 3.3ms. (%d)\n"

	.no_dead_strip	_s5k6aa_set_prev_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5k6aa_set_prev_config
_s5k6aa_set_prev_config:                ; @s5k6aa_set_prev_config
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x23, x1
	mov	x20, x0
	add	x0, x0, #32
	bl	_v4l2_get_subdevdata
	mov	x19, x0
	ldr	w21, [x23]
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _S5K6AA_MAX_HIGHRES_FR_TIME@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S5K6AA_MAX_HIGHRES_FR_TIME@GOTPAGEOFF]
Lloh2:
	adrp	x10, _FR_RATE_Q_BEST_QUALITY@GOTPAGE
Lloh3:
	ldr	x10, [x10, _FR_RATE_Q_BEST_QUALITY@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x11, _FR_RATE_Q_BEST_FRRATE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _FR_RATE_Q_BEST_FRRATE@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, lt
	ldr	x22, [x8]
	mov	x0, x20
	mov	x1, x23
	bl	_s5k6aa_set_output_framefmt
	mov	x24, x0
	cbnz	w0, LBB0_11
; %bb.1:
	mov	x0, x21
	bl	_REG_P_MAX_OUT_RATE
	mov	x1, x0
	ldr	x2, [x20]
	mov	x0, x19
	bl	_s5k6aa_write
	mov	x24, x0
	cbnz	w0, LBB0_11
; %bb.2:
	mov	x0, x21
	bl	_REG_P_MIN_OUT_RATE
	mov	x1, x0
	ldr	x2, [x20, #8]
	mov	x0, x19
	bl	_s5k6aa_write
	mov	x24, x0
	cbnz	w0, LBB0_11
; %bb.3:
	mov	x0, x21
	bl	_REG_P_CLK_INDEX
	mov	x1, x0
	ldr	x2, [x23, #8]
	mov	x0, x19
	bl	_s5k6aa_write
	mov	x24, x0
	cbnz	w0, LBB0_11
; %bb.4:
	mov	x0, x21
	bl	_REG_P_FR_RATE_TYPE
	mov	x1, x0
Lloh7:
	adrp	x8, _FR_RATE_DYNAMIC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FR_RATE_DYNAMIC@GOTPAGEOFF]
Lloh9:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_s5k6aa_write
	mov	x24, x0
	cbnz	w0, LBB0_11
; %bb.5:
	mov	x0, x21
	bl	_REG_P_FR_RATE_Q_TYPE
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	bl	_s5k6aa_write
	mov	x24, x0
	cbnz	w0, LBB0_11
; %bb.6:
	mov	x0, x21
	bl	_REG_P_MAX_FR_TIME
	mov	x1, x0
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	add	x2, x8, #33
	mov	x0, x19
	bl	_s5k6aa_write
	mov	x24, x0
	cbnz	w0, LBB0_11
; %bb.7:
	mov	x0, x21
	bl	_REG_P_MIN_FR_TIME
	mov	x1, x0
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	sub	x2, x8, #33
	mov	x0, x19
	bl	_s5k6aa_write
	mov	x24, x0
	cbnz	w0, LBB0_11
; %bb.8:
	mov	x0, x19
	mov	w1, #250
	mov	x2, x21
	bl	_s5k6aa_new_config_sync
	mov	x24, x0
	cbnz	w0, LBB0_11
; %bb.9:
	mov	x0, x19
	bl	_s5k6aa_preview_config_status
	mov	x24, x0
	cbnz	w0, LBB0_11
; %bb.10:
	str	xzr, [x20, #24]
LBB0_11:
Lloh10:
	adrp	x8, _debug@GOTPAGE
Lloh11:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	x8, [x20, #16]
	ldr	x4, [x8]
Lloh13:
	adrp	x3, l_.str@PAGE
Lloh14:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	mov	x5, x24
	bl	_v4l2_dbg
	mov	x0, x24
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_S5K6AA_MAX_HIGHRES_FR_TIME,8,3 ; @S5K6AA_MAX_HIGHRES_FR_TIME
	.comm	_FR_RATE_Q_BEST_FRRATE,8,3      ; @FR_RATE_Q_BEST_FRRATE
	.comm	_FR_RATE_Q_BEST_QUALITY,8,3     ; @FR_RATE_Q_BEST_QUALITY
	.comm	_FR_RATE_DYNAMIC,8,3            ; @FR_RATE_DYNAMIC
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Frame interval: %d +/- 3.3ms. (%d)\n"

	.no_dead_strip	_s5k6aa_set_prev_config
.subsections_via_symbols
