	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReadVideoCoreMemoryBySymbol    ## -- Begin function ReadVideoCoreMemoryBySymbol
	.p2align	4, 0x90
_ReadVideoCoreMemoryBySymbol:           ## @ReadVideoCoreMemoryBySymbol
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movl	%edi, %r12d
	leaq	-36(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	callq	_LookupVideoCoreSymbol
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	-48(%rbp), %rcx
	cmpq	%r15, %rcx
	jbe	LBB0_4
## %bb.3:
	movq	%r15, -48(%rbp)
	movq	%r15, %rcx
LBB0_4:
	movl	-36(%rbp), %edx
	movl	%r12d, %edi
	movq	%r14, %rsi
	callq	_ReadVideoCoreMemory
	movl	$1, %r14d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	-48(%rbp), %rsi
	movl	-36(%rbp), %edx
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_ERR
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_ERR
LBB0_6:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Symbol not found: '%s'"

L_.str.1:                               ## @.str.1
	.asciz	"Unable to read %zu bytes @ 0x%08x"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReadVideoCoreMemoryBySymbol    ; -- Begin function ReadVideoCoreMemoryBySymbol
	.p2align	2
_ReadVideoCoreMemoryBySymbol:           ; @ReadVideoCoreMemoryBySymbol
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	add	x2, sp, #28
	add	x3, sp, #16
	bl	_LookupVideoCoreSymbol
	cbz	w0, LBB0_5
; %bb.1:
	ldr	x3, [sp, #16]
	cmp	x3, x21
	b.ls	LBB0_3
; %bb.2:
	str	x21, [sp, #16]
	mov	x3, x21
LBB0_3:
	ldr	w2, [sp, #28]
	mov	x0, x20
	mov	x1, x19
	bl	_ReadVideoCoreMemory
	cbz	w0, LBB0_6
; %bb.4:
	mov	w0, #1
	b	LBB0_8
LBB0_5:
	str	x22, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
	ldr	x8, [sp, #16]
	ldr	w9, [sp, #28]
	stp	x8, x9, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	bl	_ERR
	mov	w0, #0
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Symbol not found: '%s'"

l_.str.1:                               ; @.str.1
	.asciz	"Unable to read %zu bytes @ 0x%08x"

.subsections_via_symbols
