	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_shared_state
_alloc_shared_state:                    ## @alloc_shared_state
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	$1, %edi
	movl	$32, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_NewHashTable
	movq	%rax, 24(%rbx)
	xorl	%eax, %eax
	callq	_NewHashTable
	movq	%rax, 16(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_gl_alloc_texture_object
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$2, %edx
	callq	_gl_alloc_texture_object
	movq	%rax, (%rbx)
	cmpq	$0, 24(%rbx)
	je	LBB0_5
## %bb.2:
	cmpq	$0, 16(%rbx)
	je	LBB0_6
## %bb.3:
	movq	8(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.4:
	testq	%rax, %rax
	jne	LBB0_14
	jmp	LBB0_8
LBB0_5:
	xorl	%edi, %edi
	callq	_DeleteHashTable
	cmpq	$0, 16(%rbx)
	jne	LBB0_7
LBB0_6:
	xorl	%edi, %edi
	callq	_DeleteHashTable
LBB0_7:
	movq	8(%rbx), %rcx
LBB0_8:
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.10:
	cmpq	$0, (%rbx)
	je	LBB0_11
LBB0_12:
	movq	%rbx, %rdi
	callq	_free
LBB0_13:
	xorl	%ebx, %ebx
LBB0_14:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_9:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_gl_free_texture_object
	cmpq	$0, (%rbx)
	jne	LBB0_12
LBB0_11:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_gl_free_texture_object
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_alloc_shared_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_shared_state
_alloc_shared_state:                    ; @alloc_shared_state
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	w0, #1
	mov	w1, #32
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_11
; %bb.1:
	bl	_NewHashTable
	str	x0, [x19, #24]
	bl	_NewHashTable
	str	x0, [x19, #16]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	bl	_gl_alloc_texture_object
	str	x0, [x19, #8]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #2
	bl	_gl_alloc_texture_object
	str	x0, [x19]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_5
; %bb.2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.4:
	cbnz	x0, LBB0_11
	b	LBB0_8
LBB0_5:
	mov	x0, #0
	bl	_DeleteHashTable
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_7
LBB0_6:
	mov	x0, #0
	bl	_DeleteHashTable
LBB0_7:
	ldr	x8, [x19, #8]
LBB0_8:
	cbz	x8, LBB0_12
; %bb.9:
	ldr	x8, [x19]
	cbz	x8, LBB0_13
LBB0_10:
	mov	x0, x19
	bl	_free
	mov	x19, #0
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	x0, x19
	mov	x1, #0
	bl	_gl_free_texture_object
	ldr	x8, [x19]
	cbnz	x8, LBB0_10
LBB0_13:
	mov	x0, x19
	mov	x1, #0
	bl	_gl_free_texture_object
	b	LBB0_10
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_alloc_shared_state
.subsections_via_symbols
