	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fimc_hw_camblk_cfg_writeback   ## -- Begin function fimc_hw_camblk_cfg_writeback
	.p2align	4, 0x90
_fimc_hw_camblk_cfg_writeback:          ## @fimc_hw_camblk_cfg_writeback
	.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	8(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	_SYSREG_CAMBLK@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movl	$7340032, %ecx                  ## imm = 0x700000
	andl	-44(%rbp), %ecx
	cmpl	$3145728, %ecx                  ## imm = 0x300000
	jne	LBB0_10
## %bb.4:
	movl	(%rbx), %edx
	xorl	%edi, %edi
	cmpl	$3, %edx
	setge	%dil
	leaq	L_.str(%rip), %rsi
	callq	_WARN
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movb	(%rbx), %cl
	addb	$20, %cl
	movl	$1, %r15d
	shll	%cl, %r15d
LBB0_6:
	movq	_SYSREG_CAMBLK_FIFORST_ISP@GOTPCREL(%rip), %r13
	movq	_SYSREG_CAMBLK_ISPWB_FULL_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	orl	(%r13), %ebx
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_10
## %bb.7:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	orl	(%r13), %r15d
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_10
## %bb.8:
	movq	_SYSREG_ISPBLK_FIFORST_CAM_BLK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_SYSREG_ISPBLK@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	%ebx, %ecx
	notl	%ecx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_10
## %bb.9:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%ebx, %ecx
	callq	_regmap_update_bits
	jmp	LBB0_10
LBB0_1:
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYSREG_CAMBLK,4,2              ## @SYSREG_CAMBLK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not supported id: %d\n"

	.comm	_SYSREG_CAMBLK_FIFORST_ISP,4,2  ## @SYSREG_CAMBLK_FIFORST_ISP
	.comm	_SYSREG_CAMBLK_ISPWB_FULL_EN,4,2 ## @SYSREG_CAMBLK_ISPWB_FULL_EN
	.comm	_SYSREG_ISPBLK_FIFORST_CAM_BLK,4,2 ## @SYSREG_ISPBLK_FIFORST_CAM_BLK
	.comm	_SYSREG_ISPBLK,4,2              ## @SYSREG_ISPBLK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fimc_hw_camblk_cfg_writeback   ; -- Begin function fimc_hw_camblk_cfg_writeback
	.p2align	2
_fimc_hw_camblk_cfg_writeback:          ; @fimc_hw_camblk_cfg_writeback
	.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
	ldr	x19, [x0, #8]
	cbz	x19, LBB0_5
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x22, _SYSREG_CAMBLK@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SYSREG_CAMBLK@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	mov	x0, x19
	bl	_regmap_read
	tbnz	w0, #31, LBB0_6
; %bb.2:
	ldr	w8, [sp, #12]
	and	w8, w8, #0x700000
	cmp	w8, #768, lsl #12               ; =3145728
	b.ne	LBB0_6
; %bb.3:
	ldr	w2, [x20]
	cmp	w2, #2
	cset	w0, gt
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN
	cbz	w0, LBB0_7
; %bb.4:
	mov	w20, #0
	b	LBB0_8
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
LBB0_7:
	ldr	w8, [x20]
	add	w8, w8, #20
	mov	w9, #1
	lsl	w20, w9, w8
LBB0_8:
Lloh4:
	adrp	x23, _SYSREG_CAMBLK_FIFORST_ISP@GOTPAGE
Lloh5:
	ldr	x23, [x23, _SYSREG_CAMBLK_FIFORST_ISP@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh6:
	adrp	x9, _SYSREG_CAMBLK_ISPWB_FULL_EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SYSREG_CAMBLK_ISPWB_FULL_EN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w21, w9, w8
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_6
; %bb.9:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w8, [x23]
	orr	w3, w8, w20
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_6
; %bb.10:
Lloh9:
	adrp	x8, _SYSREG_ISPBLK_FIFORST_CAM_BLK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SYSREG_ISPBLK_FIFORST_CAM_BLK@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
Lloh12:
	adrp	x21, _SYSREG_ISPBLK@GOTPAGE
Lloh13:
	ldr	x21, [x21, _SYSREG_ISPBLK@GOTPAGEOFF]
	ldr	w1, [x21]
	mvn	w3, w20
	mov	x0, x19
	mov	x2, x20
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_6
; %bb.11:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x20
	bl	_regmap_update_bits
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SYSREG_CAMBLK,4,2              ; @SYSREG_CAMBLK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not supported id: %d\n"

	.comm	_SYSREG_CAMBLK_FIFORST_ISP,4,2  ; @SYSREG_CAMBLK_FIFORST_ISP
	.comm	_SYSREG_CAMBLK_ISPWB_FULL_EN,4,2 ; @SYSREG_CAMBLK_ISPWB_FULL_EN
	.comm	_SYSREG_ISPBLK_FIFORST_CAM_BLK,4,2 ; @SYSREG_ISPBLK_FIFORST_CAM_BLK
	.comm	_SYSREG_ISPBLK,4,2              ; @SYSREG_ISPBLK
.subsections_via_symbols
