	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_vchi_filesys_init           ## -- Begin function vc_vchi_filesys_init
	.p2align	4, 0x90
_vc_vchi_filesys_init:                  ## @vc_vchi_filesys_init
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r12
	movl	%edi, %r15d
	movq	_vc_filesys_client@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	%ebx, (%r14)
	xorl	%edi, %edi
	cmpl	$2, %ebx
	setl	%dil
	callq	_vcos_verify
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	128(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%rsi, %r15
	callq	_vcos_mutex_create
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	movq	%rcx, %rbx
	sete	%dil
	callq	_vcos_assert
	leaq	56(%r14), %r13
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_vcos_event_create
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_vcos_assert
	leaq	124(%r14), %rdi
	movq	%r15, %rsi
	callq	_vcos_event_create
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_vcos_assert
	movq	_FILESERV_MAX_BULK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	$16, %esi
	callq	_vcos_malloc_aligned
	movl	%eax, 120(%r14)
	movq	$0, 112(%r14)
	leaq	-184(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$136, %edx
	callq	_memset
	movq	_FILESERV_4CC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movq	(%r12), %rax
	movq	%rax, -88(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -104(%rbp)
	movq	_filesys_callback@GOTPCREL(%rip), %rax
	movq	%rax, -112(%rbp)
	movq	%r13, -120(%rbp)
	movups	%xmm0, -152(%rbp)
	movq	$0, -136(%rbp)
	movq	_VC_FILESERV_VER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -160(%rbp)
	movq	%rax, -168(%rbp)
	leaq	8(%r14), %rdx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	callq	_vchi_service_open
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_vcos_assert
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_vcos_thread_attr_init
	movq	%rbx, %rdi
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_vcos_thread_attr_setstacksize
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_vcos_thread_attr_settimeslice
	movl	$1, 4(%r14)
	movq	_filesys_task_func@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	12(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%r8d, %r8d
	callq	_vcos_thread_create
	xorl	%edi, %edi
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_vcos_assert
	movl	8(%r14), %edi
	callq	_vchi_service_release
	jmp	LBB0_3
LBB0_1:
	movl	$-1, %r15d
LBB0_3:
	movl	%r15d, %eax
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vc_filesys_client,136,3        ## @vc_filesys_client
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HFilesys"

	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
	.comm	_FILESERV_MAX_BULK,4,2          ## @FILESERV_MAX_BULK
L_.str.1:                               ## @.str.1
	.asciz	"HFilesys bulk_recv"

	.comm	_FILESERV_4CC,4,2               ## @FILESERV_4CC
	.comm	_filesys_callback,4,2           ## @filesys_callback
	.comm	_VC_FILESERV_VER,8,3            ## @VC_FILESERV_VER
	.comm	_filesys_task_func,4,2          ## @filesys_task_func
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_vchi_filesys_init           ; -- Begin function vc_vchi_filesys_init
	.p2align	2
_vc_vchi_filesys_init:                  ; @vc_vchi_filesys_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x19, _vc_filesys_client@GOTPAGE
Lloh1:
	ldr	x19, [x19, _vc_filesys_client@GOTPAGEOFF]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	w20, [x19]
	cmp	w20, #2
	cset	w0, lt
	bl	_vcos_verify
	cbz	w0, LBB0_2
; %bb.1:
	add	x0, x19, #128
Lloh2:
	adrp	x20, l_.str@PAGE
Lloh3:
	add	x20, x20, l_.str@PAGEOFF
	mov	x1, x20
	bl	_vcos_mutex_create
Lloh4:
	adrp	x24, _VCOS_SUCCESS@GOTPAGE
Lloh5:
	ldr	x24, [x24, _VCOS_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_assert
	add	x23, x19, #56
	mov	x0, x23
	mov	x1, x20
	bl	_vcos_event_create
	ldr	x8, [x24]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_assert
	add	x0, x19, #124
	mov	x1, x20
	bl	_vcos_event_create
	ldr	x8, [x24]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_assert
Lloh6:
	adrp	x8, _FILESERV_MAX_BULK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FILESERV_MAX_BULK@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x2, l_.str.1@PAGE
Lloh10:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #16
	bl	_vcos_malloc_aligned
	str	w0, [x19, #120]
	str	xzr, [x19, #112]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #136
	bl	_memset
Lloh11:
	adrp	x8, _FILESERV_4CC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FILESERV_4CC@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [sp, #112]
	ldr	x8, [x22]
Lloh14:
	adrp	x9, _filesys_callback@GOTPAGE
Lloh15:
	ldr	x9, [x9, _filesys_callback@GOTPAGEOFF]
	stp	xzr, x8, [sp, #96]
	stp	x9, xzr, [sp, #80]
	str	x23, [sp, #72]
	stp	xzr, xzr, [sp, #48]
	str	xzr, [sp, #40]
Lloh16:
	adrp	x8, _VC_FILESERV_VER@GOTPAGE
Lloh17:
	ldr	x8, [x8, _VC_FILESERV_VER@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	stp	x8, x8, [sp, #24]
	add	x2, x19, #8
	add	x1, sp, #8
	mov	x0, x21
	bl	_vchi_service_open
	mov	x21, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_vcos_assert
	add	x0, sp, #4
	bl	_vcos_thread_attr_init
	add	x0, sp, #4
	mov	w1, #4000
	bl	_vcos_thread_attr_setstacksize
	mov	w22, #1
	add	x0, sp, #4
	mov	w1, #1
	bl	_vcos_thread_attr_settimeslice
	str	w22, [x19, #4]
Lloh19:
	adrp	x8, _filesys_task_func@GOTPAGE
Lloh20:
	ldr	x8, [x8, _filesys_task_func@GOTPAGEOFF]
Lloh21:
	ldr	w3, [x8]
	add	x0, x19, #12
	add	x2, sp, #4
	mov	x1, x20
	mov	x4, #0
	bl	_vcos_thread_create
	ldr	x8, [x24]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_assert
	ldr	w0, [x19, #8]
	bl	_vchi_service_release
	b	LBB0_3
LBB0_2:
	mov	w21, #-1
LBB0_3:
	mov	x0, x21
	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
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_vc_filesys_client,136,3        ; @vc_filesys_client
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HFilesys"

	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
	.comm	_FILESERV_MAX_BULK,4,2          ; @FILESERV_MAX_BULK
l_.str.1:                               ; @.str.1
	.asciz	"HFilesys bulk_recv"

	.comm	_FILESERV_4CC,4,2               ; @FILESERV_4CC
	.comm	_filesys_callback,4,2           ; @filesys_callback
	.comm	_VC_FILESERV_VER,8,3            ; @VC_FILESERV_VER
	.comm	_filesys_task_func,4,2          ; @filesys_task_func
.subsections_via_symbols
