	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function swapBuffersWGL
_swapBuffersWGL:                        ## @swapBuffersWGL
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	cmpl	$0, 8(%rdi)
	je	LBB0_1
LBB0_8:
	movl	(%r14), %edi
	callq	_SwapBuffers
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
	callq	_IsWindowsVistaOrGreater
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	xorl	%eax, %eax
	callq	_IsWindows8OrGreater
	movq	%rax, -24(%rbp)
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:
	leaq	-24(%rbp), %rdi
	callq	_DwmIsCompositionEnabled
	movl	%eax, %edi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	cmpq	$0, -24(%rbp)
	je	LBB0_8
LBB0_5:
	movl	4(%r14), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	movl	%eax, %ebx
	negl	%ebx
	cmovsl	%eax, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_DwmFlush
	decl	%ebx
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_swapBuffersWGL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function swapBuffersWGL
_swapBuffersWGL:                        ; @swapBuffersWGL
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_2
LBB0_1:
	ldr	w0, [x19]
	bl	_SwapBuffers
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_2:
	bl	_IsWindowsVistaOrGreater
	cbz	x0, LBB0_1
; %bb.3:
	bl	_IsWindows8OrGreater
	str	x0, [sp, #8]
	cbnz	x0, LBB0_6
; %bb.4:
	add	x0, sp, #8
	bl	_DwmIsCompositionEnabled
	bl	_SUCCEEDED
	cbz	x0, LBB0_1
; %bb.5:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_1
LBB0_6:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_1
; %bb.7:
	cmp	w8, #0
	cneg	w20, w8, mi
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	sub	w20, w20, #1
	bl	_DwmFlush
	cbnz	w20, LBB0_8
	b	LBB0_1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_swapBuffersWGL
.subsections_via_symbols
