	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_texture_matrix             ## -- Begin function get_texture_matrix
	.p2align	4, 0x90
_get_texture_matrix:                    ## @get_texture_matrix
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	32(%rdi), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	40(%rdi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rax
	movl	%edx, %r15d
	movq	(%rax,%r15,8), %rax
	movq	_WINED3D_TSS_TEXCOORD_INDEX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movzwl	2(%rax,%rcx,4), %esi
	shll	$16, %esi
	movq	_WINED3DTSS_TCI_PASSTHRU@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%edi, %edi
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	cmpl	%edx, %esi
	setne	%dil
	movl	%edi, -56(%rbp)                 ## 4-byte Spill
	movzwl	%cx, %ecx
	movl	(%rax,%rcx,4), %edi
	movq	_MAX_TEXTURES@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	decq	%rsi
	callq	_min
	movq	_WINED3D_TS_TEXTURE0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	addl	%r14d, %r13d
	shlq	$2, %r13
	movq	(%rbx), %rcx
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	(%rcx,%r15,8), %rcx
	movq	_WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rcx,%rdx,4), %r14d
	movl	8(%r12), %ecx
	movq	_WINED3D_FFP_TEXCOORD0@GOTPCREL(%rip), %rdx
	addl	(%rdx), %eax
	movl	24(%r12), %edx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	addq	16(%rbx), %r13
	btl	%eax, %ecx
	jae	LBB0_1
## %bb.2:
	movq	16(%r12), %rcx
	movl	%eax, %eax
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_WINED3DFMT_UNKNOWN@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r15d
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	movl	(%rcx), %edi
	callq	*(%rax)
                                        ## kill: def $eax killed $eax def $rax
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%r14d, %edx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movl	%r15d, %r9d
	movq	-104(%rbp), %r14                ## 8-byte Reload
	pushq	%r14
	pushq	%rax
	callq	_compute_texture_matrix
	addq	$16, %rsp
	movl	(%r12), %eax
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	btl	%ecx, %eax
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	jae	LBB0_8
## %bb.4:
	movq	8(%rbx), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_8
## %bb.5:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_FIXME
LBB0_7:
	movq	%rbx, %rdi
	callq	_use_ps
	testl	%eax, %eax
	je	LBB0_9
LBB0_8:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	callq	_TRACE
	movq	8(%rbx), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %rdx
	movq	%r14, %rdi
	movq	%r14, %rsi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_multiply_matrix                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_TSS_TEXCOORD_INDEX,8,3 ## @WINED3D_TSS_TEXCOORD_INDEX
	.comm	_WINED3DTSS_TCI_PASSTHRU,4,2    ## @WINED3DTSS_TCI_PASSTHRU
	.comm	_MAX_TEXTURES,8,3               ## @MAX_TEXTURES
	.comm	_WINED3D_TS_TEXTURE0,4,2        ## @WINED3D_TS_TEXTURE0
	.comm	_WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS,8,3 ## @WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS
	.comm	_WINED3D_FFP_TEXCOORD0,4,2      ## @WINED3D_FFP_TEXCOORD0
	.comm	_WINED3DFMT_UNKNOWN,4,2         ## @WINED3DFMT_UNKNOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Non-power-of-two texture being used with generated texture coords.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Non-power-of-two texture matrix multiply fixup.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_texture_matrix             ; -- Begin function get_texture_matrix
	.p2align	2
_get_texture_matrix:                    ; @get_texture_matrix
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	ldp	x8, x19, [x0, #32]
	stp	x8, x3, [sp, #16]               ; 16-byte Folded Spill
	ldr	x8, [x1]
	mov	w9, w2
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	lsl	x26, x9, #3
	ldr	x8, [x8, x26]
Lloh0:
	adrp	x9, _WINED3D_TSS_TEXCOORD_INDEX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WINED3D_TSS_TEXCOORD_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x10, x8, x9, lsl #2
	ldrh	w10, [x10, #2]
	lsl	w11, w10, #16
Lloh3:
	adrp	x10, _WINED3DTSS_TCI_PASSTHRU@GOTPAGE
Lloh4:
	ldr	x10, [x10, _WINED3DTSS_TCI_PASSTHRU@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x10]
	str	w11, [sp, #4]                   ; 4-byte Folded Spill
	cmp	w11, w23
	cset	w24, ne
	and	x9, x9, #0xffff
	ldr	w0, [x8, x9, lsl #2]
Lloh6:
	adrp	x8, _MAX_TEXTURES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_TEXTURES@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	sub	x1, x8, #1
	bl	_min
	ldr	x8, [x20, #16]
Lloh9:
	adrp	x9, _WINED3D_TS_TEXTURE0@GOTPAGE
Lloh10:
	ldr	x9, [x9, _WINED3D_TS_TEXTURE0@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	add	w9, w9, w21
	add	x25, x8, w9, uxtw #2
	ldr	x8, [x20]
	ldr	x8, [x8, x26]
Lloh12:
	adrp	x9, _WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	w26, [x8, x9, lsl #2]
	ldr	w27, [x22, #24]
	ldr	w9, [x22, #8]
Lloh15:
	adrp	x8, _WINED3D_FFP_TEXCOORD0@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WINED3D_FFP_TEXCOORD0@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	add	w8, w8, w0
	lsr	w9, w9, w8
	tbz	w9, #0, LBB0_2
; %bb.1:
	ldr	x9, [x22, #16]
	ldr	x8, [x9, w8, uxtw #3]
	b	LBB0_3
LBB0_2:
Lloh18:
	adrp	x8, _WINED3DFMT_UNKNOWN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WINED3DFMT_UNKNOWN@GOTPAGEOFF]
LBB0_3:
	ldr	w28, [x8]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w0, [x19]
	blr	x8
	mov	x6, x0
	ldp	x0, x19, [sp, #16]              ; 16-byte Folded Reload
	mov	x1, x25
	mov	x2, x26
	mov	x3, x24
	mov	x4, x27
	mov	x5, x28
	mov	x7, x19
	bl	_compute_texture_matrix
	ldr	w8, [x22]
	lsr	w8, w8, w21
	tbz	w8, #0, LBB0_8
; %bb.4:
	ldr	x8, [x20, #8]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_8
; %bb.5:
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	cmp	w8, w23
	b.eq	LBB0_7
; %bb.6:
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
LBB0_7:
	mov	x0, x20
	bl	_use_ps
	cbz	w0, LBB0_9
LBB0_8:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_9:
Lloh22:
	adrp	x0, l_.str.1@PAGE
Lloh23:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
	ldr	x8, [x20, #8]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x8, [x8, x9, lsl #3]
	ldr	x2, [x8]
	mov	x0, x19
	mov	x1, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_multiply_matrix
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_TSS_TEXCOORD_INDEX,8,3 ; @WINED3D_TSS_TEXCOORD_INDEX
	.comm	_WINED3DTSS_TCI_PASSTHRU,4,2    ; @WINED3DTSS_TCI_PASSTHRU
	.comm	_MAX_TEXTURES,8,3               ; @MAX_TEXTURES
	.comm	_WINED3D_TS_TEXTURE0,4,2        ; @WINED3D_TS_TEXTURE0
	.comm	_WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS,8,3 ; @WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS
	.comm	_WINED3D_FFP_TEXCOORD0,4,2      ; @WINED3D_FFP_TEXCOORD0
	.comm	_WINED3DFMT_UNKNOWN,4,2         ; @WINED3DFMT_UNKNOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Non-power-of-two texture being used with generated texture coords.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Non-power-of-two texture matrix multiply fixup.\n"

.subsections_via_symbols
