	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function do_imageconv_stats
LCPI0_0:
	.quad	0x412e848000000000              ## double 1.0E+6
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_do_imageconv_stats:                    ## @do_imageconv_stats
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset %rbx, -24
	xorl	%ebx, %ebx
	cmpl	$3, %edi
	jl	LBB0_2
## %bb.1:
	movq	16(%rsi), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcasecmp
	xorl	%ebx, %ebx
	testq	%rax, %rax
	sete	%bl
LBB0_2:
	leaq	-12(%rbp), %rdi
	callq	_OpenVideoCoreMemory
	testl	%eax, %eax
	js	LBB0_12
## %bb.3:
	movl	-12(%rbp), %edi
	leaq	L_.str.2(%rip), %rsi
	leaq	-20(%rbp), %rdx
	leaq	-128(%rbp), %rcx
	callq	_LookupVideoCoreSymbol
	testl	%eax, %eax
	je	LBB0_13
## %bb.4:
	movl	-12(%rbp), %edi
	movl	-20(%rbp), %edx
	leaq	-16(%rbp), %rsi
	callq	_ReadVideoCoreUInt32
	testl	%eax, %eax
	je	LBB0_14
## %bb.5:
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.6:
	leaq	-120(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$80, %edx
	callq	_memset
	movq	_IMAGECONV_STATS_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -120(%rbp)
	movl	-12(%rbp), %edi
	movl	-16(%rbp), %edx
	movq	%rbx, %rsi
	movl	$80, %ecx
	callq	_WriteVideoCoreMemory
	testl	%eax, %eax
	je	LBB0_18
LBB0_7:
	movl	-12(%rbp), %edi
	movl	-16(%rbp), %edx
	leaq	-120(%rbp), %rsi
	movl	$80, %ecx
	callq	_ReadVideoCoreMemory
	testl	%eax, %eax
	je	LBB0_16
## %bb.8:
	movl	-120(%rbp), %edx
	movq	_IMAGECONV_STATS_MAGIC@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_17
## %bb.9:
	movslq	-116(%rbp), %rcx
	testq	%rcx, %rcx
	je	LBB0_23
## %bb.10:
	movq	-112(%rbp), %rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_24
## %bb.11:
	cqto
	idivq	%rcx
	jmp	LBB0_25
LBB0_12:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_21
LBB0_13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_15
LBB0_14:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
LBB0_15:
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_20
LBB0_16:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-16(%rbp), %edx
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_19
LBB0_17:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_19
LBB0_18:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-16(%rbp), %edx
	leaq	L_.str.5(%rip), %rsi
LBB0_19:
	xorl	%eax, %eax
	callq	_fprintf
LBB0_20:
	movl	-12(%rbp), %edi
	callq	_CloseVideoCoreMemory
LBB0_21:
	movl	$-1, %eax
LBB0_22:
	addq	$120, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_23:
	cvtsi2sd	%ecx, %xmm0
	xorpd	%xmm1, %xmm1
	movsd	%xmm1, -32(%rbp)                ## 8-byte Spill
	xorpd	%xmm1, %xmm1
	movsd	%xmm1, -40(%rbp)                ## 8-byte Spill
	jmp	LBB0_26
LBB0_24:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_25:
	cvtsi2sd	%rax, %xmm0
	movsd	%xmm0, -32(%rbp)                ## 8-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ecx, %xmm0
	movsd	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero
	mulsd	%xmm0, %xmm2
	movsd	-104(%rbp), %xmm1               ## xmm1 = mem[0],zero
	subsd	-96(%rbp), %xmm1
	divsd	%xmm1, %xmm2
	movsd	%xmm2, -40(%rbp)                ## 8-byte Spill
LBB0_26:
	leaq	L_.str.8(%rip), %rbx
	leaq	L_.str.9(%rip), %rsi
	movq	%rbx, %rdi
	callq	_printf
	movsd	-88(%rbp), %xmm0                ## xmm0 = mem[0],zero
	leaq	L_.str.10(%rip), %rsi
	movq	%rbx, %rdi
	callq	_printf
	movsd	-80(%rbp), %xmm0                ## xmm0 = mem[0],zero
	leaq	L_.str.11(%rip), %rsi
	movq	%rbx, %rdi
	callq	_printf
	movsd	-72(%rbp), %xmm0                ## xmm0 = mem[0],zero
	leaq	L_.str.12(%rip), %rsi
	movq	%rbx, %rdi
	callq	_printf
	movsd	-64(%rbp), %xmm0                ## xmm0 = mem[0],zero
	leaq	L_.str.13(%rip), %rsi
	movq	%rbx, %rdi
	callq	_printf
	movsd	-56(%rbp), %xmm0                ## xmm0 = mem[0],zero
	leaq	L_.str.14(%rip), %rsi
	movq	%rbx, %rdi
	callq	_printf
	leaq	L_.str.15(%rip), %rdi
	leaq	L_.str.16(%rip), %rsi
	movsd	-32(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_printf
	leaq	L_.str.17(%rip), %rdi
	leaq	L_.str.18(%rip), %rsi
	movsd	-40(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_printf
	movsd	-48(%rbp), %xmm0                ## xmm0 = mem[0],zero
	leaq	L_.str.19(%rip), %rdi
	leaq	L_.str.20(%rip), %rsi
	callq	_printf
	movl	-12(%rbp), %edi
	callq	_CloseVideoCoreMemory
	xorl	%eax, %eax
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"Unable to open videocore memory: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"imageconv_stats"

L_.str.3:                               ## @.str.3
	.asciz	"Could not get imageconv stats address\n"

L_.str.4:                               ## @.str.4
	.asciz	"Could not read imageconv stats address\n"

	.comm	_IMAGECONV_STATS_MAGIC,4,2      ## @IMAGECONV_STATS_MAGIC
L_.str.5:                               ## @.str.5
	.asciz	"Could not write stats at 0x%x\n"

L_.str.6:                               ## @.str.6
	.asciz	"Could not read stats at 0x%x\n"

L_.str.7:                               ## @.str.7
	.asciz	"Bad magic 0x%x\n"

L_.str.8:                               ## @.str.8
	.asciz	"%-25s:\t%d\n"

L_.str.9:                               ## @.str.9
	.asciz	"conversions"

L_.str.10:                              ## @.str.10
	.asciz	"size requests"

L_.str.11:                              ## @.str.11
	.asciz	"max vrf delay"

L_.str.12:                              ## @.str.12
	.asciz	"vrf wait time"

L_.str.13:                              ## @.str.13
	.asciz	"duplicate conversions"

L_.str.14:                              ## @.str.14
	.asciz	"failures"

L_.str.15:                              ## @.str.15
	.asciz	"%-25s:\t%ld\n"

L_.str.16:                              ## @.str.16
	.asciz	"convert time / image (us)"

L_.str.17:                              ## @.str.17
	.asciz	"%-25s:\t%.1f\n"

L_.str.18:                              ## @.str.18
	.asciz	"client frame_rate"

L_.str.19:                              ## @.str.19
	.asciz	"%-25s:\t%d us\n"

L_.str.20:                              ## @.str.20
	.asciz	"max delay to consume"

	.no_dead_strip	_do_imageconv_stats
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_imageconv_stats
_do_imageconv_stats:                    ; @do_imageconv_stats
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	d9, d8, [sp, #112]              ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset b8, -40
	.cfi_offset b9, -48
	cmp	w0, #3
	b.lt	LBB0_2
; %bb.1:
	ldr	x0, [x1, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcasecmp
	cmp	x0, #0
	cset	w19, eq
	b	LBB0_3
LBB0_2:
	mov	w19, #0
LBB0_3:
	sub	x0, x29, #36
	bl	_OpenVideoCoreMemory
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_12
; %bb.4:
	ldur	w0, [x29, #-36]
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	sub	x2, x29, #40
	sub	x3, x29, #56
	bl	_LookupVideoCoreSymbol
	cbz	w0, LBB0_13
; %bb.5:
	ldp	w2, w0, [x29, #-40]
	sub	x1, x29, #44
	bl	_ReadVideoCoreUInt32
	cbz	w0, LBB0_14
; %bb.6:
Lloh4:
	adrp	x20, _IMAGECONV_STATS_MAGIC@GOTPAGE
Lloh5:
	ldr	x20, [x20, _IMAGECONV_STATS_MAGIC@GOTPAGEOFF]
	cbz	w19, LBB0_8
; %bb.7:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #80
	bl	_memset
	ldr	w8, [x20]
	str	w8, [sp, #8]
	ldur	w0, [x29, #-36]
	ldur	w2, [x29, #-44]
	add	x1, sp, #8
	mov	w3, #80
	bl	_WriteVideoCoreMemory
	cbz	w0, LBB0_17
LBB0_8:
	ldur	w0, [x29, #-36]
	ldur	w2, [x29, #-44]
	add	x1, sp, #8
	mov	w3, #80
	bl	_ReadVideoCoreMemory
	cbz	w0, LBB0_15
; %bb.9:
	ldr	w8, [sp, #8]
	ldr	w9, [x20]
	cmp	w8, w9
	b.ne	LBB0_16
; %bb.10:
	ldrsw	x8, [sp, #12]
	cbz	w8, LBB0_21
; %bb.11:
	ldr	x9, [sp, #16]
	sdiv	x9, x9, x8
	scvtf	d8, x9
	scvtf	d0, w8
	mov	x8, #145685290680320
	movk	x8, #16686, lsl #48
	fmov	d1, x8
	fmul	d1, d0, d1
	ldp	d2, d3, [sp, #24]
	fsub	d2, d2, d3
	fdiv	d9, d1, d2
	b	LBB0_22
LBB0_12:
Lloh6:
	adrp	x8, _stderr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	x0, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_fprintf
	b	LBB0_19
LBB0_13:
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_18
LBB0_14:
Lloh16:
	adrp	x8, _stderr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_18
LBB0_15:
Lloh21:
	adrp	x8, _stderr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldur	w8, [x29, #-44]
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.6@PAGE
Lloh25:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_18
LBB0_16:
Lloh26:
	adrp	x9, _stderr@GOTPAGE
Lloh27:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x9]
	str	x8, [sp]
Lloh29:
	adrp	x1, l_.str.7@PAGE
Lloh30:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_18
LBB0_17:
Lloh31:
	adrp	x8, _stderr@GOTPAGE
Lloh32:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	ldur	w8, [x29, #-44]
	str	x8, [sp]
Lloh34:
	adrp	x1, l_.str.5@PAGE
Lloh35:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_18:
	bl	_fprintf
	ldur	w0, [x29, #-36]
	bl	_CloseVideoCoreMemory
LBB0_19:
	mov	w0, #-1
LBB0_20:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #112]              ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_21:
	scvtf	d0, w8
	movi	d8, #0000000000000000
	movi	d9, #0000000000000000
LBB0_22:
Lloh36:
	adrp	x19, l_.str.8@PAGE
Lloh37:
	add	x19, x19, l_.str.8@PAGEOFF
Lloh38:
	adrp	x1, l_.str.9@PAGE
Lloh39:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_printf
	ldr	d0, [sp, #40]
Lloh40:
	adrp	x1, l_.str.10@PAGE
Lloh41:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x19
	bl	_printf
	ldr	d0, [sp, #48]
Lloh42:
	adrp	x1, l_.str.11@PAGE
Lloh43:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	x0, x19
	bl	_printf
	ldr	d0, [sp, #56]
Lloh44:
	adrp	x1, l_.str.12@PAGE
Lloh45:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	x0, x19
	bl	_printf
	ldr	d0, [sp, #64]
Lloh46:
	adrp	x1, l_.str.13@PAGE
Lloh47:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	x0, x19
	bl	_printf
	ldr	d0, [sp, #72]
Lloh48:
	adrp	x1, l_.str.14@PAGE
Lloh49:
	add	x1, x1, l_.str.14@PAGEOFF
	mov	x0, x19
	bl	_printf
Lloh50:
	adrp	x0, l_.str.15@PAGE
Lloh51:
	add	x0, x0, l_.str.15@PAGEOFF
Lloh52:
	adrp	x1, l_.str.16@PAGE
Lloh53:
	add	x1, x1, l_.str.16@PAGEOFF
	fmov	d0, d8
	bl	_printf
Lloh54:
	adrp	x0, l_.str.17@PAGE
Lloh55:
	add	x0, x0, l_.str.17@PAGEOFF
Lloh56:
	adrp	x1, l_.str.18@PAGE
Lloh57:
	add	x1, x1, l_.str.18@PAGEOFF
	fmov	d0, d9
	bl	_printf
	ldr	d0, [sp, #80]
Lloh58:
	adrp	x0, l_.str.19@PAGE
Lloh59:
	add	x0, x0, l_.str.19@PAGEOFF
Lloh60:
	adrp	x1, l_.str.20@PAGE
Lloh61:
	add	x1, x1, l_.str.20@PAGEOFF
	bl	_printf
	ldur	w0, [x29, #-36]
	bl	_CloseVideoCoreMemory
	mov	w0, #0
	b	LBB0_20
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"Unable to open videocore memory: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"imageconv_stats"

l_.str.3:                               ; @.str.3
	.asciz	"Could not get imageconv stats address\n"

l_.str.4:                               ; @.str.4
	.asciz	"Could not read imageconv stats address\n"

	.comm	_IMAGECONV_STATS_MAGIC,4,2      ; @IMAGECONV_STATS_MAGIC
l_.str.5:                               ; @.str.5
	.asciz	"Could not write stats at 0x%x\n"

l_.str.6:                               ; @.str.6
	.asciz	"Could not read stats at 0x%x\n"

l_.str.7:                               ; @.str.7
	.asciz	"Bad magic 0x%x\n"

l_.str.8:                               ; @.str.8
	.asciz	"%-25s:\t%d\n"

l_.str.9:                               ; @.str.9
	.asciz	"conversions"

l_.str.10:                              ; @.str.10
	.asciz	"size requests"

l_.str.11:                              ; @.str.11
	.asciz	"max vrf delay"

l_.str.12:                              ; @.str.12
	.asciz	"vrf wait time"

l_.str.13:                              ; @.str.13
	.asciz	"duplicate conversions"

l_.str.14:                              ; @.str.14
	.asciz	"failures"

l_.str.15:                              ; @.str.15
	.asciz	"%-25s:\t%ld\n"

l_.str.16:                              ; @.str.16
	.asciz	"convert time / image (us)"

l_.str.17:                              ; @.str.17
	.asciz	"%-25s:\t%.1f\n"

l_.str.18:                              ; @.str.18
	.asciz	"client frame_rate"

l_.str.19:                              ; @.str.19
	.asciz	"%-25s:\t%d us\n"

l_.str.20:                              ; @.str.20
	.asciz	"max delay to consume"

	.no_dead_strip	_do_imageconv_stats
.subsections_via_symbols
