	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wined3d_caps_gl_ctx_create_attribs
_wined3d_caps_gl_ctx_create_attribs:    ## @wined3d_caps_gl_ctx_create_attribs
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_wglGetProcAddress
	movq	%rax, (%rbx)
	movq	_TRUE@GOTPCREL(%rip), %r12
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_context_create_wgl_attribs
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	%eax, %r15d
	movl	4(%r14), %edi
	movl	%eax, %esi
	callq	_wglMakeCurrent
	testl	%eax, %eax
	je	LBB0_4
## %bb.7:
	movl	(%r14), %edi
	callq	_wglDeleteContext
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	callq	_ERR
LBB0_9:
	movl	%r15d, (%r14)
	jmp	LBB0_10
LBB0_2:
	movq	$0, (%rbx)
	movq	_FALSE@GOTPCREL(%rip), %r12
	jmp	LBB0_10
LBB0_4:
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_ERR
	movl	%r15d, %edi
	callq	_wglDeleteContext
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_ERR
LBB0_6:
	movq	$0, (%rbx)
LBB0_10:
	movl	(%r12), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wglCreateContextAttribsARB"

	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_FALSE,4,2                      ## @FALSE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to make new context current, last error %#x.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to delete new context, last error %#x.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to delete old context, last error %#x.\n"

	.no_dead_strip	_wined3d_caps_gl_ctx_create_attribs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wined3d_caps_gl_ctx_create_attribs
_wined3d_caps_gl_ctx_create_attribs:    ; @wined3d_caps_gl_ctx_create_attribs
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_wglGetProcAddress
	str	x0, [x19]
	cbz	x0, LBB0_10
; %bb.1:
	ldr	w1, [x20, #4]
	mov	x0, x19
	mov	x2, #0
	bl	_context_create_wgl_attribs
	cbz	w0, LBB0_6
; %bb.2:
	mov	x21, x0
	ldr	w0, [x20, #4]
	mov	x1, x21
	bl	_wglMakeCurrent
	cbz	w0, LBB0_7
; %bb.3:
	ldr	w0, [x20]
	bl	_wglDeleteContext
	cbnz	w0, LBB0_5
; %bb.4:
	bl	_GetLastError
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str.3@PAGE
Lloh3:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ERR
LBB0_5:
	str	w21, [x20]
	b	LBB0_10
LBB0_6:
	str	xzr, [x19]
Lloh4:
	adrp	x8, _FALSE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
	bl	_GetLastError
	mov	x1, x0
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	mov	x0, x21
	bl	_wglDeleteContext
	cbnz	w0, LBB0_9
; %bb.8:
	bl	_GetLastError
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ERR
LBB0_9:
	str	xzr, [x19]
LBB0_10:
Lloh10:
	adrp	x8, _TRUE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wglCreateContextAttribsARB"

	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_FALSE,4,2                      ; @FALSE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to make new context current, last error %#x.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to delete new context, last error %#x.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to delete old context, last error %#x.\n"

	.no_dead_strip	_wined3d_caps_gl_ctx_create_attribs
.subsections_via_symbols
