	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_context_get_tex_unit_mapping   ## -- Begin function context_get_tex_unit_mapping
	.p2align	4, 0x90
_context_get_tex_unit_mapping:          ## @context_get_tex_unit_mapping
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rdi, %r15
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	cmpl	$4, (%rsi)
	jl	LBB0_4
## %bb.3:
	movq	8(%r15), %rdi
	movl	4(%rsi), %esi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_wined3d_gl_limits_get_texture_unit_range
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_1:
	movl	$0, (%rbx)
	movq	_MAX_TEXTURES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_4:
	movl	4(%rsi), %esi
	cmpl	$128, %esi
	je	LBB0_7
## %bb.5:
	cmpl	$129, %esi
	jne	LBB0_8
## %bb.6:
	movl	$0, (%rbx)
	movq	_MAX_FRAGMENT_SAMPLERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_7:
	movq	_MAX_FRAGMENT_SAMPLERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_MAX_VERTEX_SAMPLERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str(%rip), %rdi
	callq	_ERR
	movl	$0, (%rbx)
	xorl	%eax, %eax
LBB0_9:
	movl	%eax, (%r14)
	movq	(%r15), %rax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_TEXTURES,4,2               ## @MAX_TEXTURES
	.comm	_MAX_FRAGMENT_SAMPLERS,4,2      ## @MAX_FRAGMENT_SAMPLERS
	.comm	_MAX_VERTEX_SAMPLERS,4,2        ## @MAX_VERTEX_SAMPLERS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unhandled shader type %#x.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_context_get_tex_unit_mapping   ; -- Begin function context_get_tex_unit_mapping
	.p2align	2
_context_get_tex_unit_mapping:          ; @context_get_tex_unit_mapping
	.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
	mov	x19, x3
	mov	x21, x2
	mov	x20, x0
	cbz	x1, LBB0_3
; %bb.1:
	ldr	w8, [x1]
	cmp	w8, #4
	b.lt	LBB0_4
; %bb.2:
	ldr	x0, [x20, #8]
	ldr	w1, [x1, #4]
	mov	x2, x21
	mov	x3, x19
	bl	_wined3d_gl_limits_get_texture_unit_range
	mov	x0, #0
	b	LBB0_10
LBB0_3:
	str	wzr, [x21]
Lloh0:
	adrp	x8, _MAX_TEXTURES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_TEXTURES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	b	LBB0_9
LBB0_4:
	ldr	w1, [x1, #4]
	cmp	w1, #128
	b.eq	LBB0_7
; %bb.5:
	cmp	w1, #129
	b.ne	LBB0_8
; %bb.6:
	str	wzr, [x21]
Lloh3:
	adrp	x8, _MAX_FRAGMENT_SAMPLERS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_FRAGMENT_SAMPLERS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	b	LBB0_9
LBB0_7:
Lloh6:
	adrp	x8, _MAX_FRAGMENT_SAMPLERS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_FRAGMENT_SAMPLERS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x21]
Lloh9:
	adrp	x8, _MAX_VERTEX_SAMPLERS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX_VERTEX_SAMPLERS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	b	LBB0_9
LBB0_8:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
	mov	w8, #0
	str	wzr, [x21]
LBB0_9:
	str	w8, [x19]
	ldr	x0, [x20]
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_TEXTURES,4,2               ; @MAX_TEXTURES
	.comm	_MAX_FRAGMENT_SAMPLERS,4,2      ; @MAX_FRAGMENT_SAMPLERS
	.comm	_MAX_VERTEX_SAMPLERS,4,2        ; @MAX_VERTEX_SAMPLERS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unhandled shader type %#x.\n"

.subsections_via_symbols
