	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function font_renderer_stb_create_atlas
LCPI0_0:
	.quad	0x3ff3333333333333              ## double 1.2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_font_renderer_stb_create_atlas:        ## @font_renderer_stb_create_atlas
	.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	$12328, %eax                    ## imm = 0x3028
	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	%ecx, %ebx
	movl	%edx, %r12d
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -12360(%rbp)
	cmpl	$2048, %edx                     ## imm = 0x800
	ja	LBB0_2
## %bb.1:
	cmpl	$2049, %ebx                     ## imm = 0x801
	jae	LBB0_2
## %bb.6:
	movq	%rsi, %r15
	movss	%xmm0, -12340(%rbp)             ## 4-byte Spill
	movq	16(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_free
LBB0_8:
	movl	%ebx, %edi
	movl	%r12d, %esi
	callq	_calloc
	movq	%rax, 16(%r13)
	movl	%r12d, (%r13)
	movl	%ebx, 4(%r13)
	testq	%rax, %rax
	je	LBB0_3
## %bb.9:
	movq	$0, (%rsp)
	leaq	-12360(%rbp), %r14
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	%r12d, %edx
	movl	%ebx, -12344(%rbp)              ## 4-byte Spill
	movl	%ebx, %ecx
	movl	%r12d, %r8d
	movl	$1, %r9d
	callq	_stbtt_PackBegin
	xorl	%ebx, %ebx
	leaq	-12336(%rbp), %r9
	movq	%r14, %rdi
	movq	%r15, -12352(%rbp)              ## 8-byte Spill
	movq	%r15, %rsi
	xorl	%edx, %edx
	movss	-12340(%rbp), %xmm0             ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	xorl	%ecx, %ecx
	movl	$256, %r8d                      ## imm = 0x100
	callq	_stbtt_PackFontRange
	movq	%r14, %rdi
	callq	_stbtt_PackEnd
	movl	$1, 8(%r13)
	xorl	%r14d, %r14d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%r14
	addq	$48, %rbx
	cmpq	$256, %r14                      ## imm = 0x100
	je	LBB0_18
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %r15
	movl	-12296(%rbp,%rbx), %eax
	movl	%eax, 40(%r15,%rbx)
	movq	-12320(%rbp,%rbx), %rax
	movq	%rax, 32(%r15,%rbx)
	movq	-12336(%rbp,%rbx), %rcx
	movq	%rcx, 24(%r15,%rbx)
	movl	-12300(%rbp,%rbx), %edx
	movl	%edx, 20(%r15,%rbx)
	movl	-12304(%rbp,%rbx), %edx
	movl	%edx, 16(%r15,%rbx)
	movq	-12312(%rbp,%rbx), %rdx
	subq	%rax, %rdx
	movq	%rdx, 8(%r15,%rbx)
	movq	-12328(%rbp,%rbx), %rax
	subq	%rcx, %rax
	movq	%rax, (%r15,%rbx)
	movl	%r14d, %edi
	callq	_isalnum
	testq	%rax, %rax
	je	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	$0, 8(%r15,%rbx)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	$0, (%r15,%rbx)
	jne	LBB0_17
LBB0_13:
	movl	%r12d, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	mulsd	%xmm1, %xmm0
	cvttsd2si	%xmm0, %ebx
	movl	-12344(%rbp), %ecx              ## 4-byte Reload
	movl	%ecx, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	mulsd	%xmm1, %xmm0
	cvttsd2si	%xmm0, %r14d
	cmpl	$2048, %r12d                    ## imm = 0x800
	jb	LBB0_15
## %bb.14:
	cmpl	$2047, %ecx                     ## imm = 0x7FF
	ja	LBB0_16
LBB0_15:
	movl	%ebx, %edi
	movl	$2048, %esi                     ## imm = 0x800
	callq	_MIN
	movl	%eax, %ebx
	movl	%r14d, %edi
	movl	$2048, %esi                     ## imm = 0x800
	callq	_MIN
	movl	%eax, %r14d
LBB0_16:
	movss	-12340(%rbp), %xmm0             ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movq	-12352(%rbp), %rsi              ## 8-byte Reload
	movq	%r13, %rdi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	callq	_font_renderer_stb_create_atlas
	jmp	LBB0_19
LBB0_2:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_RARCH_WARN
	movq	16(%r13), %rax
LBB0_3:
	movq	$0, (%r13)
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %rdi
	callq	_free
LBB0_5:
	movq	$0, 16(%r13)
	xorl	%eax, %eax
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_21
## %bb.20:
	addq	$12328, %rsp                    ## imm = 0x3028
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movl	$1, %eax
	jmp	LBB0_19
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[stb] Font atlas too big: %ux%u\n"

	.no_dead_strip	_font_renderer_stb_create_atlas
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function font_renderer_stb_create_atlas
_font_renderer_stb_create_atlas:        ; @font_renderer_stb_create_atlas
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	w9, #12304
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #3, lsl #12             ; =12288
	mov	x21, x3
	mov	x22, x2
	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, #-104]
	str	xzr, [sp, #-16]!
	cmp	w2, #2048
	b.hi	LBB0_14
; %bb.1:
	cmp	w21, #2049
	b.hs	LBB0_14
; %bb.2:
	fmov	s8, s0
	mov	x20, x1
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_free
LBB0_4:
	mov	x0, x21
	mov	x1, x22
	bl	_calloc
	mov	x1, x0
	str	x0, [x19, #16]
	stp	w22, w21, [x19]
	cbz	x0, LBB0_15
; %bb.5:
	mov	w26, #1
	mov	x0, sp
	mov	x2, x22
	mov	x3, x21
	mov	x4, x22
	mov	w5, #1
	mov	x6, #0
	bl	_stbtt_PackBegin
	add	x24, sp, #8
	mov	x0, sp
	add	x5, sp, #8
	mov	x1, x20
	mov	w2, #0
	fmov	s0, s8
	mov	w3, #0
	mov	w4, #256
	bl	_stbtt_PackFontRange
	mov	x0, sp
	bl	_stbtt_PackEnd
	mov	x25, #0
	mov	w23, #0
	str	w26, [x19, #8]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w23, w23, #1
	add	x25, x25, #48
	cmp	x25, #3, lsl #12                ; =12288
	b.eq	LBB0_20
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x19, #24]
	add	x8, x24, x25
	ldr	w9, [x8, #40]
	add	x27, x26, x25
	str	w9, [x27, #40]
	ldr	x9, [x8, #16]
	str	x9, [x27, #32]
	ldr	x10, [x8]
	str	x10, [x27, #24]
	ldr	d0, [x8, #32]
	str	d0, [x27, #16]
	ldr	x11, [x8, #24]
	sub	x9, x11, x9
	str	x9, [x27, #8]
	ldr	x8, [x8, #8]
	sub	x8, x8, x10
	str	x8, [x27]
	mov	x0, x23
	bl	_isalnum
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x27, #8]
	cbz	x8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x26, x25]
	cbnz	x8, LBB0_6
LBB0_10:
	ucvtf	d0, w22
	mov	x8, #3689348814741910323
	movk	x8, #16371, lsl #48
	fmov	d1, x8
	fmul	d0, d0, d1
	fcvtzs	w23, d0
	ucvtf	d0, w21
	fmul	d0, d0, d1
	fcvtzs	w24, d0
	cmp	w22, #2048
	b.lo	LBB0_12
; %bb.11:
	cmp	w21, #2047
	b.hi	LBB0_13
LBB0_12:
	mov	x0, x23
	mov	w1, #2048
	bl	_MIN
	mov	x23, x0
	mov	x0, x24
	mov	w1, #2048
	bl	_MIN
	mov	x24, x0
LBB0_13:
	mov	x0, x19
	mov	x1, x20
	fmov	s0, s8
	mov	x2, x23
	mov	x3, x24
	bl	_font_renderer_stb_create_atlas
	b	LBB0_18
LBB0_14:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x21
	bl	_RARCH_WARN
	ldr	x1, [x19, #16]
LBB0_15:
	str	xzr, [x19]
	cbz	x1, LBB0_17
; %bb.16:
	mov	x0, x1
	bl	_free
LBB0_17:
	mov	w0, #0
	str	xzr, [x19, #16]
LBB0_18:
	ldur	x8, [x29, #-104]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.19:
	add	sp, sp, #3, lsl #12             ; =12288
	add	sp, sp, #16
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
LBB0_20:
	mov	w0, #1
	b	LBB0_18
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[stb] Font atlas too big: %ux%u\n"

	.no_dead_strip	_font_renderer_stb_create_atlas
.subsections_via_symbols
