	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_gl_limits_get_texture_unit_range ## -- Begin function wined3d_gl_limits_get_texture_unit_range
	.p2align	4, 0x90
_wined3d_gl_limits_get_texture_unit_range: ## @wined3d_gl_limits_get_texture_unit_range
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rcx, %r14
	movq	_WINED3D_SHADER_TYPE_COMPUTE@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_2
## %bb.1:
	movl	4(%rdi), %ecx
	xorl	%esi, %esi
	cmpl	%ecx, (%rdi)
	cmovnel	%ecx, %esi
	movl	%esi, (%rdx)
	movq	8(%rdi), %rcx
	movslq	(%rax), %rax
	movl	(%rcx,%rax,4), %eax
	jmp	LBB0_7
LBB0_2:
	movl	$0, (%rdx)
	movq	_WINED3D_SHADER_TYPE_GRAPHICS_COUNT@GOTPCREL(%rip), %r8
	cmpl	$0, (%r8)
	je	LBB0_6
## %bb.3:
	movq	8(%rdi), %rcx
	movl	%esi, %edi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rax,4), %ebx
	movl	%ebx, (%r14)
	cmpq	%rax, %rdi
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	addl	%ebx, (%rdx)
	incq	%rax
	movl	(%r8), %ebx
	cmpq	%rbx, %rax
	jb	LBB0_4
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_ERR
	xorl	%eax, %eax
LBB0_7:
	movl	%eax, (%r14)
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_SHADER_TYPE_COMPUTE,4,2 ## @WINED3D_SHADER_TYPE_COMPUTE
	.comm	_WINED3D_SHADER_TYPE_GRAPHICS_COUNT,4,2 ## @WINED3D_SHADER_TYPE_GRAPHICS_COUNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unrecognized shader type %#x.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wined3d_gl_limits_get_texture_unit_range ; -- Begin function wined3d_gl_limits_get_texture_unit_range
	.p2align	2
_wined3d_gl_limits_get_texture_unit_range: ; @wined3d_gl_limits_get_texture_unit_range
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x3
Lloh0:
	adrp	x8, _WINED3D_SHADER_TYPE_COMPUTE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WINED3D_SHADER_TYPE_COMPUTE@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, w1
	b.ne	LBB0_2
; %bb.1:
	ldp	w9, w10, [x0]
	cmp	w9, w10
	csel	w9, wzr, w10, eq
	str	w9, [x2]
	ldr	x9, [x0, #8]
	ldrsw	x8, [x8]
	ldr	w8, [x9, x8, lsl #2]
	b	LBB0_7
LBB0_2:
	str	wzr, [x2]
Lloh2:
	adrp	x8, _WINED3D_SHADER_TYPE_GRAPHICS_COUNT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WINED3D_SHADER_TYPE_GRAPHICS_COUNT@GOTPAGEOFF]
	ldr	w9, [x8]
	cbz	w9, LBB0_6
; %bb.3:
	mov	x9, #0
	ldr	x10, [x0, #8]
	mov	w11, w1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10, x9, lsl #2]
	str	w12, [x19]
	cmp	x11, x9
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w13, [x2]
	add	w12, w13, w12
	str	w12, [x2]
	add	x9, x9, #1
	ldr	w12, [x8]
	cmp	x9, x12
	b.lo	LBB0_4
LBB0_6:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
	mov	w8, #0
LBB0_7:
	str	w8, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_SHADER_TYPE_COMPUTE,4,2 ; @WINED3D_SHADER_TYPE_COMPUTE
	.comm	_WINED3D_SHADER_TYPE_GRAPHICS_COUNT,4,2 ; @WINED3D_SHADER_TYPE_GRAPHICS_COUNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unrecognized shader type %#x.\n"

.subsections_via_symbols
