	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_context_map_bo_address         ## -- Begin function context_map_bo_address
	.p2align	4, 0x90
_context_map_bo_address:                ## @context_map_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rax
	movq	%rsi, %rbx
	movl	8(%rsi), %edx
	testl	%edx, %edx
	je	LBB0_1
## %bb.2:
	movl	%r8d, %r13d
	movl	%ecx, %r14d
	movq	%rdi, %r15
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r12
	movl	%ecx, %esi
	callq	_context_bind_bo
	movq	(%r12), %rax
	movq	_ARB_MAP_BUFFER_RANGE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_4
## %bb.3:
	movl	%r13d, %edi
	callq	_wined3d_resource_gl_map_flags
	movq	_GL_MAP_FLUSH_EXPLICIT_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%rbx), %esi
	movl	%r14d, %edi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_glMapBufferRange
	movl	%eax, %edi
	callq	_GL_EXTCALL
	movq	%rax, %rbx
	jmp	LBB0_5
LBB0_1:
	movq	(%rbx), %rbx
	jmp	LBB0_6
LBB0_4:
	movl	%r13d, %edi
	callq	_wined3d_resource_gl_legacy_map_flags
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_glMapBuffer
	movl	%eax, %edi
	callq	_GL_EXTCALL
	movslq	(%rbx), %rbx
	addq	%rax, %rbx
LBB0_5:
	movq	%r15, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_context_bind_bo
	leaq	L_.str(%rip), %rdi
	callq	_checkGLcall
LBB0_6:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ARB_MAP_BUFFER_RANGE,8,3       ## @ARB_MAP_BUFFER_RANGE
	.comm	_GL_MAP_FLUSH_EXPLICIT_BIT,4,2  ## @GL_MAP_FLUSH_EXPLICIT_BIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Map buffer object"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_context_map_bo_address         ; -- Begin function context_map_bo_address
	.p2align	2
_context_map_bo_address:                ; @context_map_bo_address
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x2
	mov	x21, x1
	ldr	w2, [x1, #8]
	cbz	w2, LBB0_3
; %bb.1:
	mov	x23, x4
	mov	x19, x3
	mov	x20, x0
	ldr	x24, [x0]
	mov	x1, x3
	bl	_context_bind_bo
	ldr	x8, [x24]
Lloh0:
	adrp	x9, _ARB_MAP_BUFFER_RANGE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ARB_MAP_BUFFER_RANGE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x0, x23
	bl	_wined3d_resource_gl_map_flags
Lloh3:
	adrp	x8, _GL_MAP_FLUSH_EXPLICIT_BIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GL_MAP_FLUSH_EXPLICIT_BIT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	bic	w3, w0, w8
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x22
	bl	_glMapBufferRange
	bl	_GL_EXTCALL
	mov	x21, x0
	b	LBB0_5
LBB0_3:
	ldr	x21, [x21]
	b	LBB0_6
LBB0_4:
	mov	x0, x23
	bl	_wined3d_resource_gl_legacy_map_flags
	mov	x1, x0
	mov	x0, x19
	bl	_glMapBuffer
	bl	_GL_EXTCALL
	ldrsw	x8, [x21]
	add	x21, x0, x8
LBB0_5:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_context_bind_bo
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_checkGLcall
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ARB_MAP_BUFFER_RANGE,8,3       ; @ARB_MAP_BUFFER_RANGE
	.comm	_GL_MAP_FLUSH_EXPLICIT_BIT,4,2  ; @GL_MAP_FLUSH_EXPLICIT_BIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Map buffer object"

.subsections_via_symbols
