	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_buffer_texture
_create_buffer_texture:                 ## @create_buffer_texture
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	(%rsi), %r12
	movq	(%r12), %rax
	movq	_ARB_TEXTURE_BUFFER_OBJECT@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	$0, (%rax,%rdx,8)
	je	LBB0_9
## %bb.1:
	movl	%r8d, %ebx
	movl	16(%r12), %edx
	leal	-1(%rdx), %eax
	testl	%r8d, %eax
	je	LBB0_2
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FIXME                          ## TAILCALL
LBB0_9:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FIXME                          ## TAILCALL
LBB0_2:
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	_WINED3D_LOCATION_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_wined3d_buffer_load_location
	movq	_GL_TEXTURE_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movl	$1, %edi
	movq	%r15, %rsi
	callq	*8(%r12)
	movq	_GL_TEXTURE_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	movq	%r13, %rdi
	callq	_context_bind_texture
	movq	(%r12), %rax
	movq	_ARB_TEXTURE_BUFFER_RANGE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_4
## %bb.3:
	movq	_GL_TEXTURE_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movl	(%r14), %edx
	movl	%ebx, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_glTexBufferRange
	jmp	LBB0_8
LBB0_4:
	movq	_GL_TEXTURE_BUFFER@GOTPCREL(%rip), %r15
	testl	%ebx, %ebx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jne	LBB0_6
## %bb.5:
	cmpl	%eax, 4(%r14)
	je	LBB0_7
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_FIXME
LBB0_7:
	movl	(%r15), %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movl	(%r14), %edx
	callq	_glTexBuffer
LBB0_8:
	movl	%eax, %edi
	callq	_GL_EXTCALL
	leaq	L_.str.3(%rip), %rdi
	callq	_checkGLcall
	movq	_STATE_COMPUTE_SHADER_RESOURCE_BINDING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_context_invalidate_compute_state
	movq	_STATE_GRAPHICS_SHADER_RESOURCE_BINDING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_context_invalidate_state       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ARB_TEXTURE_BUFFER_OBJECT,8,3  ## @ARB_TEXTURE_BUFFER_OBJECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OpenGL implementation does not support buffer textures.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Buffer offset %u is not %u byte aligned.\n"

	.comm	_WINED3D_LOCATION_BUFFER,4,2    ## @WINED3D_LOCATION_BUFFER
	.comm	_GL_TEXTURE_BUFFER,4,2          ## @GL_TEXTURE_BUFFER
	.comm	_ARB_TEXTURE_BUFFER_RANGE,8,3   ## @ARB_TEXTURE_BUFFER_RANGE
L_.str.2:                               ## @.str.2
	.asciz	"OpenGL implementation does not support ARB_texture_buffer_range.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Create buffer texture"

	.comm	_STATE_COMPUTE_SHADER_RESOURCE_BINDING,4,2 ## @STATE_COMPUTE_SHADER_RESOURCE_BINDING
	.comm	_STATE_GRAPHICS_SHADER_RESOURCE_BINDING,4,2 ## @STATE_GRAPHICS_SHADER_RESOURCE_BINDING
	.no_dead_strip	_create_buffer_texture
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_buffer_texture
_create_buffer_texture:                 ; @create_buffer_texture
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x25, [x1]
	ldr	x8, [x25]
Lloh0:
	adrp	x9, _ARB_TEXTURE_BUFFER_OBJECT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ARB_TEXTURE_BUFFER_OBJECT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x22, x4
	ldr	w8, [x25, #16]
	sub	w9, w8, #1
	tst	w9, w4
	b.eq	LBB0_4
; %bb.2:
	stp	x22, x8, [sp]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_3:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_FIXME
LBB0_4:
	mov	x23, x5
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x24, x0
Lloh7:
	adrp	x8, _WINED3D_LOCATION_BUFFER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WINED3D_LOCATION_BUFFER@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_wined3d_buffer_load_location
Lloh10:
	adrp	x26, _GL_TEXTURE_BUFFER@GOTPAGE
Lloh11:
	ldr	x26, [x26, _GL_TEXTURE_BUFFER@GOTPAGEOFF]
	ldr	w8, [x26]
	str	w8, [x24, #4]
	ldr	x8, [x25, #8]
	mov	w0, #1
	mov	x1, x24
	blr	x8
	ldr	w1, [x26]
	ldr	w2, [x24]
	mov	x0, x19
	bl	_context_bind_texture
	ldr	x8, [x25]
Lloh12:
	adrp	x9, _ARB_TEXTURE_BUFFER_RANGE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ARB_TEXTURE_BUFFER_RANGE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w0, [x26]
	ldr	w1, [x21]
	ldr	w2, [x20]
	mov	x3, x22
	mov	x4, x23
	bl	_glTexBufferRange
	b	LBB0_10
LBB0_6:
	cbnz	w22, LBB0_8
; %bb.7:
	ldr	w8, [x20, #4]
	cmp	w8, w23
	b.eq	LBB0_9
LBB0_8:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_FIXME
LBB0_9:
	ldr	w0, [x26]
	ldr	w1, [x21]
	ldr	w2, [x20]
	bl	_glTexBuffer
LBB0_10:
	bl	_GL_EXTCALL
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_checkGLcall
Lloh19:
	adrp	x8, _STATE_COMPUTE_SHADER_RESOURCE_BINDING@GOTPAGE
Lloh20:
	ldr	x8, [x8, _STATE_COMPUTE_SHADER_RESOURCE_BINDING@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_context_invalidate_compute_state
Lloh22:
	adrp	x8, _STATE_GRAPHICS_SHADER_RESOURCE_BINDING@GOTPAGE
Lloh23:
	ldr	x8, [x8, _STATE_GRAPHICS_SHADER_RESOURCE_BINDING@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_context_invalidate_state
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ARB_TEXTURE_BUFFER_OBJECT,8,3  ; @ARB_TEXTURE_BUFFER_OBJECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OpenGL implementation does not support buffer textures.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Buffer offset %u is not %u byte aligned.\n"

	.comm	_WINED3D_LOCATION_BUFFER,4,2    ; @WINED3D_LOCATION_BUFFER
	.comm	_GL_TEXTURE_BUFFER,4,2          ; @GL_TEXTURE_BUFFER
	.comm	_ARB_TEXTURE_BUFFER_RANGE,8,3   ; @ARB_TEXTURE_BUFFER_RANGE
l_.str.2:                               ; @.str.2
	.asciz	"OpenGL implementation does not support ARB_texture_buffer_range.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Create buffer texture"

	.comm	_STATE_COMPUTE_SHADER_RESOURCE_BINDING,4,2 ; @STATE_COMPUTE_SHADER_RESOURCE_BINDING
	.comm	_STATE_GRAPHICS_SHADER_RESOURCE_BINDING,4,2 ; @STATE_GRAPHICS_SHADER_RESOURCE_BINDING
	.no_dead_strip	_create_buffer_texture
.subsections_via_symbols
