	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5k5baf_hw_set_crop_rects
_s5k5baf_hw_set_crop_rects:             ## @s5k5baf_hw_set_crop_rects
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	36(%rdi), %r14
	movq	_REG_G_PREVREQ_IN_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	36(%rdi), %ecx
	movl	40(%rdi), %edx
	movl	48(%rdi), %r8d
	movl	44(%rdi), %r9d
	xorl	%eax, %eax
	callq	_s5k5baf_write_seq
	leaq	8(%rbx), %rsi
	leaq	32(%rbx), %rcx
	leaq	-32(%rbp), %rdi
	movq	%r14, %rdx
	callq	_s5k5baf_rescale
	movq	_REG_G_PREVZOOM_IN_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-32(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-20(%rbp), %r8d
	movl	-24(%rbp), %r9d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_s5k5baf_write_seq
	movq	_REG_G_INPUTS_CHANGE_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$500, %esi                      ## imm = 0x1F4
	callq	_s5k5baf_synchronize
	movq	_REG_G_PREV_CFG_BYPASS_CHANGED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$500, %esi                      ## imm = 0x1F4
	callq	_s5k5baf_synchronize
	movq	%rbx, %rdi
	callq	_s5k5baf_get_cfg_error
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_s5k5baf_clear_error
	testl	%eax, %eax
	js	LBB0_10
## %bb.1:
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.2:
	cmpl	$128, %r14d
	jne	LBB0_11
## %bb.3:
	movq	_S5K5BAF_MAX_FR_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_s5k5baf_hw_set_fiv
	movq	%rbx, %rdi
	callq	_s5k5baf_get_cfg_error
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_s5k5baf_clear_error
	testl	%eax, %eax
	js	LBB0_10
## %bb.4:
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.5:
	leaq	28(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_v4l2_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, (%rbx)
LBB0_6:
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	callq	_s5k5baf_hw_set_fiv
	movq	%rbx, %rdi
	callq	_s5k5baf_hw_validate_cfg
LBB0_7:
	cmpl	$0, 24(%rbx)
	je	LBB0_8
## %bb.9:
	xorl	%edi, %edi
	callq	_REG_P_OUT_WIDTH
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_s5k5baf_write_seq
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	callq	_s5k5baf_hw_set_fiv
	movq	%rbx, %rdi
	callq	_s5k5baf_hw_validate_cfg
	movq	%rbx, %rdi
	callq	_s5k5baf_clear_error
	jmp	LBB0_10
LBB0_11:
	addq	$28, %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_v4l2_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_8:
	xorl	%eax, %eax
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_G_PREVREQ_IN_WIDTH,4,2     ## @REG_G_PREVREQ_IN_WIDTH
	.comm	_REG_G_PREVZOOM_IN_WIDTH,4,2    ## @REG_G_PREVZOOM_IN_WIDTH
	.comm	_REG_G_INPUTS_CHANGE_REQ,4,2    ## @REG_G_INPUTS_CHANGE_REQ
	.comm	_REG_G_PREV_CFG_BYPASS_CHANGED,4,2 ## @REG_G_PREV_CFG_BYPASS_CHANGED
	.comm	_S5K5BAF_MAX_FR_TIME,4,2        ## @S5K5BAF_MAX_FR_TIME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"crop error on max frame interval: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"crop error: %d\n"

	.no_dead_strip	_s5k5baf_hw_set_crop_rects
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5k5baf_hw_set_crop_rects
_s5k5baf_hw_set_crop_rects:             ; @s5k5baf_hw_set_crop_rects
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _REG_G_PREVREQ_IN_WIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REG_G_PREVREQ_IN_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x20, x0
	ldr	w3, [x20, #36]!
	ldp	w9, w8, [x0, #44]
	ldr	w2, [x0, #40]
	stp	x8, x9, [sp]
	bl	_s5k5baf_write_seq
	add	x1, x19, #8
	add	x3, x19, #32
	add	x0, sp, #16
	mov	x2, x20
	bl	_s5k5baf_rescale
Lloh3:
	adrp	x8, _REG_G_PREVZOOM_IN_WIDTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_G_PREVZOOM_IN_WIDTH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldp	w3, w2, [sp, #16]
	ldp	w9, w8, [sp, #24]
	stp	x8, x9, [sp]
	mov	x0, x19
	bl	_s5k5baf_write_seq
Lloh6:
	adrp	x8, _REG_G_INPUTS_CHANGE_REQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_G_INPUTS_CHANGE_REQ@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #500
	bl	_s5k5baf_synchronize
Lloh9:
	adrp	x8, _REG_G_PREV_CFG_BYPASS_CHANGED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_G_PREV_CFG_BYPASS_CHANGED@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #500
	bl	_s5k5baf_synchronize
	mov	x0, x19
	bl	_s5k5baf_get_cfg_error
	mov	x20, x0
	mov	x0, x19
	bl	_s5k5baf_clear_error
	tbnz	w0, #31, LBB0_11
; %bb.1:
	cbz	w20, LBB0_7
; %bb.2:
	cmp	w20, #128
	b.ne	LBB0_9
; %bb.3:
Lloh12:
	adrp	x8, _S5K5BAF_MAX_FR_TIME@GOTPAGE
Lloh13:
	ldr	x8, [x8, _S5K5BAF_MAX_FR_TIME@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_s5k5baf_hw_set_fiv
	mov	x0, x19
	bl	_s5k5baf_get_cfg_error
	mov	x20, x0
	mov	x0, x19
	bl	_s5k5baf_clear_error
	tbnz	w0, #31, LBB0_11
; %bb.4:
	cbz	w20, LBB0_6
; %bb.5:
	add	x0, x19, #28
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_v4l2_err
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x19]
LBB0_6:
	ldr	w1, [x19, #4]
	mov	x0, x19
	bl	_s5k5baf_hw_set_fiv
	mov	x0, x19
	bl	_s5k5baf_hw_validate_cfg
LBB0_7:
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_10
; %bb.8:
	mov	w0, #0
	bl	_REG_P_OUT_WIDTH
	mov	x1, x0
	ldp	w3, w2, [x19, #8]
	mov	x0, x19
	bl	_s5k5baf_write_seq
	ldr	w1, [x19, #4]
	mov	x0, x19
	bl	_s5k5baf_hw_set_fiv
	mov	x0, x19
	bl	_s5k5baf_hw_validate_cfg
	mov	x0, x19
	bl	_s5k5baf_clear_error
	b	LBB0_11
LBB0_9:
	add	x0, x19, #28
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_v4l2_err
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_G_PREVREQ_IN_WIDTH,4,2     ; @REG_G_PREVREQ_IN_WIDTH
	.comm	_REG_G_PREVZOOM_IN_WIDTH,4,2    ; @REG_G_PREVZOOM_IN_WIDTH
	.comm	_REG_G_INPUTS_CHANGE_REQ,4,2    ; @REG_G_INPUTS_CHANGE_REQ
	.comm	_REG_G_PREV_CFG_BYPASS_CHANGED,4,2 ; @REG_G_PREV_CFG_BYPASS_CHANGED
	.comm	_S5K5BAF_MAX_FR_TIME,4,2        ; @S5K5BAF_MAX_FR_TIME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"crop error on max frame interval: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"crop error: %d\n"

	.no_dead_strip	_s5k5baf_hw_set_crop_rects
.subsections_via_symbols
