	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hist_buf_pio
_hist_buf_pio:                          ## @hist_buf_pio
	.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	%rdi, %r14
	movq	8(%rdi), %r15
	movq	16(%rdi), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	_OMAP3_ISP_IOMEM_HIST@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	_ISPHIST_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_isp_reg_writel
	movl	(%r12), %esi
	movq	_ISPHIST_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ISPHIST_CNT_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_isp_reg_set
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%r14), %eax
	leal	15(%rax), %r13d
	cmpl	$31, %r13d
	jb	LBB0_5
## %bb.3:
	testl	%eax, %eax
	cmovnsl	%eax, %r13d
	sarl	$4, %r13d
	movq	_ISPHIST_DATA@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movl	(%r14), %edx
	movq	%r15, %rdi
	callq	_isp_reg_readl
	movl	%eax, (%rbx)
	movl	(%r12), %esi
	movl	(%r14), %edx
	movq	%r15, %rdi
	callq	_isp_reg_readl
	movl	%eax, 4(%rbx)
	movl	(%r12), %esi
	movl	(%r14), %edx
	movq	%r15, %rdi
	callq	_isp_reg_readl
	movl	%eax, 8(%rbx)
	movl	(%r12), %esi
	movl	(%r14), %edx
	movq	%r15, %rdi
	callq	_isp_reg_readl
	movl	%eax, 12(%rbx)
	addq	$16, %rbx
	decl	%r13d
	jne	LBB0_4
LBB0_5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movl	(%r12), %esi
	movq	_ISPHIST_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ISPHIST_CNT_CLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_isp_reg_clr
	movq	_STAT_BUF_DONE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_1:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_hist_reset_mem
	movq	_STAT_NO_BUF@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hist: invalid PIO buffer address\n"

	.comm	_STAT_NO_BUF,4,2                ## @STAT_NO_BUF
	.comm	_OMAP3_ISP_IOMEM_HIST,4,2       ## @OMAP3_ISP_IOMEM_HIST
	.comm	_ISPHIST_ADDR,4,2               ## @ISPHIST_ADDR
	.comm	_ISPHIST_CNT,4,2                ## @ISPHIST_CNT
	.comm	_ISPHIST_CNT_CLEAR,4,2          ## @ISPHIST_CNT_CLEAR
	.comm	_ISPHIST_DATA,4,2               ## @ISPHIST_DATA
	.comm	_STAT_BUF_DONE,4,2              ## @STAT_BUF_DONE
	.no_dead_strip	_hist_buf_pio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hist_buf_pio
_hist_buf_pio:                          ; @hist_buf_pio
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldp	x20, x8, [x0, #8]
	ldr	x21, [x8]
	cbz	x21, LBB0_5
; %bb.1:
Lloh0:
	adrp	x22, _OMAP3_ISP_IOMEM_HIST@GOTPAGE
Lloh1:
	ldr	x22, [x22, _OMAP3_ISP_IOMEM_HIST@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh2:
	adrp	x8, _ISPHIST_ADDR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ISPHIST_ADDR@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x20
	mov	w1, #0
	bl	_isp_reg_writel
	ldr	w1, [x22]
Lloh5:
	adrp	x23, _ISPHIST_CNT@GOTPAGE
Lloh6:
	ldr	x23, [x23, _ISPHIST_CNT@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh7:
	adrp	x24, _ISPHIST_CNT_CLEAR@GOTPAGE
Lloh8:
	ldr	x24, [x24, _ISPHIST_CNT_CLEAR@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x0, x20
	bl	_isp_reg_set
	ldr	w8, [x19]
	add	w9, w8, #15
	cmp	w9, #31
	b.lo	LBB0_4
; %bb.2:
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w25, w8, #4
Lloh9:
	adrp	x26, _ISPHIST_DATA@GOTPAGE
Lloh10:
	ldr	x26, [x26, _ISPHIST_DATA@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	ldr	w2, [x26]
	mov	x0, x20
	bl	_isp_reg_readl
	str	w0, [x21]
	ldr	w1, [x22]
	ldr	w2, [x26]
	mov	x0, x20
	bl	_isp_reg_readl
	str	w0, [x21, #4]
	ldr	w1, [x22]
	ldr	w2, [x26]
	mov	x0, x20
	bl	_isp_reg_readl
	str	w0, [x21, #8]
	ldr	w1, [x22]
	ldr	w2, [x26]
	mov	x0, x20
	bl	_isp_reg_readl
	str	w0, [x21, #12]
	add	x21, x21, #16
	subs	w25, w25, #1
	b.ne	LBB0_3
LBB0_4:
	ldr	x0, [x19, #8]
	ldr	w1, [x22]
	ldr	w2, [x23]
	ldr	w3, [x24]
	bl	_isp_reg_clr
Lloh11:
	adrp	x8, _STAT_BUF_DONE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STAT_BUF_DONE@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	ldr	w0, [x20]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_hist_reset_mem
Lloh15:
	adrp	x8, _STAT_NO_BUF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _STAT_NO_BUF@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hist: invalid PIO buffer address\n"

	.comm	_STAT_NO_BUF,4,2                ; @STAT_NO_BUF
	.comm	_OMAP3_ISP_IOMEM_HIST,4,2       ; @OMAP3_ISP_IOMEM_HIST
	.comm	_ISPHIST_ADDR,4,2               ; @ISPHIST_ADDR
	.comm	_ISPHIST_CNT,4,2                ; @ISPHIST_CNT
	.comm	_ISPHIST_CNT_CLEAR,4,2          ; @ISPHIST_CNT_CLEAR
	.comm	_ISPHIST_DATA,4,2               ; @ISPHIST_DATA
	.comm	_STAT_BUF_DONE,4,2              ; @STAT_BUF_DONE
	.no_dead_strip	_hist_buf_pio
.subsections_via_symbols
