	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function context_update_window
_context_update_window:                 ## @context_update_window
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	40(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rdx
	movq	(%rax), %rcx
	cmpq	%rcx, %rdx
	je	LBB0_6
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_TRACE
	movq	16(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:
	movq	(%rbx), %rdi
	callq	_wined3d_release_dc
LBB0_4:
	movq	40(%rbx), %rax
	movq	(%rax), %rdi
	movq	%rdi, (%rbx)
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	%rax, 24(%rbx)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 8(%rbx)
	movq	_DCX_USESTYLE@GOTPCREL(%rip), %rax
	movq	_DCX_CACHE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	xorl	%esi, %esi
	callq	_GetDCEx
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	(%rbx), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	movl	$0, 12(%rbx)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Updating context %p window from %p to %p.\n"

	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_DCX_USESTYLE,4,2               ## @DCX_USESTYLE
	.comm	_DCX_CACHE,4,2                  ## @DCX_CACHE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to get a device context for window %p.\n"

	.no_dead_strip	_context_update_window
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function context_update_window
_context_update_window:                 ; @context_update_window
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x2, [x0]
	ldr	x3, [x8]
	cmp	x2, x3
	b.eq	LBB0_6
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	ldr	x1, [x19, #16]
	cbz	x1, LBB0_4
; %bb.3:
	ldr	x0, [x19]
	bl	_wined3d_release_dc
LBB0_4:
	ldr	x8, [x19, #40]
	ldr	x0, [x8]
	str	x0, [x19]
Lloh2:
	adrp	x8, _FALSE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stp	x8, x8, [x19, #24]
	movi.2s	v0, #1
Lloh5:
	adrp	x8, _DCX_USESTYLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DCX_USESTYLE@GOTPAGEOFF]
	str	d0, [x19, #8]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _DCX_CACHE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DCX_CACHE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w1, #0
	bl	_GetDCEx
	str	x0, [x19, #16]
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	x1, [x19]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	str	wzr, [x19, #12]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Updating context %p window from %p to %p.\n"

	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_DCX_USESTYLE,4,2               ; @DCX_USESTYLE
	.comm	_DCX_CACHE,4,2                  ; @DCX_CACHE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to get a device context for window %p.\n"

	.no_dead_strip	_context_update_window
.subsections_via_symbols
