	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_tmpreg
_find_tmpreg:                           ## @find_tmpreg
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_MAX_TEXTURES@GOTPCREL(%rip), %r15
	movl	(%r15), %r12d
	movq	%r12, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	leal	(,%r12,4), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_22
## %bb.1:
	movq	_WINED3D_TOP_DISABLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r10
	movq	_WINED3DTA_TEMP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r9
	movq	_tempreg@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	movq	_WINED3DTA_TEXTURE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	movq	_TRUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	addq	$56, %rbx
	movl	$-1, %ecx
	xorl	%edx, %edx
	movl	$-1, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r10, -56(%rbx)
	je	LBB0_21
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$-1, %ecx
	jne	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r9, -48(%rbx)
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r9, -40(%rbx)
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r9, -32(%rbx)
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r9, -24(%rbx)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r9, -16(%rbx)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$-1, %ecx
	cmpq	%r9, -8(%rbx)
	jne	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, %ecx
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$-1, %r15d
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rdi, -48(%rbx)
	jne	LBB0_14
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r8, (%rbx)
	movl	$-1, %r15d
	cmovel	%edx, %r15d
	cmpq	%rdi, -48(%rbx)
	je	LBB0_19
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rdi, -40(%rbx)
	je	LBB0_19
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rdi, -32(%rbx)
	je	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rdi, -24(%rbx)
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rdi, -16(%rbx)
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rdi, -8(%rbx)
	jne	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%esi, (%r14,%rdx,4)
LBB0_20:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	addq	$64, %rbx
	cmpq	%rdx, %rax
	jne	LBB0_2
LBB0_21:
	cmpl	$-1, %ecx
	je	LBB0_22
## %bb.23:
	cmpl	%ecx, %r15d
	jl	LBB0_25
## %bb.24:
	leaq	L_.str(%rip), %rdi
	callq	_FIXME
LBB0_25:
	cmpl	$-1, %r15d
	je	LBB0_26
## %bb.28:
	testl	%r15d, %r15d
	jg	LBB0_27
## %bb.29:
	cmpl	$0, 4(%r14)
	je	LBB0_30
## %bb.32:
	cmpl	$0, 8(%r14)
	je	LBB0_33
## %bb.34:
	cmpl	$0, 12(%r14)
	je	LBB0_35
## %bb.36:
	cmpl	$0, 16(%r14)
	je	LBB0_37
## %bb.38:
	cmpl	$0, 20(%r14)
	je	LBB0_39
## %bb.40:
	leaq	L_.str.2(%rip), %rdi
	callq	_FIXME
	xorl	%eax, %eax
	jmp	LBB0_41
LBB0_22:
	movq	_GL_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_41
LBB0_26:
	leaq	L_.str.1(%rip), %rdi
	callq	_FIXME
LBB0_27:
	movq	_GL_REG_1_ATI@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_41
LBB0_30:
	movl	$1, %eax
	jmp	LBB0_31
LBB0_33:
	movl	$2, %eax
	jmp	LBB0_31
LBB0_35:
	movl	$3, %eax
	jmp	LBB0_31
LBB0_37:
	movl	$4, %eax
	jmp	LBB0_31
LBB0_39:
	movl	$5, %eax
LBB0_31:
	movq	_GL_REG_0_ATI@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
LBB0_41:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_43
## %bb.42:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_43:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_TEXTURES,4,2               ## @MAX_TEXTURES
	.comm	_WINED3D_TOP_DISABLE,8,3        ## @WINED3D_TOP_DISABLE
	.comm	_WINED3DTA_TEMP,8,3             ## @WINED3DTA_TEMP
	.comm	_tempreg,8,3                    ## @tempreg
	.comm	_WINED3DTA_TEXTURE,8,3          ## @WINED3DTA_TEXTURE
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_GL_NONE,8,3                    ## @GL_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Temp register read before being written\n"

L_.str.1:                               ## @.str.1
	.asciz	"Temp register read without being written\n"

	.comm	_GL_REG_1_ATI,8,3               ## @GL_REG_1_ATI
	.comm	_GL_REG_0_ATI,8,3               ## @GL_REG_0_ATI
L_.str.2:                               ## @.str.2
	.asciz	"Could not find a register for the temporary register\n"

	.no_dead_strip	_find_tmpreg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_tmpreg
_find_tmpreg:                           ; @find_tmpreg
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #16
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x21, _MAX_TEXTURES@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MAX_TEXTURES@GOTPAGEOFF]
	ldr	w12, [x21]
	lsl	x8, x12, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x19, x9, x8
	mov	sp, x19
	lsl	w2, w12, #2
	mov	x0, x19
	mov	w1, #0
	bl	_memset
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_33
; %bb.1:
	mov	x9, #0
Lloh7:
	adrp	x10, _WINED3D_TOP_DISABLE@GOTPAGE
Lloh8:
	ldr	x10, [x10, _WINED3D_TOP_DISABLE@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
Lloh10:
	adrp	x11, _WINED3DTA_TEMP@GOTPAGE
Lloh11:
	ldr	x11, [x11, _WINED3DTA_TEMP@GOTPAGEOFF]
Lloh12:
	ldr	x11, [x11]
Lloh13:
	adrp	x12, _tempreg@GOTPAGE
Lloh14:
	ldr	x12, [x12, _tempreg@GOTPAGEOFF]
Lloh15:
	ldr	x12, [x12]
Lloh16:
	adrp	x13, _WINED3DTA_TEXTURE@GOTPAGE
Lloh17:
	ldr	x13, [x13, _WINED3DTA_TEXTURE@GOTPAGEOFF]
Lloh18:
	ldr	x13, [x13]
Lloh19:
	adrp	x14, _TRUE@GOTPAGE
Lloh20:
	ldr	x14, [x14, _TRUE@GOTPAGEOFF]
Lloh21:
	ldr	w14, [x14]
	add	x15, x20, #32
	mov	w16, #-1
	mov	w20, #-1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x17, [x15, #-32]
	cmp	x17, x10
	b.eq	LBB0_22
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmn	w16, #1
	b.ne	LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldur	x16, [x15, #-24]
	cmp	x16, x11
	b.eq	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldur	x16, [x15, #-16]
	cmp	x16, x11
	b.eq	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldur	x16, [x15, #-8]
	cmp	x16, x11
	b.eq	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x16, [x15]
	cmp	x16, x11
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x16, [x15, #8]
	cmp	x16, x11
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x16, [x15, #16]
	cmp	x16, x11
	b.ne	LBB0_21
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x16, x9
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	cmn	w20, #1
	b.ne	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x17, [x15, #24]
	cmp	x17, x12
	csinv	w20, w9, wzr, eq
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	ldur	x17, [x15, #-24]
	cmp	x17, x13
	b.eq	LBB0_19
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	ldur	x17, [x15, #-16]
	cmp	x17, x13
	b.eq	LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_2 Depth=1
	ldur	x17, [x15, #-8]
	cmp	x17, x13
	b.eq	LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x17, [x15]
	cmp	x17, x13
	b.eq	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x17, [x15, #8]
	cmp	x17, x13
	b.eq	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x17, [x15, #16]
	cmp	x17, x13
	b.ne	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_2 Depth=1
	str	w14, [x19, x9, lsl #2]
LBB0_20:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	add	x15, x15, #64
	cmp	x8, x9
	b.ne	LBB0_2
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w16, #-1
	cmn	w20, #1
	b.ne	LBB0_13
	b	LBB0_12
LBB0_22:
	cmn	w16, #1
	b.eq	LBB0_33
; %bb.23:
	cmp	w20, w16
	b.lt	LBB0_25
; %bb.24:
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
LBB0_25:
	cmn	w20, #1
	b.eq	LBB0_34
; %bb.26:
	cmp	w20, #0
	b.gt	LBB0_35
; %bb.27:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_36
; %bb.28:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_37
; %bb.29:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_38
; %bb.30:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_39
; %bb.31:
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_40
; %bb.32:
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_FIXME
	mov	x0, #0
	b	LBB0_42
LBB0_33:
Lloh26:
	adrp	x8, _GL_NONE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _GL_NONE@GOTPAGEOFF]
Lloh28:
	ldr	x0, [x8]
	b	LBB0_42
LBB0_34:
Lloh29:
	adrp	x0, l_.str.1@PAGE
Lloh30:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
LBB0_35:
Lloh31:
	adrp	x8, _GL_REG_1_ATI@GOTPAGE
Lloh32:
	ldr	x8, [x8, _GL_REG_1_ATI@GOTPAGEOFF]
Lloh33:
	ldr	x0, [x8]
	b	LBB0_42
LBB0_36:
	mov	w8, #1
	b	LBB0_41
LBB0_37:
	mov	w8, #2
	b	LBB0_41
LBB0_38:
	mov	w8, #3
	b	LBB0_41
LBB0_39:
	mov	w8, #4
	b	LBB0_41
LBB0_40:
	mov	w8, #5
LBB0_41:
Lloh34:
	adrp	x9, _GL_REG_0_ATI@GOTPAGE
Lloh35:
	ldr	x9, [x9, _GL_REG_0_ATI@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	add	x0, x9, x8
LBB0_42:
	ldur	x8, [x29, #-40]
Lloh37:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh38:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_44
; %bb.43:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_44:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_TEXTURES,4,2               ; @MAX_TEXTURES
	.comm	_WINED3D_TOP_DISABLE,8,3        ; @WINED3D_TOP_DISABLE
	.comm	_WINED3DTA_TEMP,8,3             ; @WINED3DTA_TEMP
	.comm	_tempreg,8,3                    ; @tempreg
	.comm	_WINED3DTA_TEXTURE,8,3          ; @WINED3DTA_TEXTURE
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_GL_NONE,8,3                    ; @GL_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Temp register read before being written\n"

l_.str.1:                               ; @.str.1
	.asciz	"Temp register read without being written\n"

	.comm	_GL_REG_1_ATI,8,3               ; @GL_REG_1_ATI
	.comm	_GL_REG_0_ATI,8,3               ; @GL_REG_0_ATI
l_.str.2:                               ; @.str.2
	.asciz	"Could not find a register for the temporary register\n"

	.no_dead_strip	_find_tmpreg
.subsections_via_symbols
