	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_eventlog
_do_eventlog:                           ## @do_eventlog
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$48, %rsp
	leaq	-4(%rbp), %rdi
	callq	_OpenVideoCoreMemory
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movl	-4(%rbp), %edi
	leaq	L_.str.1(%rip), %rsi
	leaq	-12(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	callq	_LookupVideoCoreSymbol
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	movl	-4(%rbp), %edi
	movl	-12(%rbp), %edx
	leaq	-8(%rbp), %rsi
	callq	_ReadVideoCoreUInt32
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	movl	-4(%rbp), %edi
	movl	-8(%rbp), %edx
	leaq	-40(%rbp), %rsi
	movl	$24, %ecx
	callq	_ReadVideoCoreMemory
	testl	%eax, %eax
	je	LBB0_11
## %bb.4:
	movl	-40(%rbp), %eax
	movq	_MMAL_MAGIC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.5:
	movl	-36(%rbp), %edx
	cmpl	$24, %edx
	jne	LBB0_14
## %bb.6:
	movl	-32(%rbp), %edx
	cmpl	$4, %edx
	jne	LBB0_15
## %bb.7:
	movl	-8(%rbp), %esi
	movl	-28(%rbp), %edx
	leaq	L_.str.8(%rip), %rdi
	movl	%eax, %ecx
	callq	_printf
	movl	-32(%rbp), %ecx
	movl	-24(%rbp), %esi
	movl	-20(%rbp), %edx
	leaq	L_.str.9(%rip), %rdi
	callq	_printf
	movl	-4(%rbp), %edi
	leaq	-40(%rbp), %rsi
	callq	_print_mmal_event_log
	movl	-4(%rbp), %edi
	callq	_CloseVideoCoreMemory
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_18
LBB0_9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_17
LBB0_10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-12(%rbp), %edx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_12
LBB0_11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-8(%rbp), %edx
	leaq	L_.str.4(%rip), %rsi
LBB0_12:
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_17
LBB0_13:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	-8(%rbp), %ecx
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_17
LBB0_14:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	movl	$24, %ecx
	jmp	LBB0_16
LBB0_15:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	movl	$4, %ecx
LBB0_16:
	xorl	%eax, %eax
	callq	_fprintf
LBB0_17:
	movl	-4(%rbp), %edi
	callq	_CloseVideoCoreMemory
LBB0_18:
	movl	$-1, %eax
LBB0_19:
	addq	$48, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to open videocore memory: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"mmal_dbg_log"

L_.str.2:                               ## @.str.2
	.asciz	"Could not get MMAL log address\n"

L_.str.3:                               ## @.str.3
	.asciz	"Could not read MMAL log pointer at address 0x%x\n"

L_.str.4:                               ## @.str.4
	.asciz	"Could not read MMAL log at address 0x%x\n"

	.comm	_MMAL_MAGIC,4,2                 ## @MMAL_MAGIC
L_.str.5:                               ## @.str.5
	.asciz	"Bad magic 0x%08x in log at 0x%x\n"

L_.str.6:                               ## @.str.6
	.asciz	"MMAL Log size mismatch (got %d, expected %d)\n"

L_.str.7:                               ## @.str.7
	.asciz	"MMAL log element size mismatch (got %d, expected %d)\n"

L_.str.8:                               ## @.str.8
	.asciz	"reading MMAL log at 0x%x version %d magic %x\n"

L_.str.9:                               ## @.str.9
	.asciz	"%d events, %d entries each size %d\n"

	.no_dead_strip	_do_eventlog
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_eventlog
_do_eventlog:                           ; @do_eventlog
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	sub	x0, x29, #4
	bl	_OpenVideoCoreMemory
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_8
; %bb.1:
	ldur	w0, [x29, #-4]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	sub	x2, x29, #8
	sub	x3, x29, #16
	bl	_LookupVideoCoreSymbol
	cbz	w0, LBB0_9
; %bb.2:
	ldp	w2, w0, [x29, #-8]
	sub	x1, x29, #20
	bl	_ReadVideoCoreUInt32
	cbz	w0, LBB0_10
; %bb.3:
	ldur	w0, [x29, #-4]
	ldur	w2, [x29, #-20]
	add	x1, sp, #16
	mov	w3, #24
	bl	_ReadVideoCoreMemory
	cbz	w0, LBB0_11
; %bb.4:
	ldr	w3, [sp, #16]
Lloh2:
	adrp	x8, _MMAL_MAGIC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MMAL_MAGIC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w3, w8
	b.ne	LBB0_12
; %bb.5:
	ldr	w8, [sp, #20]
	cmp	w8, #24
	b.ne	LBB0_13
; %bb.6:
	ldr	w8, [sp, #24]
	cmp	w8, #4
	b.ne	LBB0_14
; %bb.7:
	ldur	w1, [x29, #-20]
	ldr	w2, [sp, #28]
Lloh5:
	adrp	x0, l_.str.8@PAGE
Lloh6:
	add	x0, x0, l_.str.8@PAGEOFF
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_printf
	ldp	w1, w2, [sp, #32]
	ldr	w3, [sp, #24]
Lloh7:
	adrp	x0, l_.str.9@PAGE
Lloh8:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_printf
	ldur	w0, [x29, #-4]
	add	x1, sp, #16
	bl	_print_mmal_event_log
	ldur	w0, [x29, #-4]
	bl	_CloseVideoCoreMemory
	mov	w0, #0
	b	LBB0_17
LBB0_8:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	x0, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_fprintf
	b	LBB0_16
LBB0_9:
Lloh14:
	adrp	x8, _stderr@GOTPAGE
Lloh15:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_10:
Lloh19:
	adrp	x8, _stderr@GOTPAGE
Lloh20:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	ldur	w8, [x29, #-8]
	str	x8, [sp]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_11:
Lloh24:
	adrp	x8, _stderr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	ldur	w8, [x29, #-20]
	str	x8, [sp]
Lloh27:
	adrp	x1, l_.str.4@PAGE
Lloh28:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_15
LBB0_12:
Lloh29:
	adrp	x8, _stderr@GOTPAGE
Lloh30:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	ldur	w8, [x29, #-20]
	stp	x3, x8, [sp]
Lloh32:
	adrp	x1, l_.str.5@PAGE
Lloh33:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_15
LBB0_13:
Lloh34:
	adrp	x9, _stderr@GOTPAGE
Lloh35:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x9]
	mov	w9, #24
	stp	x8, x9, [sp]
Lloh37:
	adrp	x1, l_.str.6@PAGE
Lloh38:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh39:
	adrp	x9, _stderr@GOTPAGE
Lloh40:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x9]
	mov	w9, #4
	stp	x8, x9, [sp]
Lloh42:
	adrp	x1, l_.str.7@PAGE
Lloh43:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_15:
	bl	_fprintf
	ldur	w0, [x29, #-4]
	bl	_CloseVideoCoreMemory
LBB0_16:
	mov	w0, #-1
LBB0_17:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to open videocore memory: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"mmal_dbg_log"

l_.str.2:                               ; @.str.2
	.asciz	"Could not get MMAL log address\n"

l_.str.3:                               ; @.str.3
	.asciz	"Could not read MMAL log pointer at address 0x%x\n"

l_.str.4:                               ; @.str.4
	.asciz	"Could not read MMAL log at address 0x%x\n"

	.comm	_MMAL_MAGIC,4,2                 ; @MMAL_MAGIC
l_.str.5:                               ; @.str.5
	.asciz	"Bad magic 0x%08x in log at 0x%x\n"

l_.str.6:                               ; @.str.6
	.asciz	"MMAL Log size mismatch (got %d, expected %d)\n"

l_.str.7:                               ; @.str.7
	.asciz	"MMAL log element size mismatch (got %d, expected %d)\n"

l_.str.8:                               ; @.str.8
	.asciz	"reading MMAL log at 0x%x version %d magic %x\n"

l_.str.9:                               ; @.str.9
	.asciz	"%d events, %d entries each size %d\n"

	.no_dead_strip	_do_eventlog
.subsections_via_symbols
