	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function context_bind_shader_resources
_context_bind_shader_resources:         ## @context_bind_shader_resources
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	16(%rsi), %rax
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movq	(%rax,%r14,8), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	%rsi, %r13
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	leaq	16(%r15), %rsi
	leaq	-52(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	callq	_context_get_tex_unit_mapping
	movq	%rax, %rbx
	movl	(%r15), %r12d
	movl	-44(%rbp), %ecx
	cmpl	%ecx, %r12d
	jbe	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_FIXME
	movl	-44(%rbp), %ecx
LBB0_3:
	movl	%r12d, %edi
	movl	%ecx, %esi
	callq	_min
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	je	LBB0_15
## %bb.4:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	$8, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	$16, %r15d
	xorl	%r12d, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str.1(%rip), %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_WARN
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r12
	movl	-44(%rbp), %eax
	addq	$24, %r15
	cmpq	%rax, %r12
	jae	LBB0_15
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	-16(%rax,%r15), %esi
	addl	-52(%rbp), %esi
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%esi, %ecx
	movl	(%rbx,%rcx,4), %esi
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r13), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	-8(%rax,%r15), %rdx
	movq	(%rcx,%rdx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rax,%r15), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	_WINED3D_SAMPLER_DEFAULT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r13), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	(%rcx,%rax,8), %rdx
	testq	%rdx, %rdx
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rcx), %rdx
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	callq	_wined3d_shader_resource_view_bind
	jmp	LBB0_14
LBB0_15:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Shader %p needs %u samplers, but only %u are supported.\n"

L_.str.1:                               ## @.str.1
	.asciz	"No resource view bound at index %u, %u.\n"

	.comm	_WINED3D_SAMPLER_DEFAULT,8,3    ## @WINED3D_SAMPLER_DEFAULT
	.no_dead_strip	_context_bind_shader_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function context_bind_shader_resources
_context_bind_shader_resources:         ; @context_bind_shader_resources
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	x8, [x1, #16]
	ldr	x22, [x8, w2, uxtw #3]
	cbz	x22, LBB0_15
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0]
	str	x8, [sp]                        ; 8-byte Folded Spill
	add	x1, x22, #16
	add	x2, sp, #12
	add	x3, sp, #8
	bl	_context_get_tex_unit_mapping
	mov	x23, x0
	ldr	w24, [x22]
	ldr	w3, [sp, #8]
	cmp	w24, w3
	b.ls	LBB0_3
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x24
	bl	_FIXME
	ldr	w3, [sp, #8]
LBB0_3:
	mov	x0, x24
	mov	x1, x3
	bl	_min
	str	w0, [sp, #8]
	cbz	w0, LBB0_15
; %bb.4:
	mov	x26, #0
	mov	x27, #0
	mov	w28, w19
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	add	x25, x8, #8
Lloh2:
	adrp	x24, _WINED3D_SAMPLER_DEFAULT@GOTPAGE
Lloh3:
	ldr	x24, [x24, _WINED3D_SAMPLER_DEFAULT@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_WARN
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x27, x27, #1
	ldr	w8, [sp, #8]
	add	x26, x26, #24
	cmp	x27, x8
	b.hs	LBB0_15
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	w9, [sp, #12]
	ldr	w10, [x8, x26]
	add	w1, w10, w9
	cbz	x23, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x23, w1, uxtw #2]
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x20, #8]
	ldr	x9, [x9, x28, lsl #3]
	add	x8, x8, x26
	ldr	x2, [x8, #8]
	ldr	x0, [x9, x2, lsl #3]
	cbz	x0, LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x8, #16]
	ldr	x10, [x24]
	mov	x9, x25
	cmp	x8, x10
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x20]
	ldr	x9, [x9, x28, lsl #3]
	ldr	x2, [x9, x8, lsl #3]
	cbnz	x2, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [sp]                        ; 8-byte Folded Reload
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x2, [x9]
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x3, x21
	bl	_wined3d_shader_resource_view_bind
	b	LBB0_6
LBB0_15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Shader %p needs %u samplers, but only %u are supported.\n"

l_.str.1:                               ; @.str.1
	.asciz	"No resource view bound at index %u, %u.\n"

	.comm	_WINED3D_SAMPLER_DEFAULT,8,3    ; @WINED3D_SAMPLER_DEFAULT
	.no_dead_strip	_context_bind_shader_resources
.subsections_via_symbols
