	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	%rbx
	subq	$152, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	(%rsi), %rdi
	movq	_progname@GOTPCREL(%rip), %r15
	movq	%rdi, (%r15)
	movl	$47, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	incq	%rax
	movq	%rax, (%r15)
LBB0_2:
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_parse_args
	movq	_foreground@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_3
LBB0_8:
	movq	_lock_prefix_set@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.9:
	movq	_lock_prefix@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_VCFILED_LOCKFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	L_.str.1(%rip), %rcx
	leaq	-160(%rbp), %rdi
	movl	$128, %esi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_vcos_safe_sprintf
	jmp	LBB0_11
LBB0_3:
	xorl	%edi, %edi
	movl	$1, %esi
	callq	_daemon
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	jmp	LBB0_5
LBB0_10:
	movq	_VCFILED_LOCKFILE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str.2(%rip), %rcx
	leaq	-160(%rbp), %rdi
	movl	$128, %esi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_vcos_safe_sprintf
LBB0_11:
	movq	_logmsg@GOTPCREL(%rip), %rsi
	leaq	-160(%rbp), %rdi
	callq	_vcfiled_lock
	testl	%eax, %eax
	jne	LBB0_5
## %bb.12:
	movq	_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_logmsg
	xorl	%eax, %eax
	callq	_vcos_init
	leaq	-168(%rbp), %rdi
	callq	_vchiq_initialise
	movq	_VCHIQ_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.14:
	movq	_global_initialise_instance@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_vchi_initialise
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_vcos_assert
	movq	(%r14), %rax
	movq	%rax, -168(%rbp)
	xorl	%eax, %eax
	callq	_single_get_func_table
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_vchi_mphi_message_driver_func_table
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_vchi_create_connection
	movq	_global_connection@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	movq	(%r14), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_vchi_connect
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_vc_vchi_filesys_init
	movq	_INT_MAX@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_sleep
	jmp	LBB0_15
LBB0_13:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rdx
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_logmsg
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_6
## %bb.16:
	movl	$-1, %eax
	addq	$152, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_log_stderr@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	jmp	LBB0_8
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_progname,8,3                   ## @progname
	.comm	_foreground,4,2                 ## @foreground
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to daemonize: errno = %d"

	.comm	_errno,4,2                      ## @errno
	.comm	_log_stderr,8,3                 ## @log_stderr
	.comm	_lock_prefix_set,8,3            ## @lock_prefix_set
L_.str.1:                               ## @.str.1
	.asciz	"%s/%s"

	.comm	_lock_prefix,4,2                ## @lock_prefix
	.comm	_VCFILED_LOCKFILE,4,2           ## @VCFILED_LOCKFILE
L_.str.2:                               ## @.str.2
	.asciz	"%s"

	.comm	_LOG_INFO,4,2                   ## @LOG_INFO
L_.str.3:                               ## @.str.3
	.asciz	"vcfiled started"

	.comm	_VCHIQ_SUCCESS,8,3              ## @VCHIQ_SUCCESS
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
L_.str.4:                               ## @.str.4
	.asciz	"%s: failed to open vchiq instance\n"

	.comm	_global_initialise_instance,8,3 ## @global_initialise_instance
	.comm	_global_connection,4,2          ## @global_connection
	.comm	_INT_MAX,4,2                    ## @INT_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x0, [x1]
Lloh3:
	adrp	x21, _progname@GOTPAGE
Lloh4:
	ldr	x21, [x21, _progname@GOTPAGEOFF]
	str	x0, [x21]
	mov	w1, #47
	bl	_strrchr
	cbz	x0, LBB0_2
; %bb.1:
	add	x8, x0, #1
	str	x8, [x21]
LBB0_2:
	mov	x0, x20
	mov	x1, x19
	bl	_parse_args
Lloh5:
	adrp	x8, _foreground@GOTPAGE
Lloh6:
	ldr	x8, [x8, _foreground@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cbz	w8, LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _lock_prefix_set@GOTPAGE
Lloh9:
	ldr	x8, [x8, _lock_prefix_set@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.4:
Lloh11:
	adrp	x8, _lock_prefix@GOTPAGE
Lloh12:
	ldr	x8, [x8, _lock_prefix@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x8]
Lloh14:
	adrp	x8, _VCFILED_LOCKFILE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VCFILED_LOCKFILE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x3, l_.str.1@PAGE
Lloh18:
	add	x3, x3, l_.str.1@PAGEOFF
	str	x8, [sp]
	b	LBB0_8
LBB0_5:
	mov	w0, #0
	mov	w1, #1
	bl	_daemon
	cbz	x0, LBB0_15
; %bb.6:
Lloh19:
	adrp	x8, _stderr@GOTPAGE
Lloh20:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x8, _errno@GOTPAGE
Lloh23:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	b	LBB0_13
LBB0_7:
Lloh27:
	adrp	x8, _VCFILED_LOCKFILE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _VCFILED_LOCKFILE@GOTPAGEOFF]
Lloh29:
	ldr	w4, [x8]
Lloh30:
	adrp	x3, l_.str.2@PAGE
Lloh31:
	add	x3, x3, l_.str.2@PAGEOFF
LBB0_8:
	add	x0, sp, #24
	mov	w1, #128
	mov	w2, #0
	bl	_vcos_safe_sprintf
Lloh32:
	adrp	x1, _logmsg@GOTPAGE
Lloh33:
	ldr	x1, [x1, _logmsg@GOTPAGEOFF]
	add	x0, sp, #24
	bl	_vcfiled_lock
	cbnz	w0, LBB0_13
; %bb.9:
Lloh34:
	adrp	x8, _LOG_INFO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _LOG_INFO@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
Lloh37:
	adrp	x1, l_.str.3@PAGE
Lloh38:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_logmsg
	bl	_vcos_init
	add	x0, sp, #16
	bl	_vchiq_initialise
Lloh39:
	adrp	x8, _VCHIQ_SUCCESS@GOTPAGE
Lloh40:
	ldr	x8, [x8, _VCHIQ_SUCCESS@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.10:
Lloh42:
	adrp	x19, _global_initialise_instance@GOTPAGE
Lloh43:
	ldr	x19, [x19, _global_initialise_instance@GOTPAGEOFF]
	mov	x0, x19
	bl	_vchi_initialise
	cmp	w0, #0
	cset	w0, eq
	bl	_vcos_assert
	ldr	x8, [x19]
	str	x8, [sp, #16]
	bl	_single_get_func_table
	mov	x20, x0
	bl	_vchi_mphi_message_driver_func_table
	mov	x1, x0
	mov	x0, x20
	bl	_vchi_create_connection
Lloh44:
	adrp	x20, _global_connection@GOTPAGE
Lloh45:
	ldr	x20, [x20, _global_connection@GOTPAGEOFF]
	str	w0, [x20]
	ldr	x2, [x19]
	mov	x0, x20
	mov	w1, #1
	bl	_vchi_connect
	ldr	x0, [x19]
	mov	x1, x20
	mov	w2, #1
	bl	_vc_vchi_filesys_init
Lloh46:
	adrp	x19, _INT_MAX@GOTPAGE
Lloh47:
	ldr	x19, [x19, _INT_MAX@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_sleep
	b	LBB0_11
LBB0_12:
Lloh48:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh49:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh50:
	ldr	w0, [x8]
	ldr	x8, [x19]
	str	x8, [sp]
Lloh51:
	adrp	x1, l_.str.4@PAGE
Lloh52:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_logmsg
LBB0_13:
	ldur	x8, [x29, #-40]
Lloh53:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh54:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh55:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.14:
	mov	w0, #-1
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_15:
Lloh56:
	adrp	x8, _log_stderr@GOTPAGE
Lloh57:
	ldr	x8, [x8, _log_stderr@GOTPAGEOFF]
Lloh58:
	str	xzr, [x8]
	b	LBB0_3
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotStr	Lloh56, Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.comm	_progname,8,3                   ; @progname
	.comm	_foreground,4,2                 ; @foreground
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to daemonize: errno = %d"

	.comm	_errno,4,2                      ; @errno
	.comm	_log_stderr,8,3                 ; @log_stderr
	.comm	_lock_prefix_set,8,3            ; @lock_prefix_set
l_.str.1:                               ; @.str.1
	.asciz	"%s/%s"

	.comm	_lock_prefix,4,2                ; @lock_prefix
	.comm	_VCFILED_LOCKFILE,4,2           ; @VCFILED_LOCKFILE
l_.str.2:                               ; @.str.2
	.asciz	"%s"

	.comm	_LOG_INFO,4,2                   ; @LOG_INFO
l_.str.3:                               ; @.str.3
	.asciz	"vcfiled started"

	.comm	_VCHIQ_SUCCESS,8,3              ; @VCHIQ_SUCCESS
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
l_.str.4:                               ; @.str.4
	.asciz	"%s: failed to open vchiq instance\n"

	.comm	_global_initialise_instance,8,3 ; @global_initialise_instance
	.comm	_global_connection,4,2          ; @global_connection
	.comm	_INT_MAX,4,2                    ; @INT_MAX
.subsections_via_symbols
