	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdl2_init_font
_sdl2_init_font:                        ## @sdl2_init_font
	.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
	movl	$4104, %eax                     ## imm = 0x1008
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%eax, %eax
	callq	_config_get_ptr
	cmpl	$0, 12(%rax)
	je	LBB0_10
## %bb.1:
	movq	%rax, %r12
	leaq	40(%r13), %rdi
	xorl	%ebx, %ebx
	cmpb	$0, (%r15)
	leaq	32(%r13), %rsi
	movl	$0, %edx
	cmovneq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_font_renderer_create_default
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movl	(%r12), %ecx
	movl	4(%r12), %edx
	movl	%ecx, %eax
	shll	$8, %eax
	subl	%ecx, %eax
	movl	%edx, %ecx
	shll	$8, %ecx
	subl	%edx, %ecx
	movl	8(%r12), %edx
	movl	%edx, %esi
	shll	$8, %esi
	subl	%edx, %esi
	cmpl	$255, %eax
	movl	$255, %edx
	cmovgel	%edx, %eax
	testl	%eax, %eax
	cmovlel	%ebx, %eax
	cmpl	$255, %ecx
	cmovgel	%edx, %ecx
	testl	%ecx, %ecx
	cmovlel	%ebx, %ecx
	cmpl	$255, %esi
	cmovgel	%edx, %esi
	testl	%esi, %esi
	cmovlel	%ebx, %esi
	movl	%eax, (%r13)
	movl	%ecx, 4(%r13)
	movl	%esi, 8(%r13)
	movq	40(%r13), %rax
	movl	32(%r13), %edi
	callq	*(%rax)
	movq	%rax, %r15
	movl	8(%rax), %edi
	movl	(%rax), %edx
	movl	4(%rax), %esi
	subq	$8, %rsp
	movl	$8, %ecx
	movl	%esi, %r8d
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	pushq	$0
	callq	_SDL_CreateRGBSurfaceFrom
	addq	$32, %rsp
	movq	%rax, %r14
	leaq	-4116(%rbp), %rax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, -20(%rax)
	movl	%ebx, -24(%rax)
	movl	%ebx, -28(%rax)
	movl	$255, -16(%rax)
	movl	%ebx, %ecx
	orl	$1, %ecx
	movl	%ecx, -4(%rax)
	movl	%ecx, -8(%rax)
	movl	%ecx, -12(%rax)
	movl	$255, (%rax)
	addq	$2, %rbx
	addq	$32, %rax
	cmpq	$256, %rbx                      ## imm = 0x100
	jne	LBB0_5
## %bb.6:
	movl	$256, %edi                      ## imm = 0x100
	callq	_SDL_AllocPalette
	movq	%rax, %r12
	leaq	-4144(%rbp), %rsi
	movq	%rax, %rdi
	xorl	%edx, %edx
	movl	$256, %ecx                      ## imm = 0x100
	callq	_SDL_SetPaletteColors
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_SDL_SetSurfacePalette
	movq	_SDL_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_SDL_SetColorKey
	movl	28(%r13), %edi
	movq	%r14, %rsi
	callq	_SDL_CreateTextureFromSurface
	movl	%eax, 16(%r13)
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	4(%r15), %ecx
	movl	%ecx, 24(%r13)
	movl	(%r15), %ecx
	movl	%ecx, 20(%r13)
	movl	$1, 12(%r13)
	movq	_SDL_BLENDMODE_ADD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_SDL_SetTextureBlendMode
	jmp	LBB0_9
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.3:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	addq	$4104, %rsp                     ## imm = 0x1008
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RARCH_WARN                     ## TAILCALL
LBB0_8:
	xorl	%eax, %eax
	callq	_SDL_GetError
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_RARCH_WARN
LBB0_9:
	movq	%r12, %rdi
	callq	_SDL_FreePalette
	movq	%r14, %rdi
	callq	_SDL_FreeSurface
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	addq	$4104, %rsp                     ## imm = 0x1008
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[SDL]: Could not initialize fonts.\n"

	.comm	_SDL_TRUE,4,2                   ## @SDL_TRUE
	.comm	_SDL_BLENDMODE_ADD,4,2          ## @SDL_BLENDMODE_ADD
L_.str.1:                               ## @.str.1
	.asciz	"[SDL]: Failed to initialize font texture: %s\n"

	.no_dead_strip	_sdl2_init_font
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function sdl2_init_font
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_sdl2_init_font:                        ; @sdl2_init_font
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -56
	.cfi_offset w28, -64
	mov	w9, #4112
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #16
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_config_get_ptr
	ldr	w8, [x0, #12]
	cbz	w8, LBB0_10
; %bb.1:
	mov	x20, x0
	add	x0, x19, #40
	add	x1, x19, #32
	ldrb	w8, [x22]
	cmp	w8, #0
	csel	x2, xzr, x22, eq
	mov	x3, x21
	bl	_font_renderer_create_default
	cbz	w0, LBB0_6
; %bb.2:
	ldr	w8, [x20, #8]
	lsl	w9, w8, #8
	sub	w8, w9, w8
	mov	w9, #255
	cmp	w8, #255
	csel	w8, w8, w9, lt
	cmp	w8, #0
	csel	w8, w8, wzr, gt
	ldr	d0, [x20]
	movi	d1, #0x0000ff000000ff
	mul.2s	v0, v0, v1
	smin.2s	v0, v0, v1
	movi.2d	v1, #0000000000000000
	smax.2s	v0, v0, v1
	str	d0, [x19]
	str	w8, [x19, #8]
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	ldr	w0, [x19, #32]
	blr	x8
	mov	x21, x0
	ldr	w0, [x0, #8]
	ldp	w2, w1, [x21]
	str	wzr, [sp]
	mov	w3, #8
	mov	x4, x1
	mov	w5, #0
	mov	w6, #0
	mov	w7, #0
	bl	_SDL_CreateRGBSurfaceFrom
	mov	x20, x0
	mov	x8, #0
Lloh5:
	adrp	x9, lCPI0_0@PAGE
Lloh6:
	ldr	q0, [x9, lCPI0_0@PAGEOFF]
	movi.4s	v4, #4
	movi.2d	v19, #0x0000ff000000ff
	movi.4s	v5, #8
	movi.4s	v6, #12
	add	x9, sp, #8
	movi.4s	v7, #16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add.4s	v16, v0, v4
	mov.16b	v17, v16
	mov.16b	v18, v16
	mov.16b	v1, v0
	mov.16b	v2, v0
	mov.16b	v3, v19
	add.4s	v20, v0, v5
	add.4s	v24, v0, v6
	add	x10, x9, x8
	add	x11, x10, #128
	add	x12, x10, #192
	st4.4s	{ v0, v1, v2, v3 }, [x10], #64
	mov.16b	v21, v20
	mov.16b	v22, v20
	mov.16b	v23, v19
	mov.16b	v25, v24
	mov.16b	v26, v24
	mov.16b	v27, v19
	st4.4s	{ v16, v17, v18, v19 }, [x10]
	st4.4s	{ v20, v21, v22, v23 }, [x11]
	st4.4s	{ v24, v25, v26, v27 }, [x12]
	add	x8, x8, #256
	add.4s	v0, v0, v7
	cmp	x8, #1, lsl #12                 ; =4096
	b.ne	LBB0_3
; %bb.4:
	mov	w0, #256
	bl	_SDL_AllocPalette
	mov	x22, x0
	add	x1, sp, #8
	mov	w2, #0
	mov	w3, #256
	bl	_SDL_SetPaletteColors
	mov	x0, x20
	mov	x1, x22
	bl	_SDL_SetSurfacePalette
Lloh7:
	adrp	x8, _SDL_TRUE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SDL_TRUE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_SDL_SetColorKey
	ldr	w0, [x19, #28]
	mov	x1, x20
	bl	_SDL_CreateTextureFromSurface
	str	w0, [x19, #16]
	cbz	w0, LBB0_8
; %bb.5:
	ldr	d0, [x21]
	stur	d0, [x19, #20]
	mov	w8, #1
	str	w8, [x19, #12]
Lloh10:
	adrp	x8, _SDL_BLENDMODE_ADD@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SDL_BLENDMODE_ADD@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_SDL_SetTextureBlendMode
	b	LBB0_9
LBB0_6:
	ldur	x8, [x29, #-56]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.7:
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #16
	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	x28, x27, [sp], #64             ; 16-byte Folded Reload
	b	_RARCH_WARN
LBB0_8:
	bl	_SDL_GetError
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_RARCH_WARN
LBB0_9:
	mov	x0, x22
	bl	_SDL_FreePalette
	mov	x0, x20
	bl	_SDL_FreeSurface
LBB0_10:
	ldur	x8, [x29, #-56]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #16
	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	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[SDL]: Could not initialize fonts.\n"

	.comm	_SDL_TRUE,4,2                   ; @SDL_TRUE
	.comm	_SDL_BLENDMODE_ADD,4,2          ; @SDL_BLENDMODE_ADD
l_.str.1:                               ; @.str.1
	.asciz	"[SDL]: Failed to initialize font texture: %s\n"

	.no_dead_strip	_sdl2_init_font
.subsections_via_symbols
