	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function wined3d_texture_bind
LCPI0_0:
	.long	0                               ## 0x0
	.long	3296329728                      ## 0xc47a0000
	.long	1148846080                      ## 0x447a0000
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_wined3d_texture_bind
	.p2align	4, 0x90
_wined3d_texture_bind:                  ## @wined3d_texture_bind
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	(%rsi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	24(%rdi), %rbx
	movups	(%rbx), %xmm0
	movups	16(%rbx), %xmm1
	movaps	%xmm1, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_TRACE
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_needs_separate_srgb_gl_texture
	movq	_FALSE@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	(%rcx), %r15
LBB0_2:
	movq	_WINED3D_TEXTURE_IS_SRGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testq	%r15, %r15
	je	LBB0_4
## %bb.3:
	orl	%eax, (%r13)
	jmp	LBB0_5
LBB0_4:
	notl	%eax
	andl	%eax, (%r13)
LBB0_5:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_wined3d_texture_get_gl_texture
	movq	8(%r13), %rsi
	movl	96(%rax), %edx
	testl	%edx, %edx
	je	LBB0_6
## %bb.22:
	movq	%r14, %rdi
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_context_bind_texture           ## TAILCALL
LBB0_6:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	leaq	96(%rax), %r12
	movl	$1, %edi
	movq	%r12, %rsi
	movq	%rax, %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	callq	*16(%rax)
	leaq	L_.str.1(%rip), %rdi
	callq	_checkGLcall
	movslq	(%r12), %rsi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	cmpl	$0, (%r12)
	je	LBB0_23
## %bb.7:
	movq	_WINED3D_TADDRESS_WRAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%rbx)
	movq	%rax, 40(%rbx)
	movq	%rax, 88(%rbx)
	movl	80(%rbx), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_WINED3D_TEXF_LINEAR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	_WINED3D_TEXF_POINT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 24(%rbx)
	movq	%rax, 16(%rbx)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,3296329728,1148846080,1]
	movups	%xmm0, (%rbx)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 72(%rbx)
	movq	_WINED3D_CMP_LESSEQUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, %r12
	movl	%eax, 64(%rbx)
	movq	(%r14), %rax
	movq	24(%rax), %rax
	movq	_EXT_TEXTURE_SRGB_DECODE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_9
## %bb.8:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
LBB0_9:
	movq	%r12, %rbx
	movq	%r15, 56(%r12)
	movq	$0, 104(%r12)
	movq	%r13, %rdi
	callq	_wined3d_texture_set_dirty
	movl	96(%r12), %edx
	movq	%r14, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_context_bind_texture
	movq	_GL_TEXTURE_RECTANGLE_ARB@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_11
## %bb.10:
	movslq	16(%r13), %rsi
	decq	%rsi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	_GL_TEXTURE_MAX_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r13), %edx
	decl	%edx
	movq	%rbx, %rdi
	callq	*8(%r15)
	leaq	L_.str.5(%rip), %rdi
	callq	_checkGLcall
LBB0_11:
	movq	_GL_TEXTURE_CUBE_MAP_ARB@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_13
## %bb.12:
	movq	_GL_TEXTURE_WRAP_S@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GL_CLAMP_TO_EDGE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	*8(%r15)
	movq	_GL_TEXTURE_WRAP_T@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	*8(%r15)
	movq	_GL_TEXTURE_WRAP_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	*8(%r15)
LBB0_13:
	movq	_WINED3D_TEXTURE_COND_NP2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_15
## %bb.14:
	movq	_GL_TEXTURE_WRAP_S@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GL_CLAMP_TO_EDGE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	*8(%r15)
	movq	_GL_TEXTURE_WRAP_T@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	*8(%r15)
	movq	_GL_TEXTURE_MIN_FILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GL_NEAREST@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	*8(%r15)
	movq	_GL_TEXTURE_MAG_FILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	*8(%r15)
	leaq	L_.str.6(%rip), %rdi
	callq	_checkGLcall
	movq	_WINED3D_TADDRESS_CLAMP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r12)
	movq	%rax, 40(%r12)
	movq	_WINED3D_TEXF_POINT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r12)
	movq	%rax, 24(%r12)
	movq	_WINED3D_TEXF_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r12)
LBB0_15:
	movq	24(%r15), %rax
	movq	_WINED3D_GL_LEGACY_CONTEXT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_18
## %bb.16:
	movq	_ARB_DEPTH_TEXTURE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_18
## %bb.17:
	movq	_GL_DEPTH_TEXTURE_MODE_ARB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GL_INTENSITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	*8(%r15)
	leaq	L_.str.7(%rip), %rdi
	callq	_checkGLcall
LBB0_18:
	movaps	-96(%rbp), %xmm0
	movaps	-80(%rbp), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_is_identity_fixup
	testl	%eax, %eax
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	jne	LBB0_21
## %bb.19:
	movq	%r15, %rdi
	callq	_can_use_texture_swizzle
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	leaq	_wined3d_texture_bind.swizzle_source(%rip), %rax
	movq	-96(%rbp), %rcx
	movq	-88(%rbp), %rdx
	movq	(%rax,%rcx,8), %rcx
	movq	%rcx, -136(%rbp)
	movq	(%rax,%rdx,8), %rcx
	movq	%rcx, -128(%rbp)
	movq	-80(%rbp), %rcx
	movq	(%rax,%rcx,8), %rcx
	movq	%rcx, -120(%rbp)
	movq	-72(%rbp), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -112(%rbp)
	movq	_GL_TEXTURE_SWIZZLE_RGBA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-136(%rbp), %rdx
	movq	%rbx, %rdi
	callq	*(%r15)
	leaq	L_.str.8(%rip), %rdi
	callq	_checkGLcall
LBB0_21:
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	leaq	L_.str.3(%rip), %rdi
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"texture %p, context %p, srgb %#x.\n"

	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_WINED3D_TEXTURE_IS_SRGB,4,2    ## @WINED3D_TEXTURE_IS_SRGB
L_.str.1:                               ## @.str.1
	.asciz	"glGenTextures"

L_.str.2:                               ## @.str.2
	.asciz	"Generated texture %d.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to generate a texture name.\n"

	.comm	_WINED3D_TADDRESS_WRAP,8,3      ## @WINED3D_TADDRESS_WRAP
	.comm	_WINED3D_TEXF_LINEAR,8,3        ## @WINED3D_TEXF_LINEAR
	.comm	_WINED3D_TEXF_POINT,8,3         ## @WINED3D_TEXF_POINT
	.comm	_WINED3D_CMP_LESSEQUAL,4,2      ## @WINED3D_CMP_LESSEQUAL
	.comm	_EXT_TEXTURE_SRGB_DECODE,8,3    ## @EXT_TEXTURE_SRGB_DECODE
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_GL_TEXTURE_RECTANGLE_ARB,8,3   ## @GL_TEXTURE_RECTANGLE_ARB
L_.str.4:                               ## @.str.4
	.asciz	"Setting GL_TEXTURE_MAX_LEVEL to %u.\n"

	.comm	_GL_TEXTURE_MAX_LEVEL,4,2       ## @GL_TEXTURE_MAX_LEVEL
L_.str.5:                               ## @.str.5
	.asciz	"glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, texture->level_count)"

	.comm	_GL_TEXTURE_CUBE_MAP_ARB,8,3    ## @GL_TEXTURE_CUBE_MAP_ARB
	.comm	_GL_TEXTURE_WRAP_S,4,2          ## @GL_TEXTURE_WRAP_S
	.comm	_GL_CLAMP_TO_EDGE,4,2           ## @GL_CLAMP_TO_EDGE
	.comm	_GL_TEXTURE_WRAP_T,4,2          ## @GL_TEXTURE_WRAP_T
	.comm	_GL_TEXTURE_WRAP_R,4,2          ## @GL_TEXTURE_WRAP_R
	.comm	_WINED3D_TEXTURE_COND_NP2,4,2   ## @WINED3D_TEXTURE_COND_NP2
	.comm	_GL_TEXTURE_MIN_FILTER,4,2      ## @GL_TEXTURE_MIN_FILTER
	.comm	_GL_NEAREST,4,2                 ## @GL_NEAREST
	.comm	_GL_TEXTURE_MAG_FILTER,4,2      ## @GL_TEXTURE_MAG_FILTER
L_.str.6:                               ## @.str.6
	.asciz	"glTexParameteri"

	.comm	_WINED3D_TADDRESS_CLAMP,8,3     ## @WINED3D_TADDRESS_CLAMP
	.comm	_WINED3D_TEXF_NONE,8,3          ## @WINED3D_TEXF_NONE
	.comm	_WINED3D_GL_LEGACY_CONTEXT,8,3  ## @WINED3D_GL_LEGACY_CONTEXT
	.comm	_ARB_DEPTH_TEXTURE,8,3          ## @ARB_DEPTH_TEXTURE
	.comm	_GL_DEPTH_TEXTURE_MODE_ARB,4,2  ## @GL_DEPTH_TEXTURE_MODE_ARB
	.comm	_GL_INTENSITY,4,2               ## @GL_INTENSITY
L_.str.7:                               ## @.str.7
	.asciz	"glTexParameteri(GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY)"

	.section	__TEXT,__const
	.p2align	4                               ## @wined3d_texture_bind.swizzle_source
_wined3d_texture_bind.swizzle_source:
	.quad	128                             ## 0x80
	.quad	130                             ## 0x82
	.quad	129                             ## 0x81
	.quad	131                             ## 0x83
	.quad	132                             ## 0x84
	.quad	133                             ## 0x85

	.comm	_GL_TEXTURE_SWIZZLE_RGBA,4,2    ## @GL_TEXTURE_SWIZZLE_RGBA
	.section	__TEXT,__cstring,cstring_literals
L_.str.8:                               ## @.str.8
	.asciz	"glTexParameteriv(GL_TEXTURE_SWIZZLE_RGBA)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function wined3d_texture_bind
lCPI0_0:
	.long	0x00000000                      ; float 0
	.long	0xc47a0000                      ; float -1000
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_wined3d_texture_bind
	.p2align	2
_wined3d_texture_bind:                  ; @wined3d_texture_bind
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x24, x1
	mov	x23, x0
	ldr	x19, [x1]
	ldr	x20, [x0, #24]
	ldr	x9, [x20]
	ldp	x8, x22, [x20, #8]
	stp	x9, x8, [sp, #24]               ; 16-byte Folded Spill
	ldr	x28, [x20, #24]
	stp	x1, x2, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_TRACE
	mov	x0, x24
	mov	x1, x23
	bl	_needs_separate_srgb_gl_texture
Lloh2:
	adrp	x27, _FALSE@GOTPAGE
Lloh3:
	ldr	x27, [x27, _FALSE@GOTPAGEOFF]
	ldr	x8, [x27]
	cmp	w0, #0
	csel	x25, x8, x21, eq
Lloh4:
	adrp	x8, _WINED3D_TEXTURE_IS_SRGB@GOTPAGE
Lloh5:
	ldr	x8, [x8, _WINED3D_TEXTURE_IS_SRGB@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	x22, [sp, #40]                  ; 8-byte Folded Spill
	cbz	x25, LBB0_2
; %bb.1:
	ldr	w9, [x23]
	orr	w8, w9, w8
	b	LBB0_3
LBB0_2:
	ldr	w9, [x23]
	bic	w8, w9, w8
LBB0_3:
	str	w8, [x23]
	mov	x0, x23
	mov	x1, x25
	bl	_wined3d_texture_get_gl_texture
	ldr	x21, [x23, #8]
	mov	x26, x0
	ldr	w2, [x26, #96]!
	cbz	w2, LBB0_5
; %bb.4:
	mov	x0, x24
	mov	x1, x21
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	b	_context_bind_texture
LBB0_5:
	mov	x22, x0
	ldr	x8, [x19, #16]
	mov	w0, #1
	mov	x1, x26
	blr	x8
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_checkGLcall
	ldrsw	x1, [x26]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TRACE
	ldr	w8, [x26]
	cbz	w8, LBB0_19
; %bb.6:
Lloh11:
	adrp	x8, _WINED3D_TADDRESS_WRAP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WINED3D_TADDRESS_WRAP@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	stp	x8, x8, [x22, #40]
	str	x8, [x22, #88]
	ldr	w0, [x22, #80]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh14:
	adrp	x8, _WINED3D_TEXF_LINEAR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WINED3D_TEXF_LINEAR@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x26, _WINED3D_TEXF_POINT@GOTPAGE
Lloh18:
	ldr	x26, [x26, _WINED3D_TEXF_POINT@GOTPAGEOFF]
	ldr	x9, [x26]
	stp	x9, x8, [x22, #24]
Lloh19:
	adrp	x9, lCPI0_0@PAGE
Lloh20:
	ldr	d0, [x9, lCPI0_0@PAGEOFF]
	str	d0, [x22]
	mov	x9, #1148846080
	movk	x9, #1, lsl #32
	stp	x9, x8, [x22, #8]
	ldr	x8, [x27]
Lloh21:
	adrp	x9, _WINED3D_CMP_LESSEQUAL@GOTPAGE
Lloh22:
	ldr	x9, [x9, _WINED3D_CMP_LESSEQUAL@GOTPAGEOFF]
	str	x8, [x22, #72]
Lloh23:
	ldr	w8, [x9]
	str	w8, [x22, #64]
	ldr	x8, [x24]
Lloh24:
	adrp	x9, _EXT_TEXTURE_SRGB_DECODE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _EXT_TEXTURE_SRGB_DECODE@GOTPAGEOFF]
	ldr	x8, [x8, #24]
Lloh26:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
Lloh27:
	adrp	x9, _TRUE@GOTPAGE
Lloh28:
	ldr	x9, [x9, _TRUE@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, #0
	csel	x8, x25, x9, eq
	str	x8, [x22, #56]
	str	xzr, [x22, #104]
	mov	x0, x23
	bl	_wined3d_texture_set_dirty
	ldr	w2, [x22, #96]
	mov	x0, x24
	mov	x1, x21
	bl	_context_bind_texture
Lloh30:
	adrp	x8, _GL_TEXTURE_RECTANGLE_ARB@GOTPAGE
Lloh31:
	ldr	x8, [x8, _GL_TEXTURE_RECTANGLE_ARB@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	cmp	x21, x8
	b.eq	LBB0_8
; %bb.7:
	ldrsw	x8, [x23, #16]
	sub	x1, x8, #1
Lloh33:
	adrp	x0, l_.str.4@PAGE
Lloh34:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_TRACE
	ldr	x8, [x19, #8]
Lloh35:
	adrp	x9, _GL_TEXTURE_MAX_LEVEL@GOTPAGE
Lloh36:
	ldr	x9, [x9, _GL_TEXTURE_MAX_LEVEL@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x9]
	ldr	w9, [x23, #16]
	sub	w2, w9, #1
	mov	x0, x21
	blr	x8
Lloh38:
	adrp	x0, l_.str.5@PAGE
Lloh39:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_checkGLcall
LBB0_8:
Lloh40:
	adrp	x8, _GL_TEXTURE_CUBE_MAP_ARB@GOTPAGE
Lloh41:
	ldr	x8, [x8, _GL_TEXTURE_CUBE_MAP_ARB@GOTPAGEOFF]
Lloh42:
	adrp	x27, _GL_TEXTURE_WRAP_S@GOTPAGE
Lloh43:
	ldr	x27, [x27, _GL_TEXTURE_WRAP_S@GOTPAGEOFF]
Lloh44:
	ldr	x8, [x8]
Lloh45:
	adrp	x24, _GL_CLAMP_TO_EDGE@GOTPAGE
Lloh46:
	ldr	x24, [x24, _GL_CLAMP_TO_EDGE@GOTPAGEOFF]
Lloh47:
	adrp	x25, _GL_TEXTURE_WRAP_T@GOTPAGE
Lloh48:
	ldr	x25, [x25, _GL_TEXTURE_WRAP_T@GOTPAGEOFF]
	cmp	x21, x8
	b.ne	LBB0_10
; %bb.9:
	ldr	x8, [x19, #8]
	ldr	w1, [x27]
	ldr	w2, [x24]
	mov	x0, x21
	blr	x8
	ldr	x8, [x19, #8]
	ldr	w1, [x25]
	ldr	w2, [x24]
	mov	x0, x21
	blr	x8
	ldr	x8, [x19, #8]
Lloh49:
	adrp	x9, _GL_TEXTURE_WRAP_R@GOTPAGE
Lloh50:
	ldr	x9, [x9, _GL_TEXTURE_WRAP_R@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x9]
	ldr	w2, [x24]
	mov	x0, x21
	blr	x8
LBB0_10:
	ldr	w8, [x23]
Lloh52:
	adrp	x9, _WINED3D_TEXTURE_COND_NP2@GOTPAGE
Lloh53:
	ldr	x9, [x9, _WINED3D_TEXTURE_COND_NP2@GOTPAGEOFF]
Lloh54:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	ldr	x8, [x19, #8]
	ldr	w1, [x27]
	ldr	w2, [x24]
	mov	x0, x21
	blr	x8
	ldr	x8, [x19, #8]
	ldr	w1, [x25]
	ldr	w2, [x24]
	mov	x0, x21
	blr	x8
	ldr	x8, [x19, #8]
Lloh55:
	adrp	x9, _GL_TEXTURE_MIN_FILTER@GOTPAGE
Lloh56:
	ldr	x9, [x9, _GL_TEXTURE_MIN_FILTER@GOTPAGEOFF]
Lloh57:
	ldr	w1, [x9]
Lloh58:
	adrp	x23, _GL_NEAREST@GOTPAGE
Lloh59:
	ldr	x23, [x23, _GL_NEAREST@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x21
	blr	x8
	ldr	x8, [x19, #8]
Lloh60:
	adrp	x9, _GL_TEXTURE_MAG_FILTER@GOTPAGE
Lloh61:
	ldr	x9, [x9, _GL_TEXTURE_MAG_FILTER@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x9]
	ldr	w2, [x23]
	mov	x0, x21
	blr	x8
Lloh63:
	adrp	x0, l_.str.6@PAGE
Lloh64:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_checkGLcall
Lloh65:
	adrp	x8, _WINED3D_TADDRESS_CLAMP@GOTPAGE
Lloh66:
	ldr	x8, [x8, _WINED3D_TADDRESS_CLAMP@GOTPAGEOFF]
Lloh67:
	ldr	x8, [x8]
	stp	x8, x8, [x22, #40]
	ldr	x9, [x26]
	str	x9, [x22, #32]
Lloh68:
	adrp	x8, _WINED3D_TEXF_NONE@GOTPAGE
Lloh69:
	ldr	x8, [x8, _WINED3D_TEXF_NONE@GOTPAGEOFF]
Lloh70:
	ldr	x8, [x8]
	stp	x8, x9, [x22, #16]
LBB0_12:
	ldr	x8, [x19, #24]
Lloh71:
	adrp	x9, _WINED3D_GL_LEGACY_CONTEXT@GOTPAGE
Lloh72:
	ldr	x9, [x9, _WINED3D_GL_LEGACY_CONTEXT@GOTPAGEOFF]
Lloh73:
	ldr	x9, [x9]
	ldr	x9, [x8, x9, lsl #3]
	cbz	x9, LBB0_15
; %bb.13:
Lloh74:
	adrp	x9, _ARB_DEPTH_TEXTURE@GOTPAGE
Lloh75:
	ldr	x9, [x9, _ARB_DEPTH_TEXTURE@GOTPAGEOFF]
Lloh76:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_15
; %bb.14:
	ldr	x8, [x19, #8]
Lloh77:
	adrp	x9, _GL_DEPTH_TEXTURE_MODE_ARB@GOTPAGE
Lloh78:
	ldr	x9, [x9, _GL_DEPTH_TEXTURE_MODE_ARB@GOTPAGEOFF]
Lloh79:
	ldr	w1, [x9]
Lloh80:
	adrp	x9, _GL_INTENSITY@GOTPAGE
Lloh81:
	ldr	x9, [x9, _GL_INTENSITY@GOTPAGEOFF]
Lloh82:
	ldr	w2, [x9]
	mov	x0, x21
	blr	x8
Lloh83:
	adrp	x0, l_.str.7@PAGE
Lloh84:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_checkGLcall
LBB0_15:
	ldp	x24, x23, [sp, #24]             ; 16-byte Folded Reload
	stp	x24, x23, [sp, #48]
	ldr	x22, [sp, #40]                  ; 8-byte Folded Reload
	stp	x22, x28, [sp, #64]
	add	x0, sp, #48
	bl	_is_identity_fixup
	cbnz	w0, LBB0_18
; %bb.16:
	mov	x0, x19
	mov	x1, x20
	bl	_can_use_texture_swizzle
	cbz	x0, LBB0_18
; %bb.17:
Lloh85:
	adrp	x8, _wined3d_texture_bind.swizzle_source@PAGE
Lloh86:
	add	x8, x8, _wined3d_texture_bind.swizzle_source@PAGEOFF
	ldr	x9, [x8, x24, lsl #3]
	ldr	x10, [x8, x23, lsl #3]
	stp	x9, x10, [sp, #48]
	ldr	x9, [x8, x22, lsl #3]
	ldr	x8, [x8, x28, lsl #3]
	stp	x9, x8, [sp, #64]
	ldr	x8, [x19]
Lloh87:
	adrp	x9, _GL_TEXTURE_SWIZZLE_RGBA@GOTPAGE
Lloh88:
	ldr	x9, [x9, _GL_TEXTURE_SWIZZLE_RGBA@GOTPAGEOFF]
Lloh89:
	ldr	w1, [x9]
	add	x2, sp, #48
	mov	x0, x21
	blr	x8
Lloh90:
	adrp	x0, l_.str.8@PAGE
Lloh91:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_checkGLcall
LBB0_18:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_19:
Lloh92:
	adrp	x0, l_.str.3@PAGE
Lloh93:
	add	x0, x0, l_.str.3@PAGEOFF
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	b	_ERR
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdr	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh44
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpAdd	Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpAdd	Lloh83, Lloh84
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpAdd	Lloh90, Lloh91
	.loh AdrpLdrGotLdr	Lloh87, Lloh88, Lloh89
	.loh AdrpAdd	Lloh85, Lloh86
	.loh AdrpAdd	Lloh92, Lloh93
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"texture %p, context %p, srgb %#x.\n"

	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_WINED3D_TEXTURE_IS_SRGB,4,2    ; @WINED3D_TEXTURE_IS_SRGB
l_.str.1:                               ; @.str.1
	.asciz	"glGenTextures"

l_.str.2:                               ; @.str.2
	.asciz	"Generated texture %d.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to generate a texture name.\n"

	.comm	_WINED3D_TADDRESS_WRAP,8,3      ; @WINED3D_TADDRESS_WRAP
	.comm	_WINED3D_TEXF_LINEAR,8,3        ; @WINED3D_TEXF_LINEAR
	.comm	_WINED3D_TEXF_POINT,8,3         ; @WINED3D_TEXF_POINT
	.comm	_WINED3D_CMP_LESSEQUAL,4,2      ; @WINED3D_CMP_LESSEQUAL
	.comm	_EXT_TEXTURE_SRGB_DECODE,8,3    ; @EXT_TEXTURE_SRGB_DECODE
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_GL_TEXTURE_RECTANGLE_ARB,8,3   ; @GL_TEXTURE_RECTANGLE_ARB
l_.str.4:                               ; @.str.4
	.asciz	"Setting GL_TEXTURE_MAX_LEVEL to %u.\n"

	.comm	_GL_TEXTURE_MAX_LEVEL,4,2       ; @GL_TEXTURE_MAX_LEVEL
l_.str.5:                               ; @.str.5
	.asciz	"glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, texture->level_count)"

	.comm	_GL_TEXTURE_CUBE_MAP_ARB,8,3    ; @GL_TEXTURE_CUBE_MAP_ARB
	.comm	_GL_TEXTURE_WRAP_S,4,2          ; @GL_TEXTURE_WRAP_S
	.comm	_GL_CLAMP_TO_EDGE,4,2           ; @GL_CLAMP_TO_EDGE
	.comm	_GL_TEXTURE_WRAP_T,4,2          ; @GL_TEXTURE_WRAP_T
	.comm	_GL_TEXTURE_WRAP_R,4,2          ; @GL_TEXTURE_WRAP_R
	.comm	_WINED3D_TEXTURE_COND_NP2,4,2   ; @WINED3D_TEXTURE_COND_NP2
	.comm	_GL_TEXTURE_MIN_FILTER,4,2      ; @GL_TEXTURE_MIN_FILTER
	.comm	_GL_NEAREST,4,2                 ; @GL_NEAREST
	.comm	_GL_TEXTURE_MAG_FILTER,4,2      ; @GL_TEXTURE_MAG_FILTER
l_.str.6:                               ; @.str.6
	.asciz	"glTexParameteri"

	.comm	_WINED3D_TADDRESS_CLAMP,8,3     ; @WINED3D_TADDRESS_CLAMP
	.comm	_WINED3D_TEXF_NONE,8,3          ; @WINED3D_TEXF_NONE
	.comm	_WINED3D_GL_LEGACY_CONTEXT,8,3  ; @WINED3D_GL_LEGACY_CONTEXT
	.comm	_ARB_DEPTH_TEXTURE,8,3          ; @ARB_DEPTH_TEXTURE
	.comm	_GL_DEPTH_TEXTURE_MODE_ARB,4,2  ; @GL_DEPTH_TEXTURE_MODE_ARB
	.comm	_GL_INTENSITY,4,2               ; @GL_INTENSITY
l_.str.7:                               ; @.str.7
	.asciz	"glTexParameteri(GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY)"

	.section	__TEXT,__const
	.p2align	3                               ; @wined3d_texture_bind.swizzle_source
_wined3d_texture_bind.swizzle_source:
	.quad	128                             ; 0x80
	.quad	130                             ; 0x82
	.quad	129                             ; 0x81
	.quad	131                             ; 0x83
	.quad	132                             ; 0x84
	.quad	133                             ; 0x85

	.comm	_GL_TEXTURE_SWIZZLE_RGBA,4,2    ; @GL_TEXTURE_SWIZZLE_RGBA
	.section	__TEXT,__cstring,cstring_literals
l_.str.8:                               ; @.str.8
	.asciz	"glTexParameteriv(GL_TEXTURE_SWIZZLE_RGBA)"

.subsections_via_symbols
