	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdl_video_update
_sdl_video_update:                      ## @sdl_video_update
	.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
	xorl	%edi, %edi
	callq	_system_frame
	movq	_bitmap@GOTPCREL(%rip), %rsi
	movl	(%rsi), %eax
	testb	$1, %al
	je	LBB0_6
## %bb.1:
	andl	$-2, %eax
	movl	%eax, (%rsi)
	movslq	16(%rsi), %rdx
	addq	%rdx, %rdx
	addq	8(%rsi), %rdx
	movq	_sdl_video@GOTPCREL(%rip), %r8
	movq	%rdx, 40(%r8)
	movslq	32(%rsi), %rcx
	addq	%rcx, %rcx
	addq	24(%rsi), %rcx
	movq	%rcx, 48(%r8)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%r8)
	movq	_VIDEO_WIDTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rdx, %rdi
	subq	%rsi, %rdi
	jle	LBB0_3
## %bb.2:
	movq	%rdi, %rax
	shrq	$63, %rax
	addq	%rdi, %rax
	sarq	%rax
	movq	%rax, 64(%r8)
	movq	%rsi, 40(%r8)
	movq	%rsi, %rdx
LBB0_3:
	movq	_VIDEO_HEIGHT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rcx, %rax
	subq	%rdi, %rax
	jle	LBB0_5
## %bb.4:
	movq	%rax, %rcx
	shrq	$63, %rcx
	addq	%rax, %rcx
	sarq	%rcx
	movq	%rcx, 56(%r8)
	movq	%rdi, 48(%r8)
	movq	%rdi, %rcx
LBB0_5:
	movq	%rdx, 8(%r8)
	movq	%rcx, 16(%r8)
	subq	%rdx, %rsi
	movq	%rsi, %rax
	shrq	$63, %rax
	addq	%rsi, %rax
	sarq	%rax
	movq	%rax, 32(%r8)
	subq	%rcx, %rdi
	movq	%rdi, %rax
	shrq	$63, %rax
	addq	%rdi, %rax
	sarq	%rax
	movq	%rax, 24(%r8)
	movl	4(%r8), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_SDL_FillRect
LBB0_6:
	movq	_sdl_video@GOTPCREL(%rip), %rbx
	movl	4(%rbx), %edx
	movl	72(%rbx), %edi
	leaq	40(%rbx), %rsi
	leaq	8(%rbx), %rcx
	callq	_SDL_BlitSurface
	movl	4(%rbx), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_SDL_UpdateRect
	incl	(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bitmap,40,3                    ## @bitmap
	.comm	_sdl_video,80,3                 ## @sdl_video
	.comm	_VIDEO_WIDTH,8,3                ## @VIDEO_WIDTH
	.comm	_VIDEO_HEIGHT,8,3               ## @VIDEO_HEIGHT
	.no_dead_strip	_sdl_video_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdl_video_update
_sdl_video_update:                      ; @sdl_video_update
	.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
	mov	w0, #0
	bl	_system_frame
Lloh0:
	adrp	x9, _bitmap@GOTPAGE
Lloh1:
	ldr	x9, [x9, _bitmap@GOTPAGEOFF]
	ldr	w8, [x9]
Lloh2:
	adrp	x19, _sdl_video@GOTPAGE
Lloh3:
	ldr	x19, [x19, _sdl_video@GOTPAGEOFF]
	tbz	w8, #0, LBB0_6
; %bb.1:
	and	w8, w8, #0xfffffffe
	str	w8, [x9]
	ldr	x8, [x9, #8]
	ldrsw	x10, [x9, #16]
	add	x8, x8, x10, lsl #1
	ldr	x10, [x9, #24]
	ldrsw	x9, [x9, #32]
	add	x9, x10, x9, lsl #1
	stp	x8, x9, [x19, #40]
	stp	xzr, xzr, [x19, #56]
Lloh4:
	adrp	x10, _VIDEO_WIDTH@GOTPAGE
Lloh5:
	ldr	x10, [x10, _VIDEO_WIDTH@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
	subs	x11, x8, x10
	b.le	LBB0_3
; %bb.2:
	cmp	x11, #0
	cinc	x8, x11, lt
	asr	x8, x8, #1
	str	x8, [x19, #64]
	str	x10, [x19, #40]
	mov	x8, x10
LBB0_3:
Lloh7:
	adrp	x11, _VIDEO_HEIGHT@GOTPAGE
Lloh8:
	ldr	x11, [x11, _VIDEO_HEIGHT@GOTPAGEOFF]
Lloh9:
	ldr	x11, [x11]
	subs	x12, x9, x11
	b.le	LBB0_5
; %bb.4:
	cmp	x12, #0
	cinc	x9, x12, lt
	asr	x9, x9, #1
	stp	x11, x9, [x19, #48]
	mov	x9, x11
LBB0_5:
	stp	x8, x9, [x19, #8]
	sub	x8, x10, x8
	cmp	x8, #0
	cinc	x8, x8, lt
	asr	x8, x8, #1
	sub	x9, x11, x9
	cmp	x9, #0
	cinc	x9, x9, lt
	asr	x9, x9, #1
	stp	x9, x8, [x19, #24]
	ldr	w0, [x19, #4]
	mov	w1, #0
	mov	w2, #0
	bl	_SDL_FillRect
LBB0_6:
	ldr	w0, [x19, #72]
	ldr	w2, [x19, #4]
	add	x1, x19, #40
	add	x3, x19, #8
	bl	_SDL_BlitSurface
	ldr	w0, [x19, #4]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_SDL_UpdateRect
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_bitmap,40,3                    ; @bitmap
	.comm	_sdl_video,80,3                 ; @sdl_video
	.comm	_VIDEO_WIDTH,8,3                ; @VIDEO_WIDTH
	.comm	_VIDEO_HEIGHT,8,3               ; @VIDEO_HEIGHT
	.no_dead_strip	_sdl_video_update
.subsections_via_symbols
