	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidtex_create
_vidtex_create:                         ## @vidtex_create
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	movl	$24, %esi
	callq	_vcos_calloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	4(%rax), %r14
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_vcos_semaphore_create
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_3
## %bb.4:
	leaq	8(%rbx), %r13
	leaq	L_.str.4(%rip), %rsi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_vcos_semaphore_create
	cmpq	(%r12), %rax
	jne	LBB0_5
## %bb.6:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r13
	addq	$12, %r13
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_vcos_mutex_create
	cmpq	(%r12), %rax
	jne	LBB0_7
## %bb.8:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_vidtex_gl_init
	testq	%rax, %rax
	je	LBB0_15
## %bb.9:
	leaq	L_.str.5(%rip), %rdi
	callq	_vcos_log_trace
	movq	%r13, %rdi
	callq	_vcos_mutex_delete
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_vcos_log_trace
	jmp	LBB0_13
LBB0_3:
	leaq	L_.str.3(%rip), %rdi
	callq	_vcos_log_trace
	jmp	LBB0_12
LBB0_5:
	leaq	L_.str.3(%rip), %rdi
	callq	_vcos_log_trace
	jmp	LBB0_11
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
	callq	_vcos_log_trace
LBB0_10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_vcos_semaphore_delete
LBB0_11:
	movq	%r14, %rdi
	callq	_vcos_semaphore_delete
LBB0_12:
	movq	%rbx, %rdi
	callq	_vcos_free
LBB0_13:
	xorl	%ebx, %ebx
LBB0_14:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	$0, (%rbx)
	movq	$0, 16(%rbx)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vidtex"

L_.str.1:                               ## @.str.1
	.asciz	"Memory allocation failure"

L_.str.2:                               ## @.str.2
	.asciz	"vidtex-dec"

	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
L_.str.3:                               ## @.str.3
	.asciz	"Error creating semaphore"

L_.str.4:                               ## @.str.4
	.asciz	"vidtex-drw"

L_.str.5:                               ## @.str.5
	.asciz	"Error initialising EGL"

	.no_dead_strip	_vidtex_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidtex_create
_vidtex_create:                         ; @vidtex_create
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #1
	mov	w1, #24
	bl	_vcos_calloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
	add	x20, x19, #4
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	w2, #0
	bl	_vcos_semaphore_create
Lloh4:
	adrp	x24, _VCOS_SUCCESS@GOTPAGE
Lloh5:
	ldr	x24, [x24, _VCOS_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.2:
	add	x22, x19, #8
Lloh6:
	adrp	x1, l_.str.4@PAGE
Lloh7:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x22
	mov	w2, #0
	bl	_vcos_semaphore_create
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.3:
	add	x23, x19, #12
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_vcos_mutex_create
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.4:
	mov	x0, x19
	mov	x1, x21
	bl	_vidtex_gl_init
	cbz	x0, LBB0_14
; %bb.5:
Lloh10:
	adrp	x0, l_.str.5@PAGE
Lloh11:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_vcos_log_trace
	mov	x0, x23
	bl	_vcos_mutex_delete
	b	LBB0_10
LBB0_6:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_vcos_log_trace
	b	LBB0_13
LBB0_7:
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_vcos_log_trace
	b	LBB0_12
LBB0_8:
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_vcos_log_trace
	b	LBB0_11
LBB0_9:
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_vcos_log_trace
LBB0_10:
	mov	x0, x22
	bl	_vcos_semaphore_delete
LBB0_11:
	mov	x0, x20
	bl	_vcos_semaphore_delete
LBB0_12:
	mov	x0, x19
	bl	_vcos_free
	mov	x19, #0
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	str	wzr, [x19]
	str	xzr, [x19, #16]
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vidtex"

l_.str.1:                               ; @.str.1
	.asciz	"Memory allocation failure"

l_.str.2:                               ; @.str.2
	.asciz	"vidtex-dec"

	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
l_.str.3:                               ; @.str.3
	.asciz	"Error creating semaphore"

l_.str.4:                               ; @.str.4
	.asciz	"vidtex-drw"

l_.str.5:                               ; @.str.5
	.asciz	"Error initialising EGL"

	.no_dead_strip	_vidtex_create
.subsections_via_symbols
