	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function d3d12_font_render_line
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_d3d12_font_render_line:                ## @d3d12_font_render_line
	.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
	subq	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movss	%xmm2, -80(%rbp)                ## 4-byte Spill
	movl	%r8d, -144(%rbp)                ## 4-byte Spill
	movaps	%xmm0, -128(%rbp)               ## 16-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	$0, -56(%rbp)
	movl	(%rdi), %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	movq	8(%rdi), %r14
	movl	4(%rdi), %r15d
	mulss	%xmm1, %xmm0
	cvtss2sd	%xmm0, %xmm0
	callq	_roundf
	movl	%eax, -96(%rbp)                 ## 4-byte Spill
	movss	-80(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	cvtss2sd	%xmm0, %xmm0
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	subsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r15, %xmm0
	mulsd	%xmm1, %xmm0
	callq	_roundf
	xorpd	%xmm0, %xmm0
	movapd	%xmm0, -176(%rbp)
	movq	$0, -160(%rbp)
	testq	%r14, %r14
	je	LBB0_22
## %bb.1:
	cmpl	$0, 24(%r14)
	je	LBB0_22
## %bb.2:
	movl	16(%r14), %edx
	cmpl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	jb	LBB0_22
## %bb.3:
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	movl	(%r14), %ecx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	addl	%r15d, %ecx
	cmpl	%edx, %ecx
	jbe	LBB0_5
## %bb.4:
	movl	$0, (%r14)
LBB0_5:
	cmpl	$129, %r13d
	je	LBB0_8
## %bb.6:
	cmpl	$128, %r13d
	jne	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	movapd	-128(%rbp), %xmm0               ## 16-byte Reload
	callq	_d3d12_font_get_message_width
	subl	%eax, -96(%rbp)                 ## 4-byte Folded Spill
	jmp	LBB0_9
LBB0_8:
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	movapd	-128(%rbp), %xmm0               ## 16-byte Reload
	callq	_d3d12_font_get_message_width
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	subl	%ecx, -96(%rbp)                 ## 4-byte Folded Spill
LBB0_9:
	movl	12(%r14), %edi
	leaq	-176(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	xorl	%esi, %esi
	callq	_D3D12Map
	movq	-56(%rbp), %rax
	movl	(%r14), %ecx
	imulq	$56, %rcx, %rcx
	leaq	(%rax,%rcx), %r13
	movq	%rcx, -176(%rbp)
	testl	%r15d, %r15d
	je	LBB0_16
## %bb.10:
	movq	%r12, -184(%rbp)                ## 8-byte Spill
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	movd	-96(%rbp), %xmm0                ## 4-byte Folded Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	pinsrd	$1, -80(%rbp), %xmm0            ## 4-byte Folded Reload
	movdqa	%xmm0, -80(%rbp)                ## 16-byte Spill
	movsldup	-128(%rbp), %xmm0               ## 16-byte Folded Reload
                                        ## xmm0 = mem[0,0,2,2]
	movaps	%xmm0, -96(%rbp)                ## 16-byte Spill
	movd	-144(%rbp), %xmm0               ## 4-byte Folded Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqa	%xmm0, -144(%rbp)               ## 16-byte Spill
	xorl	%r12d, %r12d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	cvtdq2ps	-80(%rbp), %xmm0                ## 16-byte Folded Reload
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movaps	-128(%rbp), %xmm5               ## 16-byte Reload
	mulss	%xmm5, %xmm1
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	xorps	%xmm2, %xmm2
	cvtsi2ssq	48(%rdx), %xmm2
	addss	%xmm0, %xmm1
	divss	%xmm2, %xmm1
	cvttss2si	%xmm1, %ecx
	movl	%ecx, 40(%r13)
	movshdup	%xmm0, %xmm1                    ## xmm1 = xmm0[1,1,3,3]
	movss	4(%rax), %xmm3                  ## xmm3 = mem[0],zero,zero,zero
	mulss	%xmm5, %xmm3
	cvtsi2ssq	40(%rdx), %xmm4
	addss	%xmm1, %xmm3
	divss	%xmm4, %xmm3
	cvttss2si	%xmm3, %ecx
	movl	%ecx, 44(%r13)
	movups	8(%rax), %xmm1
	movaps	%xmm1, %xmm3
	mulss	%xmm5, %xmm3
	divss	%xmm2, %xmm3
	movss	%xmm3, 48(%r13)
	movshdup	%xmm1, %xmm2                    ## xmm2 = xmm1[1,1,3,3]
	mulss	%xmm5, %xmm2
	divss	%xmm4, %xmm2
	movss	%xmm2, 52(%r13)
	xorps	%xmm2, %xmm2
	cvtsi2ssq	16(%rbx), %xmm2
	xorps	%xmm3, %xmm3
	cvtsi2ssq	8(%rbx), %xmm3
	insertps	$16, %xmm2, %xmm3               ## xmm3 = xmm3[0],xmm2[0],xmm3[2,3]
	shufps	$17, %xmm3, %xmm3               ## xmm3 = xmm3[1,0,1,0]
	shufps	$78, %xmm1, %xmm1               ## xmm1 = xmm1[2,3,0,1]
	divps	%xmm3, %xmm1
	movups	%xmm1, 24(%r13)
	movl	$1, 8(%r13)
	movq	$0, 16(%r13)
	movq	(%r13), %rcx
	movaps	-144(%rbp), %xmm1               ## 16-byte Reload
	movups	%xmm1, (%rcx)
	addq	$56, %r13
	movsd	24(%rax), %xmm1                 ## xmm1 = mem[0],zero
	mulps	-96(%rbp), %xmm1                ## 16-byte Folded Reload
	addps	%xmm0, %xmm1
	cvttps2dq	%xmm1, %xmm0
	movdqa	%xmm0, -80(%rbp)                ## 16-byte Spill
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	addl	%r15d, %r12d
	incl	%r12d
	cmpl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	jae	LBB0_15
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %r14d
	addq	-64(%rbp), %r14                 ## 8-byte Folded Reload
	movq	%r14, -112(%rbp)
	leaq	-112(%rbp), %rdi
	callq	_utf8_walk
	movl	-112(%rbp), %r15d
	subl	%r14d, %r15d
	subl	$1, %r15d
	movl	$0, %ecx
	cmovbl	%ecx, %r15d
	movq	40(%rbx), %rcx
	movl	32(%rbx), %edi
	movsbl	%al, %esi
	callq	*(%rcx)
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	40(%rbx), %rax
	movl	32(%rbx), %edi
	movl	$63, %esi
	callq	*(%rax)
	testq	%rax, %rax
	jne	LBB0_13
	jmp	LBB0_14
LBB0_15:
	movq	-56(%rbp), %rax
	movq	-104(%rbp), %r14                ## 8-byte Reload
	movq	-184(%rbp), %r12                ## 8-byte Reload
LBB0_16:
	movq	%r13, %rcx
	subq	%rax, %rcx
	movq	%rcx, -168(%rbp)
	movl	12(%r14), %edi
	leaq	-176(%rbp), %rdx
	xorl	%esi, %esi
	callq	_D3D12Unmap
	subq	-56(%rbp), %r13
	shrq	$3, %r13
	imull	$-1227133513, %r13d, %r15d      ## imm = 0xB6DB6DB7
	subl	(%r14), %r15d
	je	LBB0_22
## %bb.17:
	movq	24(%rbx), %rax
	cmpl	$0, (%rax)
	je	LBB0_19
## %bb.18:
	movl	4(%rax), %r8d
	movl	8(%rax), %edi
	movl	12(%rax), %esi
	movq	_DXGI_FORMAT_A8_UNORM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%edi, %edx
	movq	%rbx, %r9
	callq	_d3d12_update_texture
	movq	24(%rbx), %rax
	movl	$0, (%rax)
LBB0_19:
	cmpq	$0, (%rbx)
	je	LBB0_21
## %bb.20:
	movl	32(%r14), %edi
	movq	8(%r12), %rdx
	movq	%rbx, %rsi
	callq	_d3d12_upload_texture
LBB0_21:
	movl	8(%r14), %esi
	movl	32(%r14), %edi
	callq	_D3D12SetPipelineState
	movl	32(%r14), %edi
	movq	%rbx, %rsi
	callq	_d3d12_set_texture_and_sampler
	movl	(%r14), %ecx
	movl	32(%r14), %edi
	movl	%r15d, %esi
	movl	$1, %edx
	xorl	%r8d, %r8d
	callq	_D3D12DrawInstanced
	movl	4(%r14), %esi
	movl	32(%r14), %edi
	callq	_D3D12SetPipelineState
	addl	%r15d, (%r14)
LBB0_22:
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DXGI_FORMAT_A8_UNORM,4,2       ## @DXGI_FORMAT_A8_UNORM
	.no_dead_strip	_d3d12_font_render_line
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d3d12_font_render_line
_d3d12_font_render_line:                ; @d3d12_font_render_line
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	d9, d8, [sp, #96]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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	x26, x5
	mov	x23, x4
	mov	x21, x3
	mov	x22, x2
	fmov	s8, s2
	str	d0, [sp, #16]                   ; 16-byte Folded Spill
	mov	x19, x1
	mov	x20, x0
	ldp	s0, s9, [x0]
	ucvtf	s0, s0
	fmul	s0, s0, s1
	str	xzr, [sp, #88]
	ldr	x27, [x0, #8]
	fcvt	d0, s0
	bl	_roundf
	mov	x24, x0
	fcvt	d0, s8
	fmov	d1, #1.00000000
	fsub	d0, d1, d0
	ucvtf	d1, d9
	fmul	d0, d0, d1
	bl	_roundf
	stp	xzr, xzr, [sp, #64]
	str	xzr, [sp, #80]
	cbz	x27, LBB0_22
; %bb.1:
	ldr	w8, [x27, #24]
	cbz	w8, LBB0_22
; %bb.2:
	ldr	w8, [x27, #16]
	cmp	w8, w21
	b.lo	LBB0_22
; %bb.3:
	mov	x25, x0
	ldr	w9, [x27]
	add	w9, w9, w21
	cmp	w9, w8
	b.ls	LBB0_5
; %bb.4:
	str	wzr, [x27]
LBB0_5:
	cmp	w26, #129
	b.eq	LBB0_8
; %bb.6:
	cmp	w26, #128
	b.ne	LBB0_9
; %bb.7:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	ldr	q0, [sp, #16]                   ; 16-byte Folded Reload
                                        ; kill: def $s0 killed $s0 killed $q0
	bl	_d3d12_font_get_message_width
	sub	w24, w24, w0
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	ldr	q0, [sp, #16]                   ; 16-byte Folded Reload
                                        ; kill: def $s0 killed $s0 killed $q0
	bl	_d3d12_font_get_message_width
	cmp	w0, #0
	cinc	w8, w0, lt
	sub	w24, w24, w8, asr #1
LBB0_9:
	ldr	w0, [x27, #12]
	add	x2, sp, #64
	add	x3, sp, #88
	mov	w1, #0
	bl	_D3D12Map
	ldr	x8, [sp, #88]
	ldr	w9, [x27]
	mov	w10, #56
	mul	x9, x9, x10
	add	x26, x8, x9
	str	x9, [sp, #64]
	cbz	w21, LBB0_16
; %bb.10:
	mov	w28, #0
	fmov	s0, w24
	mov.s	v0[1], w25
	str	q0, [sp, #32]                   ; 16-byte Folded Spill
	ldr	q0, [sp, #16]                   ; 16-byte Folded Reload
	dup.2s	v8, v0[0]
	dup.4s	v0, w23
	str	q0, [sp]                        ; 16-byte Folded Spill
	mov	w23, #1
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_13 Depth=1
	ldp	q3, q0, [sp, #16]               ; 32-byte Folded Reload
	scvtf.2s	v0, v0
	ldur	q1, [x0, #8]
	ldur	q2, [x27, #40]
	scvtf.2d	v2, v2
	fcvtn	v2.2s, v2.2d
	rev64.2s	v2, v2
	fmul.2s	v3, v1, v3[0]
	fdiv.2s	v3, v3, v2
	ldur	q4, [x19, #8]
	scvtf.2d	v4, v4
	fcvtn	v4.2s, v4.2d
	mov.s	v4[3], v4[0]
	uzp2.4s	v4, v4, v4
	fdiv.4s	v1, v1, v4
	ext.16b	v1, v1, v1, #8
	str	w23, [x26, #8]
	str	xzr, [x26, #16]
	ldr	x8, [x26]
	ldr	d4, [x0]
	fmov	d5, d0
	fmla.2s	v5, v8, v4
	fdiv.2s	v2, v5, v2
	fcvtzs.2s	v2, v2
	stp	d2, d3, [x26, #40]
	stur	q1, [x26, #24]
	add	x26, x26, #56
	ldr	q1, [sp]                        ; 16-byte Folded Reload
	str	q1, [x8]
	ldr	d1, [x0, #24]
	fmla.2s	v0, v8, v1
	fcvtzs.2s	v0, v0
	str	q0, [sp, #32]                   ; 16-byte Folded Spill
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	w8, w28, w24
	add	w28, w8, #1
	cmp	w28, w21
	b.hs	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	add	x24, x22, w28, uxtw
	str	x24, [sp, #56]
	add	x0, sp, #56
	bl	_utf8_walk
	ldr	w8, [sp, #56]
	sub	w8, w8, w24
	subs	w8, w8, #1
	csel	w24, wzr, w8, lo
	ldr	x8, [x19, #40]
	ldr	x9, [x8]
	ldr	w8, [x19, #32]
	sxtb	w1, w0
	mov	x0, x8
	blr	x9
	cbnz	x0, LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	ldr	w0, [x19, #32]
	mov	w1, #63
	blr	x8
	cbnz	x0, LBB0_11
	b	LBB0_12
LBB0_15:
	ldr	x8, [sp, #88]
LBB0_16:
	sub	x8, x26, x8
	str	x8, [sp, #72]
	ldr	w0, [x27, #12]
	add	x2, sp, #64
	mov	w1, #0
	bl	_D3D12Unmap
	ldr	x8, [sp, #88]
	sub	x8, x26, x8
	lsr	x8, x8, #3
	mov	w9, #28087
	movk	w9, #46811, lsl #16
	mul	w8, w8, w9
	ldr	w9, [x27]
	subs	w21, w8, w9
	b.eq	LBB0_22
; %bb.17:
	ldr	x8, [x19, #24]
	ldr	w9, [x8]
	cbz	w9, LBB0_19
; %bb.18:
	ldp	w0, w1, [x8, #8]
Lloh0:
	adrp	x9, _DXGI_FORMAT_A8_UNORM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DXGI_FORMAT_A8_UNORM@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x9]
	ldr	w4, [x8, #4]
	mov	x2, x0
	mov	x5, x19
	bl	_d3d12_update_texture
	ldr	x8, [x19, #24]
	str	wzr, [x8]
LBB0_19:
	ldr	x8, [x19]
	cbz	x8, LBB0_21
; %bb.20:
	ldr	w0, [x27, #32]
	ldr	x2, [x20, #8]
	mov	x1, x19
	bl	_d3d12_upload_texture
LBB0_21:
	ldr	w0, [x27, #32]
	ldr	w1, [x27, #8]
	bl	_D3D12SetPipelineState
	ldr	w0, [x27, #32]
	mov	x1, x19
	bl	_d3d12_set_texture_and_sampler
	ldr	w0, [x27, #32]
	ldr	w3, [x27]
	mov	x1, x21
	mov	w2, #1
	mov	w4, #0
	bl	_D3D12DrawInstanced
	ldr	w0, [x27, #32]
	ldr	w1, [x27, #4]
	bl	_D3D12SetPipelineState
	ldr	w8, [x27]
	add	w8, w8, w21
	str	w8, [x27]
LBB0_22:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #96]               ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DXGI_FORMAT_A8_UNORM,4,2       ; @DXGI_FORMAT_A8_UNORM
	.no_dead_strip	_d3d12_font_render_line
.subsections_via_symbols
