	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function buffer_destroy_buffer_object
_buffer_destroy_buffer_object:          ## @buffer_destroy_buffer_object
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 16(%rdi)
	je	LBB0_14
## %bb.1:
	movq	%rdi, %rbx
	leaq	16(%rdi), %r14
	cmpq	$0, 32(%rdi)
	je	LBB0_11
## %bb.2:
	movq	%rsi, %r15
	movl	(%rbx), %eax
	movq	_WINED3D_BIND_VERTEX_BUFFER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movl	24(%rbx), %edi
	movq	_STATE_STREAMSRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_device_invalidate_state
	movl	(%rbx), %eax
LBB0_4:
	movq	_WINED3D_BIND_INDEX_BUFFER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	movl	24(%rbx), %edi
	movq	_STATE_INDEXBUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_device_invalidate_state
	movl	(%rbx), %eax
LBB0_6:
	movq	_WINED3D_BIND_CONSTANT_BUFFER@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movl	24(%rbx), %r12d
	movq	_WINED3D_SHADER_TYPE_VERTEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STATE_CONSTANT_BUFFER
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_device_invalidate_state
	movl	24(%rbx), %r12d
	movq	_WINED3D_SHADER_TYPE_HULL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STATE_CONSTANT_BUFFER
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_device_invalidate_state
	movl	24(%rbx), %r12d
	movq	_WINED3D_SHADER_TYPE_DOMAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STATE_CONSTANT_BUFFER
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_device_invalidate_state
	movl	24(%rbx), %r12d
	movq	_WINED3D_SHADER_TYPE_GEOMETRY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STATE_CONSTANT_BUFFER
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_device_invalidate_state
	movl	24(%rbx), %r12d
	movq	_WINED3D_SHADER_TYPE_PIXEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STATE_CONSTANT_BUFFER
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_device_invalidate_state
	movl	24(%rbx), %r12d
	movq	_WINED3D_SHADER_TYPE_COMPUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_STATE_CONSTANT_BUFFER
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_device_invalidate_state
	movl	(%rbx), %eax
LBB0_8:
	movq	_WINED3D_BIND_STREAM_OUTPUT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.9:
	movl	24(%rbx), %edi
	movq	_STATE_STREAM_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_device_invalidate_state
	cmpq	$0, (%r15)
	je	LBB0_11
## %bb.10:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_WARN
	movq	%r15, %rdi
	callq	_context_end_transform_feedback
LBB0_11:
	movl	$1, %edi
	movq	%r14, %rsi
	callq	_glDeleteBuffers
	movl	%eax, %edi
	callq	_GL_EXTCALL
	leaq	L_.str.1(%rip), %rdi
	callq	_checkGLcall
	movq	$0, 16(%rbx)
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	callq	_wined3d_fence_destroy
	movq	$0, 8(%rbx)
LBB0_13:
	movq	_WINED3D_BUFFER_APPLESYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 4(%rbx)
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WINED3D_BIND_VERTEX_BUFFER,4,2 ## @WINED3D_BIND_VERTEX_BUFFER
	.comm	_STATE_STREAMSRC,4,2            ## @STATE_STREAMSRC
	.comm	_WINED3D_BIND_INDEX_BUFFER,4,2  ## @WINED3D_BIND_INDEX_BUFFER
	.comm	_STATE_INDEXBUFFER,4,2          ## @STATE_INDEXBUFFER
	.comm	_WINED3D_BIND_CONSTANT_BUFFER,4,2 ## @WINED3D_BIND_CONSTANT_BUFFER
	.comm	_WINED3D_SHADER_TYPE_VERTEX,4,2 ## @WINED3D_SHADER_TYPE_VERTEX
	.comm	_WINED3D_SHADER_TYPE_HULL,4,2   ## @WINED3D_SHADER_TYPE_HULL
	.comm	_WINED3D_SHADER_TYPE_DOMAIN,4,2 ## @WINED3D_SHADER_TYPE_DOMAIN
	.comm	_WINED3D_SHADER_TYPE_GEOMETRY,4,2 ## @WINED3D_SHADER_TYPE_GEOMETRY
	.comm	_WINED3D_SHADER_TYPE_PIXEL,4,2  ## @WINED3D_SHADER_TYPE_PIXEL
	.comm	_WINED3D_SHADER_TYPE_COMPUTE,4,2 ## @WINED3D_SHADER_TYPE_COMPUTE
	.comm	_WINED3D_BIND_STREAM_OUTPUT,4,2 ## @WINED3D_BIND_STREAM_OUTPUT
	.comm	_STATE_STREAM_OUTPUT,4,2        ## @STATE_STREAM_OUTPUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Deleting buffer object for buffer %p, disabling transform feedback.\n"

L_.str.1:                               ## @.str.1
	.asciz	"glDeleteBuffers"

	.comm	_WINED3D_BUFFER_APPLESYNC,4,2   ## @WINED3D_BUFFER_APPLESYNC
	.no_dead_strip	_buffer_destroy_buffer_object
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function buffer_destroy_buffer_object
_buffer_destroy_buffer_object:          ; @buffer_destroy_buffer_object
	.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	x20, x0
	ldr	x8, [x20, #16]!
	cbz	x8, LBB0_14
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_11
; %bb.2:
	mov	x21, x1
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _WINED3D_BIND_VERTEX_BUFFER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WINED3D_BIND_VERTEX_BUFFER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x19, #24]
Lloh3:
	adrp	x8, _STATE_STREAMSRC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STATE_STREAMSRC@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_device_invalidate_state
	ldr	w8, [x19]
LBB0_4:
Lloh6:
	adrp	x9, _WINED3D_BIND_INDEX_BUFFER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WINED3D_BIND_INDEX_BUFFER@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x19, #24]
Lloh9:
	adrp	x8, _STATE_INDEXBUFFER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STATE_INDEXBUFFER@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_device_invalidate_state
	ldr	w8, [x19]
LBB0_6:
Lloh12:
	adrp	x9, _WINED3D_BIND_CONSTANT_BUFFER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _WINED3D_BIND_CONSTANT_BUFFER@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	ldr	w22, [x19, #24]
Lloh15:
	adrp	x8, _WINED3D_SHADER_TYPE_VERTEX@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WINED3D_SHADER_TYPE_VERTEX@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_STATE_CONSTANT_BUFFER
	mov	x1, x0
	mov	x0, x22
	bl	_device_invalidate_state
	ldr	w22, [x19, #24]
Lloh18:
	adrp	x8, _WINED3D_SHADER_TYPE_HULL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WINED3D_SHADER_TYPE_HULL@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_STATE_CONSTANT_BUFFER
	mov	x1, x0
	mov	x0, x22
	bl	_device_invalidate_state
	ldr	w22, [x19, #24]
Lloh21:
	adrp	x8, _WINED3D_SHADER_TYPE_DOMAIN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WINED3D_SHADER_TYPE_DOMAIN@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_STATE_CONSTANT_BUFFER
	mov	x1, x0
	mov	x0, x22
	bl	_device_invalidate_state
	ldr	w22, [x19, #24]
Lloh24:
	adrp	x8, _WINED3D_SHADER_TYPE_GEOMETRY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _WINED3D_SHADER_TYPE_GEOMETRY@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_STATE_CONSTANT_BUFFER
	mov	x1, x0
	mov	x0, x22
	bl	_device_invalidate_state
	ldr	w22, [x19, #24]
Lloh27:
	adrp	x8, _WINED3D_SHADER_TYPE_PIXEL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _WINED3D_SHADER_TYPE_PIXEL@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_STATE_CONSTANT_BUFFER
	mov	x1, x0
	mov	x0, x22
	bl	_device_invalidate_state
	ldr	w22, [x19, #24]
Lloh30:
	adrp	x8, _WINED3D_SHADER_TYPE_COMPUTE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _WINED3D_SHADER_TYPE_COMPUTE@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_STATE_CONSTANT_BUFFER
	mov	x1, x0
	mov	x0, x22
	bl	_device_invalidate_state
	ldr	w8, [x19]
LBB0_8:
Lloh33:
	adrp	x9, _WINED3D_BIND_STREAM_OUTPUT@GOTPAGE
Lloh34:
	ldr	x9, [x9, _WINED3D_BIND_STREAM_OUTPUT@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.9:
	ldr	w0, [x19, #24]
Lloh36:
	adrp	x8, _STATE_STREAM_OUTPUT@GOTPAGE
Lloh37:
	ldr	x8, [x8, _STATE_STREAM_OUTPUT@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	bl	_device_invalidate_state
	ldr	x8, [x21]
	cbz	x8, LBB0_11
; %bb.10:
Lloh39:
	adrp	x0, l_.str@PAGE
Lloh40:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_WARN
	mov	x0, x21
	bl	_context_end_transform_feedback
LBB0_11:
	mov	w0, #1
	mov	x1, x20
	bl	_glDeleteBuffers
	bl	_GL_EXTCALL
Lloh41:
	adrp	x0, l_.str.1@PAGE
Lloh42:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_checkGLcall
	str	xzr, [x19, #16]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_13
; %bb.12:
	bl	_wined3d_fence_destroy
	str	xzr, [x19, #8]
LBB0_13:
Lloh43:
	adrp	x8, _WINED3D_BUFFER_APPLESYNC@GOTPAGE
Lloh44:
	ldr	x8, [x8, _WINED3D_BUFFER_APPLESYNC@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
	str	w8, [x19, #4]
LBB0_14:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_WINED3D_BIND_VERTEX_BUFFER,4,2 ; @WINED3D_BIND_VERTEX_BUFFER
	.comm	_STATE_STREAMSRC,4,2            ; @STATE_STREAMSRC
	.comm	_WINED3D_BIND_INDEX_BUFFER,4,2  ; @WINED3D_BIND_INDEX_BUFFER
	.comm	_STATE_INDEXBUFFER,4,2          ; @STATE_INDEXBUFFER
	.comm	_WINED3D_BIND_CONSTANT_BUFFER,4,2 ; @WINED3D_BIND_CONSTANT_BUFFER
	.comm	_WINED3D_SHADER_TYPE_VERTEX,4,2 ; @WINED3D_SHADER_TYPE_VERTEX
	.comm	_WINED3D_SHADER_TYPE_HULL,4,2   ; @WINED3D_SHADER_TYPE_HULL
	.comm	_WINED3D_SHADER_TYPE_DOMAIN,4,2 ; @WINED3D_SHADER_TYPE_DOMAIN
	.comm	_WINED3D_SHADER_TYPE_GEOMETRY,4,2 ; @WINED3D_SHADER_TYPE_GEOMETRY
	.comm	_WINED3D_SHADER_TYPE_PIXEL,4,2  ; @WINED3D_SHADER_TYPE_PIXEL
	.comm	_WINED3D_SHADER_TYPE_COMPUTE,4,2 ; @WINED3D_SHADER_TYPE_COMPUTE
	.comm	_WINED3D_BIND_STREAM_OUTPUT,4,2 ; @WINED3D_BIND_STREAM_OUTPUT
	.comm	_STATE_STREAM_OUTPUT,4,2        ; @STATE_STREAM_OUTPUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Deleting buffer object for buffer %p, disabling transform feedback.\n"

l_.str.1:                               ; @.str.1
	.asciz	"glDeleteBuffers"

	.comm	_WINED3D_BUFFER_APPLESYNC,4,2   ; @WINED3D_BUFFER_APPLESYNC
	.no_dead_strip	_buffer_destroy_buffer_object
.subsections_via_symbols
