	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SDL_JNI_SetupThreadEnv         ## -- Begin function SDL_JNI_SetupThreadEnv
	.p2align	4, 0x90
_SDL_JNI_SetupThreadEnv:                ## @SDL_JNI_SetupThreadEnv
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_g_jvm@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	_make_thread_key@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_g_key_once@GOTPCREL(%rip), %rdi
	callq	_pthread_once
	movq	_g_thread_key@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_pthread_getspecific
	movq	%rax, -32(%rbp)
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	movq	(%rbx), %rax
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	*(%rax)
	movq	%rax, %rcx
	movq	_JNI_OK@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.4:
	movl	(%r15), %edi
	movq	-32(%rbp), %rsi
	callq	_pthread_setspecific
	movq	-32(%rbp), %rax
LBB0_5:
	movq	%rax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_ALOGE
	movl	$-1, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_jvm,8,3                      ## @g_jvm
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SDL_JNI_GetJvm: AttachCurrentThread: NULL jvm"

	.comm	_g_key_once,4,2                 ## @g_key_once
	.comm	_make_thread_key,4,2            ## @make_thread_key
	.comm	_g_thread_key,4,2               ## @g_thread_key
	.comm	_JNI_OK,8,3                     ## @JNI_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SDL_JNI_SetupThreadEnv         ; -- Begin function SDL_JNI_SetupThreadEnv
	.p2align	2
_SDL_JNI_SetupThreadEnv:                ; @SDL_JNI_SetupThreadEnv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x8, _g_jvm@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_jvm@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
	cbz	x20, LBB0_5
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _make_thread_key@GOTPAGE
Lloh4:
	ldr	x8, [x8, _make_thread_key@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x0, _g_key_once@GOTPAGE
Lloh7:
	ldr	x0, [x0, _g_key_once@GOTPAGEOFF]
	bl	_pthread_once
Lloh8:
	adrp	x21, _g_thread_key@GOTPAGE
Lloh9:
	ldr	x21, [x21, _g_thread_key@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_pthread_getspecific
	mov	x8, x0
	str	x0, [sp, #8]
	cbnz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x20]
	ldr	x8, [x8]
	add	x1, sp, #8
	mov	x0, x20
	mov	x2, #0
	blr	x8
Lloh10:
	adrp	x8, _JNI_OK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _JNI_OK@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.3:
	ldr	w0, [x21]
	ldr	x1, [sp, #8]
	bl	_pthread_setspecific
	ldr	x8, [sp, #8]
LBB0_4:
	mov	w0, #0
	str	x8, [x19]
	b	LBB0_7
LBB0_5:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ALOGE
LBB0_6:
	mov	w0, #-1
LBB0_7:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_g_jvm,8,3                      ; @g_jvm
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SDL_JNI_GetJvm: AttachCurrentThread: NULL jvm"

	.comm	_g_key_once,4,2                 ; @g_key_once
	.comm	_make_thread_key,4,2            ; @make_thread_key
	.comm	_g_thread_key,4,2               ; @g_thread_key
	.comm	_JNI_OK,8,3                     ; @JNI_OK
.subsections_via_symbols
