	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isp_stat_buf_get
_isp_stat_buf_get:                      ## @isp_stat_buf_get
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %rdi
	addq	$4, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	callq	_isp_stat_buf_find_oldest
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	leaq	L_.str.1(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_isp_stat_buf_check_magic
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rax
	movl	(%rax), %edi
	movl	(%r15), %edx
	movq	%r12, %rsi
	callq	_dev_dbg
	movl	$1, (%rbx)
	movq	%r15, %rdi
	callq	_isp_stat_buf_find_oldest
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
LBB0_4:
	movq	8(%r15), %rdi
	addq	$4, %rdi
	callq	_spin_unlock_irqrestore
	movq	8(%r15), %rax
	movl	(%rax), %edi
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%edi, %edi
	subl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_5:
	movq	%rbx, 16(%r15)
	movq	8(%r15), %rdi
	addq	$4, %rdi
	callq	_spin_unlock_irqrestore
	movq	8(%rbx), %rax
	cmpq	(%r14), %rax
	jle	LBB0_8
## %bb.6:
	movq	8(%r15), %rax
	movl	(%rax), %edi
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_warn
	movq	%r15, %rdi
	callq	_isp_stat_buf_release
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_8:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_isp_stat_buf_sync_for_cpu
	movl	8(%r14), %edi
	movl	16(%rbx), %esi
	movq	8(%rbx), %rdx
	callq	_copy_to_user
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	8(%r15), %rcx
	movl	(%rcx), %edi
	movl	(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %ecx
	callq	_dev_info
	movq	_EFAULT@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_isp_stat_buf_release
LBB0_10:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: cannot find a buffer.\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"%s: current buffer has corrupted data\n."

L_.str.2:                               ## @.str.2
	.asciz	"%s: userspace's buffer size is not enough.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"%s: failed copying %d bytes of stat data\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_isp_stat_buf_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isp_stat_buf_get
_isp_stat_buf_get:                      ; @isp_stat_buf_get
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	add	x0, x8, #4
	bl	_spin_lock_irqsave
	mov	x0, x19
	bl	_isp_stat_buf_find_oldest
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x22, l_.str.1@PAGE
Lloh1:
	add	x22, x22, l_.str.1@PAGEOFF
	mov	w23, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_isp_stat_buf_check_magic
	cbz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w2, [x19]
	mov	x1, x22
	bl	_dev_dbg
	str	w23, [x21]
	mov	x0, x19
	bl	_isp_stat_buf_find_oldest
	mov	x21, x0
	cbnz	x0, LBB0_2
LBB0_4:
	ldr	x8, [x19, #8]
	add	x0, x8, #4
	bl	_spin_unlock_irqrestore
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w2, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
LBB0_6:
	str	x21, [x19, #16]
	ldr	x8, [x19, #8]
	add	x0, x8, #4
	bl	_spin_unlock_irqrestore
	ldr	x8, [x21, #8]
	ldr	x9, [x20]
	cmp	x8, x9
	b.le	LBB0_8
; %bb.7:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w2, [x19]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
	mov	x0, x19
	bl	_isp_stat_buf_release
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_8:
	mov	x0, x19
	mov	x1, x21
	bl	_isp_stat_buf_sync_for_cpu
	ldr	w0, [x20, #8]
	ldr	w1, [x21, #16]
	ldr	x2, [x21, #8]
	bl	_copy_to_user
	cbz	w0, LBB0_10
; %bb.9:
	mov	x3, x0
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	ldr	w2, [x19]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_info
Lloh12:
	adrp	x8, _EFAULT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x20, x0
	mov	x0, x19
	bl	_isp_stat_buf_release
	mov	x0, x20
	b	LBB0_11
LBB0_10:
	mov	x0, x21
LBB0_11:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: cannot find a buffer.\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"%s: current buffer has corrupted data\n."

l_.str.2:                               ; @.str.2
	.asciz	"%s: userspace's buffer size is not enough.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"%s: failed copying %d bytes of stat data\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_isp_stat_buf_get
.subsections_via_symbols
