	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vcos_platform_init             ## -- Begin function vcos_platform_init
	.p2align	4, 0x90
_vcos_platform_init:                    ## @vcos_platform_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	__vcos_named_semaphore_init
	movq	%rax, %rbx
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %r12
	xorl	%edi, %edi
	cmpq	(%r12), %rax
	sete	%dil
	callq	_vcos_verify
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movq	_VCOS_INIT_NAMED_SEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_current_thread_key_init@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_current_thread_key_once@GOTPCREL(%rip), %rdi
	callq	_vcos_once
	movq	%rax, %rbx
	xorl	%edi, %edi
	cmpq	(%r12), %rax
	sete	%dil
	callq	_vcos_verify
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	movq	_vcos_thread_main@GOTPCREL(%rip), %r15
	leaq	4(%r15), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_vcos_semaphore_create
	movq	%rax, %rbx
	xorl	%edi, %edi
	cmpq	(%r12), %rax
	sete	%dil
	callq	_vcos_verify
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movq	_VCOS_INIT_MAIN_SEM@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_pthread_self
	movl	%eax, (%r15)
	movq	__vcos_thread_current_key@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_pthread_setspecific
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_vcos_verify
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	xorl	%eax, %eax
	callq	_vcos_msgq_init
	movq	%rax, %rbx
	xorl	%edi, %edi
	cmpq	(%r12), %rax
	sete	%dil
	callq	_vcos_verify
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	_VCOS_INIT_MSGQ@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_vcos_logging_init
LBB0_7:
	cmpq	(%r12), %rbx
	je	LBB0_9
LBB0_8:
	movl	%r14d, %edi
	callq	_vcos_term
LBB0_9:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_VCOS_EINVAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	cmpq	(%r12), %rbx
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
	.comm	_VCOS_INIT_NAMED_SEM,4,2        ## @VCOS_INIT_NAMED_SEM
	.comm	_current_thread_key_once,4,2    ## @current_thread_key_once
	.comm	_current_thread_key_init,4,2    ## @current_thread_key_init
	.comm	_vcos_thread_main,8,2           ## @vcos_thread_main
	.comm	_VCOS_INIT_MAIN_SEM,4,2         ## @VCOS_INIT_MAIN_SEM
	.comm	__vcos_thread_current_key,4,2   ## @_vcos_thread_current_key
	.comm	_VCOS_EINVAL,8,3                ## @VCOS_EINVAL
	.comm	_VCOS_INIT_MSGQ,4,2             ## @VCOS_INIT_MSGQ
	.comm	_VCOS_INIT_PRINTF_LOCK,4,2      ## @VCOS_INIT_PRINTF_LOCK
	.comm	_printf_lock,4,2                ## @printf_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vcos_platform_init             ; -- Begin function vcos_platform_init
	.p2align	2
_vcos_platform_init:                    ; @vcos_platform_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	bl	__vcos_named_semaphore_init
	mov	x20, x0
Lloh0:
	adrp	x22, _VCOS_SUCCESS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _VCOS_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_verify
	cbz	w0, LBB0_6
; %bb.1:
Lloh2:
	adrp	x8, _VCOS_INIT_NAMED_SEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VCOS_INIT_NAMED_SEM@GOTPAGEOFF]
Lloh4:
	ldr	w19, [x8]
Lloh5:
	adrp	x8, _current_thread_key_init@GOTPAGE
Lloh6:
	ldr	x8, [x8, _current_thread_key_init@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x0, _current_thread_key_once@GOTPAGE
Lloh9:
	ldr	x0, [x0, _current_thread_key_once@GOTPAGEOFF]
	bl	_vcos_once
	mov	x20, x0
	ldr	x8, [x22]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_verify
	cbz	w0, LBB0_8
; %bb.2:
Lloh10:
	adrp	x21, _vcos_thread_main@GOTPAGE
Lloh11:
	ldr	x21, [x21, _vcos_thread_main@GOTPAGEOFF]
	add	x0, x21, #4
	mov	x1, #0
	mov	w2, #0
	bl	_vcos_semaphore_create
	mov	x20, x0
	ldr	x8, [x22]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_verify
	cbz	w0, LBB0_8
; %bb.3:
Lloh12:
	adrp	x8, _VCOS_INIT_MAIN_SEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VCOS_INIT_MAIN_SEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w19, w8, w19
	bl	_pthread_self
	str	w0, [x21]
Lloh15:
	adrp	x8, __vcos_thread_current_key@GOTPAGE
Lloh16:
	ldr	x8, [x8, __vcos_thread_current_key@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_pthread_setspecific
	cmp	w0, #0
	cset	w0, eq
	bl	_vcos_verify
	cbz	w0, LBB0_7
; %bb.4:
	bl	_vcos_msgq_init
	mov	x20, x0
	ldr	x8, [x22]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_verify
	cbz	w0, LBB0_8
; %bb.5:
Lloh18:
	adrp	x8, _VCOS_INIT_MSGQ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VCOS_INIT_MSGQ@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	orr	w19, w8, w19
	bl	_vcos_logging_init
	b	LBB0_8
LBB0_6:
	mov	w19, #0
	b	LBB0_8
LBB0_7:
Lloh21:
	adrp	x8, _VCOS_EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _VCOS_EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	x20, [x8]
LBB0_8:
	ldr	x8, [x22]
	cmp	x20, x8
	b.eq	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_vcos_term
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
	.comm	_VCOS_INIT_NAMED_SEM,4,2        ; @VCOS_INIT_NAMED_SEM
	.comm	_current_thread_key_once,4,2    ; @current_thread_key_once
	.comm	_current_thread_key_init,4,2    ; @current_thread_key_init
	.comm	_vcos_thread_main,8,2           ; @vcos_thread_main
	.comm	_VCOS_INIT_MAIN_SEM,4,2         ; @VCOS_INIT_MAIN_SEM
	.comm	__vcos_thread_current_key,4,2   ; @_vcos_thread_current_key
	.comm	_VCOS_EINVAL,8,3                ; @VCOS_EINVAL
	.comm	_VCOS_INIT_MSGQ,4,2             ; @VCOS_INIT_MSGQ
	.comm	_VCOS_INIT_PRINTF_LOCK,4,2      ; @VCOS_INIT_PRINTF_LOCK
	.comm	_printf_lock,4,2                ; @printf_lock
.subsections_via_symbols
