	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lockmgr
_lockmgr:                               ## @lockmgr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
                                        ## kill: def $esi killed $esi def $rsi
	movb	$1, %bl
	addl	$-128, %esi
	cmpl	$3, %esi
	ja	LBB0_8
## %bb.1:
	movq	%rdi, %r14
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rsi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_6:
	movq	(%r14), %rdi
	callq	_SDL_UnlockMutex
	jmp	LBB0_5
LBB0_4:
	movq	(%r14), %rdi
	callq	_SDL_LockMutex
LBB0_5:
	testl	%eax, %eax
	setne	%bl
	jmp	LBB0_8
LBB0_7:
	movq	(%r14), %rdi
	callq	_SDL_DestroyMutex
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_SDL_CreateMutex
	movq	%rax, (%r14)
	testq	%rax, %rax
	jne	LBB0_8
## %bb.3:
	movq	_AV_LOG_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_SDL_GetError
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_av_log
	movb	$1, %bl
LBB0_8:
	movzbl	%bl, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_4
	.long	L0_0_set_7
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_AV_LOG_FATAL,4,2               ## @AV_LOG_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SDL_CreateMutex(): %s\n"

	.no_dead_strip	_lockmgr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lockmgr
_lockmgr:                               ; @lockmgr
	.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
	sub	w8, w1, #128
	cmp	w8, #3
	b.hi	LBB0_9
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	x0, [x19]
	bl	_SDL_UnlockMutex
	b	LBB0_4
LBB0_3:
	ldr	x0, [x19]
	bl	_SDL_LockMutex
LBB0_4:
	cmp	w0, #0
	cset	w0, ne
	b	LBB0_10
LBB0_5:
	ldr	x0, [x19]
	bl	_SDL_DestroyMutex
	b	LBB0_7
LBB0_6:
	bl	_SDL_CreateMutex
	str	x0, [x19]
	cbz	x0, LBB0_8
LBB0_7:
	mov	w0, #0
	b	LBB0_10
LBB0_8:
Lloh2:
	adrp	x8, _AV_LOG_FATAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_FATAL@GOTPAGEOFF]
Lloh4:
	ldr	w19, [x8]
	bl	_SDL_GetError
	mov	x3, x0
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	mov	x1, x19
	bl	_av_log
LBB0_9:
	mov	w0, #1
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.comm	_AV_LOG_FATAL,4,2               ; @AV_LOG_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SDL_CreateMutex(): %s\n"

	.no_dead_strip	_lockmgr
.subsections_via_symbols
