	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_host_log
_do_host_log:                           ## @do_host_log
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	leaq	-4(%rbp), %rdi
	callq	_OpenVideoCoreMemory
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	-4(%rbp), %edi
	leaq	L_.str.1(%rip), %rsi
	leaq	-8(%rbp), %rdx
	callq	_ReadVideoCoreUInt32BySymbol
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	-4(%rbp), %edi
	movl	-8(%rbp), %edx
	leaq	-16(%rbp), %rsi
	movl	$8, %ecx
	callq	_ReadVideoCoreMemory
	testl	%eax, %eax
	je	LBB0_5
## %bb.9:
	leaq	L_.str.4(%rip), %rdi
	callq	_printf
	movl	-4(%rbp), %edi
	callq	_CloseVideoCoreMemory
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_7
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_6
LBB0_5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-8(%rbp), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_6:
	movl	-4(%rbp), %edi
	callq	_CloseVideoCoreMemory
LBB0_7:
	movl	$-1, %eax
LBB0_8:
	addq	$16, %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_host_log"

L_.str.2:                               ## @.str.2
	.asciz	"Could not read mmal_host_log address\n"

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

L_.str.4:                               ## @.str.4
	.asciz	"%s"

	.no_dead_strip	_do_host_log
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_host_log
_do_host_log:                           ; @do_host_log
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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_4
; %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
	bl	_ReadVideoCoreUInt32BySymbol
	cbz	w0, LBB0_5
; %bb.2:
	ldp	w2, w0, [x29, #-8]
	add	x1, sp, #16
	mov	w3, #8
	bl	_ReadVideoCoreMemory
	cbz	w0, LBB0_6
; %bb.3:
Lloh2:
	adrp	x0, l_.str.4@PAGE
Lloh3:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_printf
	ldur	w0, [x29, #-4]
	bl	_CloseVideoCoreMemory
	mov	w0, #0
	b	LBB0_9
LBB0_4:
Lloh4:
	adrp	x8, _stderr@GOTPAGE
Lloh5:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	x0, [sp]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_fprintf
	b	LBB0_8
LBB0_5:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh14:
	adrp	x8, _stderr@GOTPAGE
Lloh15:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldur	w8, [x29, #-8]
	str	x8, [sp]
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_7:
	bl	_fprintf
	ldur	w0, [x29, #-4]
	bl	_CloseVideoCoreMemory
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.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_host_log"

l_.str.2:                               ; @.str.2
	.asciz	"Could not read mmal_host_log address\n"

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

l_.str.4:                               ; @.str.4
	.asciz	"%s"

	.no_dead_strip	_do_host_log
.subsections_via_symbols
