	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_context_copy_bo_address        ## -- Begin function context_copy_bo_address
	.p2align	4, 0x90
_context_copy_bo_address:               ## @context_copy_bo_address
	.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
	movl	%r8d, %r12d
	movq	%rcx, %r15
	movl	%edx, %r13d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rsi), %rax
	movq	8(%rcx), %rdx
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.2:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	_ARB_COPY_BUFFER@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_4
## %bb.3:
	movq	_GL_COPY_READ_BUFFER@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	%rdx, %rsi
	movq	%r9, %r13
	callq	_glBindBuffer
	movl	%eax, %edi
	callq	_GL_EXTCALL
	movq	_GL_COPY_WRITE_BUFFER@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	8(%rbx), %rsi
	callq	_glBindBuffer
	movl	%eax, %edi
	callq	_GL_EXTCALL
	movl	(%r14), %edi
	movl	(%r12), %esi
	movl	(%r15), %edx
	movl	(%rbx), %ecx
	movq	%r13, %r8
	callq	_glCopyBufferSubData
	movl	%eax, %edi
	callq	_GL_EXTCALL
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_7
LBB0_5:
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.6:
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	%r9, %r14
	callq	_context_bind_bo
	movl	(%r15), %esi
	movq	(%rbx), %rcx
	movl	%r12d, %edi
	movq	%r14, %rdx
	callq	_glGetBufferSubData
	movl	%eax, %edi
	callq	_GL_EXTCALL
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_7
LBB0_8:
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%rax, %rdx
	movq	%r9, %r14
	callq	_context_bind_bo
	movl	(%rbx), %esi
	movq	(%r15), %rcx
	movl	%r13d, %edi
	movq	%r14, %rdx
	callq	_glBufferSubData
	movl	%eax, %edi
	callq	_GL_EXTCALL
	leaq	L_.str.2(%rip), %rdi
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_checkGLcall                    ## TAILCALL
LBB0_4:
	movq	_WINED3D_MAP_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r9, %rdx
	movl	%r12d, %ecx
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	callq	_context_map_bo_address
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_WINED3D_MAP_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%r13d, %ecx
	callq	_context_map_bo_address
	movq	%rax, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_memcpy
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_context_unmap_bo_address
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_context_unmap_bo_address       ## TAILCALL
LBB0_9:
	movq	(%rbx), %rdi
	movq	(%r15), %rsi
	movq	%r9, %rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memcpy                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ARB_COPY_BUFFER,8,3            ## @ARB_COPY_BUFFER
	.comm	_GL_COPY_READ_BUFFER,4,2        ## @GL_COPY_READ_BUFFER
	.comm	_GL_COPY_WRITE_BUFFER,4,2       ## @GL_COPY_WRITE_BUFFER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"direct buffer copy"

	.comm	_WINED3D_MAP_READ,4,2           ## @WINED3D_MAP_READ
	.comm	_WINED3D_MAP_WRITE,4,2          ## @WINED3D_MAP_WRITE
L_.str.1:                               ## @.str.1
	.asciz	"buffer download"

L_.str.2:                               ## @.str.2
	.asciz	"buffer upload"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_context_copy_bo_address        ; -- Begin function context_copy_bo_address
	.p2align	2
_context_copy_bo_address:               ; @context_copy_bo_address
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x5
	mov	x22, x4
	mov	x20, x3
	mov	x23, x2
	mov	x21, x1
	mov	x24, x0
	ldr	x2, [x1, #8]
	ldr	x8, [x3, #8]
	cbz	x2, LBB0_4
; %bb.1:
	cbz	x8, LBB0_6
; %bb.2:
	ldr	x9, [x24]
	ldr	x9, [x9]
Lloh0:
	adrp	x10, _ARB_COPY_BUFFER@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ARB_COPY_BUFFER@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
	cbz	x9, LBB0_8
; %bb.3:
Lloh3:
	adrp	x22, _GL_COPY_READ_BUFFER@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GL_COPY_READ_BUFFER@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x8
	bl	_glBindBuffer
	bl	_GL_EXTCALL
Lloh5:
	adrp	x23, _GL_COPY_WRITE_BUFFER@GOTPAGE
Lloh6:
	ldr	x23, [x23, _GL_COPY_WRITE_BUFFER@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	x1, [x21, #8]
	bl	_glBindBuffer
	bl	_GL_EXTCALL
	ldr	w0, [x22]
	ldr	w1, [x23]
	ldr	w2, [x20]
	ldr	w3, [x21]
	mov	x4, x19
	bl	_glCopyBufferSubData
	bl	_GL_EXTCALL
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_4:
	cbz	x8, LBB0_9
; %bb.5:
	mov	x0, x24
	mov	x1, x22
	mov	x2, x8
	bl	_context_bind_bo
	ldr	w1, [x20]
	ldr	x3, [x21]
	mov	x0, x22
	mov	x2, x19
	bl	_glGetBufferSubData
	bl	_GL_EXTCALL
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
	mov	x0, x24
	mov	x1, x23
	bl	_context_bind_bo
	ldr	w1, [x21]
	ldr	x3, [x20]
	mov	x0, x23
	mov	x2, x19
	bl	_glBufferSubData
	bl	_GL_EXTCALL
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_checkGLcall
LBB0_8:
Lloh13:
	adrp	x8, _WINED3D_MAP_READ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WINED3D_MAP_READ@GOTPAGEOFF]
Lloh15:
	ldr	w4, [x8]
	mov	x0, x24
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	bl	_context_map_bo_address
	mov	x25, x0
Lloh16:
	adrp	x8, _WINED3D_MAP_WRITE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WINED3D_MAP_WRITE@GOTPAGEOFF]
Lloh18:
	ldr	w4, [x8]
	mov	x0, x24
	mov	x1, x21
	mov	x2, x19
	mov	x3, x23
	bl	_context_map_bo_address
	mov	x1, x25
	mov	x2, x19
	bl	_memcpy
	mov	x0, x24
	mov	x1, x21
	mov	x2, x23
	bl	_context_unmap_bo_address
	mov	x0, x24
	mov	x1, x20
	mov	x2, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_context_unmap_bo_address
LBB0_9:
	ldr	x0, [x21]
	ldr	x1, [x20]
	mov	x2, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_memcpy
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ARB_COPY_BUFFER,8,3            ; @ARB_COPY_BUFFER
	.comm	_GL_COPY_READ_BUFFER,4,2        ; @GL_COPY_READ_BUFFER
	.comm	_GL_COPY_WRITE_BUFFER,4,2       ; @GL_COPY_WRITE_BUFFER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"direct buffer copy"

	.comm	_WINED3D_MAP_READ,4,2           ; @WINED3D_MAP_READ
	.comm	_WINED3D_MAP_WRITE,4,2          ; @WINED3D_MAP_WRITE
l_.str.1:                               ; @.str.1
	.asciz	"buffer download"

l_.str.2:                               ; @.str.2
	.asciz	"buffer upload"

.subsections_via_symbols
