	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function hlsl_d3d9_renderchain_render
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_hlsl_d3d9_renderchain_render:          ## @hlsl_d3d9_renderchain_render
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movl	%r8d, %r15d
	movl	%ecx, %ebx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	$0, -48(%rbp)
	movl	$0, -44(%rbp)
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movq	(%rdi), %r12
	movq	%r12, %rdi
	callq	_d3d9_renderchain_start_render
	movq	(%r12), %r9
	movq	16(%r12), %rax
	movq	8(%rax), %r14
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	movl	%ebx, %ecx
	movl	%r15d, %r8d
	callq	_d3d9_convert_geometry
	movl	8(%r14), %edi
	movl	(%r14), %edx
	movl	4(%r14), %ecx
	movl	16(%r14), %r10d
	movl	12(%r14), %r11d
	movl	24(%r12), %eax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	movl	%ebx, %r8d
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movl	%r15d, %r9d
	pushq	%rax
	pushq	%r13
	pushq	%r11
	pushq	%r10
	callq	_d3d9_renderchain_blit_to_texture
	addq	$32, %rsp
	movl	8(%r12), %edi
	leaq	-72(%rbp), %rdx
	xorl	%esi, %esi
	callq	_d3d9_device_get_render_target
	movq	16(%r12), %rax
	cmpl	$1, (%rax)
	je	LBB0_3
## %bb.1:
	movl	$1, %r13d
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -96(%rbp)
	movl	$0, -80(%rbp)
	movq	16(%r12), %rax
	movq	%r12, %rbx
	movq	8(%rax), %r12
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	leaq	(%r12,%rdx), %r14
	movq	%r14, -112(%rbp)                ## 8-byte Spill
	movl	8(%r12,%r13,4), %edi
	xorl	%esi, %esi
	leaq	-68(%rbp), %rdx
	callq	_d3d9_texture_get_surface_level
	movl	8(%rbx), %edi
	movl	-68(%rbp), %edx
	xorl	%esi, %esi
	callq	_d3d9_device_set_render_target
	movq	(%rbx), %r9
	movq	%r14, %rdi
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movl	-64(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	callq	_d3d9_convert_geometry
	movl	(%r12,%r13,4), %eax
	movl	%eax, -96(%rbp)
	movl	4(%r12,%r13,4), %eax
	movl	%eax, -92(%rbp)
	movabsq	$4575657221408423936, %rax      ## imm = 0x3F80000000000000
	movq	%rax, -88(%rbp)
	movl	8(%rbx), %edi
	leaq	-96(%rbp), %r12
	movq	%r12, %rsi
	callq	_d3d9_set_viewports
	movl	8(%rbx), %edi
	movq	_D3DCLEAR_TARGET@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	subq	$8, %rsp
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	pushq	$0
	callq	_d3d9_clear
	addq	$16, %rsp
	movl	-48(%rbp), %eax
	movl	%eax, -96(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -92(%rbp)
	movl	8(%rbx), %edi
	movq	%r12, %rsi
	movq	%rbx, %r12
	callq	_d3d9_set_viewports
	movl	-48(%rbp), %r9d
	movl	-44(%rbp), %eax
	movl	12(%rbx), %r10d
	subq	$8, %rsp
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	%rbx, %rsi
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdx
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	pushq	$0
	pushq	%r10
	pushq	%rax
	pushq	%r9
	pushq	%rax
	callq	_hlsl_d3d9_renderchain_set_vertices
	addq	$48, %rsp
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_hlsl_d3d9_renderchain_render_pass
	movl	-48(%rbp), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	-44(%rbp), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	-68(%rbp), %edi
	callq	_d3d9_surface_free
	movq	-120(%rbp), %rdx                ## 8-byte Reload
	movq	16(%r12), %rax
	movl	(%rax), %eax
	decl	%eax
	addq	$4, %rdx
	leaq	1(%r13), %rcx
	cmpq	%rax, %r13
	movq	%rcx, %r13
	jb	LBB0_2
LBB0_3:
	movl	8(%r12), %edi
	movl	-72(%rbp), %edx
	xorl	%esi, %esi
	callq	_d3d9_device_set_render_target
	movq	(%r12), %r9
	movq	16(%r12), %rax
	movq	8(%rax), %rcx
	movslq	(%rax), %rax
	leaq	-4(%rcx,%rax,4), %r15
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	-64(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %ecx
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %r8d
	callq	_d3d9_convert_geometry
	movl	8(%r12), %edi
	movq	(%r12), %rsi
	callq	_d3d9_set_viewports
	movl	-48(%rbp), %r9d
	movl	-44(%rbp), %r13d
	movq	(%r12), %rcx
	movl	(%rcx), %r11d
	movl	4(%rcx), %r10d
	movl	12(%r12), %eax
	subq	$8, %rsp
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	%r12, %rsi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	movl	%ebx, %r8d
	movl	16(%rbp), %ebx
	pushq	%rbx
	pushq	%rax
	pushq	%r10
	pushq	%r11
	pushq	%r13
	callq	_hlsl_d3d9_renderchain_set_vertices
	addq	$48, %rsp
	movq	16(%r12), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_hlsl_d3d9_renderchain_render_pass
	incl	12(%r12)
	movl	-72(%rbp), %edi
	callq	_d3d9_surface_free
	movq	%r12, %rdi
	callq	_d3d9_renderchain_end_render
	leaq	32(%r12), %rbx
	movl	8(%r12), %esi
	movq	%rbx, %rdi
	callq	_d3d9_hlsl_bind_program
	movq	(%r12), %rax
	movl	(%rax), %edx
	movl	4(%rax), %ecx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%r8d, %r8d
	callq	_hlsl_d3d9_renderchain_calc_and_set_shader_mvp
	movl	$1, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_D3DCLEAR_TARGET,4,2            ## @D3DCLEAR_TARGET
	.no_dead_strip	_hlsl_d3d9_renderchain_render
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function hlsl_d3d9_renderchain_render
lCPI0_0:
	.long	0x00000000                      ; float 0
	.long	0x3f800000                      ; float 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_hlsl_d3d9_renderchain_render:          ; @hlsl_d3d9_renderchain_render
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	d9, d8, [sp, #64]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x20, x6
	mov	x24, x5
	mov	x22, x4
	mov	x23, x3
	mov	x25, x2
	mov	x21, x0
	str	xzr, [sp, #48]
	ldr	x19, [x0]
	mov	x0, x19
	bl	_d3d9_renderchain_start_render
	ldr	x8, [x19, #16]
	ldr	x26, [x8, #8]
	ldr	x5, [x19]
	add	x1, sp, #52
	add	x2, sp, #48
	mov	x0, x26
	mov	x3, x23
	mov	x4, x22
	bl	_d3d9_convert_geometry
	ldp	w2, w3, [x26]
	ldp	w7, w6, [x26, #12]
	ldr	w0, [x26, #8]
	ldr	w8, [x19, #24]
	stp	w24, w8, [sp]
	mov	x1, x25
	mov	x4, x23
	mov	x5, x22
	bl	_d3d9_renderchain_blit_to_texture
	ldr	w0, [x19, #8]
	add	x2, sp, #60
	mov	w1, #0
	bl	_d3d9_device_get_render_target
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	cmp	w8, #1
	b.eq	LBB0_3
; %bb.1:
	mov	x26, #0
	mov	x24, #0
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
Lloh2:
	adrp	x27, _D3DCLEAR_TARGET@GOTPAGE
Lloh3:
	ldr	x27, [x27, _D3DCLEAR_TARGET@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [sp, #40]
	stp	xzr, xzr, [sp, #24]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	add	x25, x8, x26
	add	x24, x24, #1
	ldr	w0, [x25, #12]
	add	x2, sp, #56
	mov	w1, #0
	bl	_d3d9_texture_get_surface_level
	ldr	w0, [x19, #8]
	ldr	w2, [sp, #56]
	mov	w1, #0
	bl	_d3d9_device_set_render_target
	ldr	x5, [x19]
	add	x1, sp, #52
	add	x2, sp, #48
	mov	x0, x25
	mov	x3, x23
	mov	x4, x22
	bl	_d3d9_convert_geometry
	ldur	d0, [x25, #4]
	stp	d0, d8, [sp, #24]
	ldr	w0, [x19, #8]
	add	x1, sp, #24
	bl	_d3d9_set_viewports
	ldr	w0, [x19, #8]
	ldr	w3, [x27]
	mov	w1, #0
	mov	w2, #0
	mov	w4, #0
	mov	w5, #1
	mov	w6, #0
	bl	_d3d9_clear
	ldp	w9, w8, [sp, #48]
	stp	w8, w9, [sp, #24]
	ldr	w0, [x19, #8]
	add	x1, sp, #24
	bl	_d3d9_set_viewports
	ldp	w6, w5, [sp, #48]
	ldr	w8, [x19, #12]
	stp	w8, wzr, [sp, #4]
	str	w6, [sp]
	mov	x0, x21
	mov	x1, x19
	mov	x2, x25
	mov	x3, x23
	mov	x4, x22
	mov	x7, x5
	bl	_hlsl_d3d9_renderchain_set_vertices
	mov	x0, x19
	mov	x1, x25
	mov	x2, x24
	bl	_hlsl_d3d9_renderchain_render_pass
	ldp	w22, w23, [sp, #48]
	ldr	w0, [sp, #56]
	bl	_d3d9_surface_free
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	sub	w8, w8, #1
	add	x26, x26, #4
	cmp	x24, x8
	b.lo	LBB0_2
LBB0_3:
	ldr	w0, [x19, #8]
	ldr	w2, [sp, #60]
	mov	w1, #0
	bl	_d3d9_device_set_render_target
	ldr	x8, [x19, #16]
	ldr	x9, [x8, #8]
	ldrsw	x8, [x8]
	add	x8, x9, x8, lsl #2
	sub	x24, x8, #4
	ldr	x5, [x19]
	add	x1, sp, #52
	add	x2, sp, #48
	mov	x0, x24
	mov	x3, x23
	mov	x4, x22
	bl	_d3d9_convert_geometry
	ldr	w0, [x19, #8]
	ldr	x1, [x19]
	bl	_d3d9_set_viewports
	ldp	w6, w5, [sp, #48]
	ldr	x8, [x19]
	ldp	w7, w8, [x8]
	ldr	w9, [x19, #12]
	stp	w9, w20, [sp, #4]
	str	w8, [sp]
	mov	x0, x21
	mov	x1, x19
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	bl	_hlsl_d3d9_renderchain_set_vertices
	ldr	x8, [x19, #16]
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x24
	bl	_hlsl_d3d9_renderchain_render_pass
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
	ldr	w0, [sp, #60]
	bl	_d3d9_surface_free
	mov	x0, x19
	bl	_d3d9_renderchain_end_render
	add	x20, x19, #32
	ldr	w1, [x19, #8]
	mov	x0, x20
	bl	_d3d9_hlsl_bind_program
	ldr	x8, [x19]
	ldp	w2, w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	w4, #0
	bl	_hlsl_d3d9_renderchain_calc_and_set_shader_mvp
	mov	w0, #1
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #64]               ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_D3DCLEAR_TARGET,4,2            ; @D3DCLEAR_TARGET
	.no_dead_strip	_hlsl_d3d9_renderchain_render
.subsections_via_symbols
