	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DDUpdateFrame                  ## -- Begin function DDUpdateFrame
	.p2align	4, 0x90
_DDUpdateFrame:                         ## @DDUpdateFrame
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r13
	movq	%r8, %r12
	movq	%rcx, %r15
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	leaq	-80(%rbp), %r14
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_ZeroMemory
	movl	$16, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	(%rbx), %rax
	movq	_DDBLT_COLORFILL@GOTPCREL(%rip), %rcx
	movq	_DDBLT_WAIT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	orl	(%rcx), %r8d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r14, %r9
	callq	*8(%rax)
	movq	(%rbx), %rax
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	callq	*(%rax)
	movq	_DD_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.1:
	movq	(%r15), %rax
	movq	%rax, -88(%rbp)
	movq	_DD_SQUARE_SIZE@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	addq	%rcx, %rax
	movq	%rax, -96(%rbp)
	movq	(%r12), %rax
	movq	%rax, -104(%rbp)
	addq	%rcx, %rax
	movq	%rax, -112(%rbp)
	movl	$255, %edi
	movl	$255, %esi
	movl	$255, %edx
	callq	_RGB
	movl	%eax, %edi
	callq	_CreateSolidBrush
	movl	-44(%rbp), %edi
	leaq	-112(%rbp), %rsi
	movl	%eax, %edx
	callq	_FillRect
	movq	_DD_TEST_WIDTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	subq	%rcx, %rax
	cmpq	%rax, (%r15)
	jl	LBB0_3
## %bb.2:
	negq	(%r13)
	movq	(%r14), %rcx
LBB0_3:
	movq	16(%rbp), %rax
	movq	_DD_TEST_HEIGHT@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	subq	%rcx, %rdx
	cmpq	%rdx, (%r12)
	jge	LBB0_4
## %bb.5:
	cmpq	$0, (%r15)
	js	LBB0_6
LBB0_7:
	cmpq	$0, (%r12)
	js	LBB0_8
LBB0_9:
	movq	(%r13), %rcx
	addq	%rcx, (%r15)
	movq	(%rax), %rax
	addq	%rax, (%r12)
	movq	(%rbx), %rax
	movl	-44(%rbp), %esi
	movq	%rbx, %rdi
	callq	*24(%rax)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_11
## %bb.10:
	movq	_DDFLIP_WAIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	xorl	%esi, %esi
	callq	*16(%rax)
	jmp	LBB0_12
LBB0_4:
	negq	(%rax)
	cmpq	$0, (%r15)
	jns	LBB0_7
LBB0_6:
	negq	(%r13)
	cmpq	$0, (%r12)
	jns	LBB0_9
LBB0_8:
	negq	(%rax)
	jmp	LBB0_9
LBB0_11:
	movq	24(%rbp), %rsi
	movq	_DDBLT_WAIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	*8(%rax)
LBB0_12:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DDBLT_COLORFILL,4,2            ## @DDBLT_COLORFILL
	.comm	_DDBLT_WAIT,4,2                 ## @DDBLT_WAIT
	.comm	_DD_OK,8,3                      ## @DD_OK
	.comm	_DD_SQUARE_SIZE,8,3             ## @DD_SQUARE_SIZE
	.comm	_DD_TEST_WIDTH,8,3              ## @DD_TEST_WIDTH
	.comm	_DD_TEST_HEIGHT,8,3             ## @DD_TEST_HEIGHT
	.comm	_DDFLIP_WAIT,4,2                ## @DDFLIP_WAIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DDUpdateFrame                  ; -- Begin function DDUpdateFrame
	.p2align	2
_DDUpdateFrame:                         ; @DDUpdateFrame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x24, x6
	mov	x26, x5
	mov	x23, x4
	mov	x25, x3
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	mov	w27, #16
	add	x0, sp, #40
	mov	w1, #16
	bl	_ZeroMemory
	str	w27, [sp, #40]
	str	xzr, [sp, #48]
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _DDBLT_COLORFILL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DDBLT_COLORFILL@GOTPAGEOFF]
	ldr	x8, [x8, #8]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x27, _DDBLT_WAIT@GOTPAGE
Lloh4:
	ldr	x27, [x27, _DDBLT_WAIT@GOTPAGEOFF]
	ldr	w10, [x27]
	orr	w4, w10, w9
	add	x5, sp, #40
	mov	x0, x21
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	blr	x8
	ldr	x8, [x21]
	ldr	x8, [x8]
	add	x1, sp, #60
	mov	x0, x21
	blr	x8
Lloh5:
	adrp	x8, _DD_OK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DD_OK@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.1:
	ldr	x8, [x25]
Lloh8:
	adrp	x28, _DD_SQUARE_SIZE@GOTPAGE
Lloh9:
	ldr	x28, [x28, _DD_SQUARE_SIZE@GOTPAGEOFF]
	ldr	x9, [x28]
	add	x10, x9, x8
	stp	x10, x8, [sp, #24]
	ldr	x8, [x23]
	add	x9, x8, x9
	stp	x9, x8, [sp, #8]
	mov	w0, #255
	mov	w1, #255
	mov	w2, #255
	bl	_RGB
	bl	_CreateSolidBrush
	mov	x2, x0
	ldr	w0, [sp, #60]
	add	x1, sp, #8
	bl	_FillRect
	ldr	x9, [x25]
Lloh10:
	adrp	x8, _DD_TEST_WIDTH@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DD_TEST_WIDTH@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x8]
	ldr	x8, [x28]
	sub	x10, x10, x8
	cmp	x9, x10
	b.lt	LBB0_3
; %bb.2:
	ldr	x8, [x26]
	neg	x8, x8
	str	x8, [x26]
	ldr	x8, [x28]
LBB0_3:
	ldr	x9, [x23]
Lloh13:
	adrp	x10, _DD_TEST_HEIGHT@GOTPAGE
Lloh14:
	ldr	x10, [x10, _DD_TEST_HEIGHT@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
	sub	x8, x10, x8
	cmp	x9, x8
	b.ge	LBB0_8
; %bb.4:
	ldr	x8, [x25]
	tbnz	x8, #63, LBB0_9
LBB0_5:
	ldr	x8, [x23]
	tbnz	x8, #63, LBB0_10
LBB0_6:
	ldr	x8, [x26]
	ldr	x9, [x25]
	add	x8, x9, x8
	str	x8, [x25]
	ldr	x8, [x24]
	ldr	x9, [x23]
	add	x8, x9, x8
	str	x8, [x23]
	ldr	x8, [x21]
	ldr	x8, [x8, #24]
	ldr	w1, [sp, #60]
	mov	x0, x21
	blr	x8
	ldr	x8, [x20]
	cbz	x22, LBB0_11
; %bb.7:
	ldr	x8, [x8, #16]
Lloh16:
	adrp	x9, _DDFLIP_WAIT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _DDFLIP_WAIT@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x9]
	mov	x0, x20
	mov	x1, #0
	blr	x8
	b	LBB0_12
LBB0_8:
	ldr	x8, [x24]
	neg	x8, x8
	str	x8, [x24]
	ldr	x8, [x25]
	tbz	x8, #63, LBB0_5
LBB0_9:
	ldr	x8, [x26]
	neg	x8, x8
	str	x8, [x26]
	ldr	x8, [x23]
	tbz	x8, #63, LBB0_6
LBB0_10:
	ldr	x8, [x24]
	neg	x8, x8
	str	x8, [x24]
	b	LBB0_6
LBB0_11:
	ldr	x8, [x8, #8]
	ldr	w4, [x27]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	mov	x3, #0
	mov	x5, #0
	blr	x8
LBB0_12:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_DDBLT_COLORFILL,4,2            ; @DDBLT_COLORFILL
	.comm	_DDBLT_WAIT,4,2                 ; @DDBLT_WAIT
	.comm	_DD_OK,8,3                      ; @DD_OK
	.comm	_DD_SQUARE_SIZE,8,3             ; @DD_SQUARE_SIZE
	.comm	_DD_TEST_WIDTH,8,3              ; @DD_TEST_WIDTH
	.comm	_DD_TEST_HEIGHT,8,3             ; @DD_TEST_HEIGHT
	.comm	_DDFLIP_WAIT,4,2                ; @DDFLIP_WAIT
.subsections_via_symbols
