	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_movie
_update_movie:                          ## @update_movie
	.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	_Pico@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rax,%rax,2), %rsi
	leal	67(%rsi), %eax
	movq	_movie_size@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_1
## %bb.22:
	movq	_movie_data@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_free
	movq	$0, (%rbx)
	leaq	L_.str(%rip), %rdi
	callq	_emu_status_msg
	leaq	L_.str.1(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_lprintf                        ## TAILCALL
LBB0_1:
	movq	_movie_data@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	256(%rcx,%rsi,4), %edx
	notl	%edx
	andl	$143, %edx
	movq	_PicoPad@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movl	%edx, (%r9)
	movl	256(%rcx,%rsi,4), %eax
	testb	$16, %al
	je	LBB0_2
## %bb.3:
	testb	$32, %al
	je	LBB0_4
LBB0_5:
	testb	$64, %al
	jne	LBB0_7
LBB0_6:
	orl	$32, %edx
	movl	%edx, (%r9)
LBB0_7:
	movslq	%esi, %rdi
	leaq	65(%rdi), %r8
	movl	260(%rcx,%rdi,4), %esi
	notl	%esi
	andl	$143, %esi
	movl	%esi, 4(%r9)
	movl	260(%rcx,%rdi,4), %eax
	testb	$16, %al
	je	LBB0_8
## %bb.9:
	testb	$32, %al
	je	LBB0_10
LBB0_11:
	testb	$64, %al
	jne	LBB0_13
LBB0_12:
	orl	$32, %esi
	movl	%esi, 4(%r9)
LBB0_13:
	leaq	66(%rdi), %r8
	movl	264(%rcx,%rdi,4), %eax
	shll	$8, %eax
	notl	%eax
	andl	$2560, %eax                     ## imm = 0xA00
	orl	%edx, %eax
	movl	%eax, (%r9)
	movl	264(%rcx,%rdi,4), %edx
	testb	$1, %dl
	jne	LBB0_15
## %bb.14:
	orl	$1024, %eax                     ## imm = 0x400
	movl	%eax, (%r9)
	movl	(%rcx,%r8,4), %edx
LBB0_15:
	testb	$4, %dl
	jne	LBB0_17
## %bb.16:
	orl	$256, %eax                      ## imm = 0x100
	movl	%eax, (%r9)
	movl	(%rcx,%r8,4), %edx
LBB0_17:
	shll	$4, %edx
	notl	%edx
	andl	$2560, %edx                     ## imm = 0xA00
	orl	%esi, %edx
	movl	%edx, 4(%r9)
	movl	(%rcx,%r8,4), %eax
	testb	$16, %al
	jne	LBB0_19
## %bb.18:
	orl	$1024, %edx                     ## imm = 0x400
	movl	%edx, 4(%r9)
	movl	(%rcx,%r8,4), %eax
LBB0_19:
	testb	$64, %al
	jne	LBB0_21
## %bb.20:
	orl	$256, %edx                      ## imm = 0x100
	movl	%edx, 4(%r9)
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	orl	$64, %edx
	movl	%edx, (%r9)
	movl	256(%rcx,%rsi,4), %eax
	testb	$32, %al
	jne	LBB0_5
LBB0_4:
	orl	$16, %edx
	movl	%edx, (%r9)
	movl	256(%rcx,%rsi,4), %eax
	testb	$64, %al
	je	LBB0_6
	jmp	LBB0_7
LBB0_8:
	orl	$64, %esi
	movl	%esi, 4(%r9)
	movl	(%rcx,%r8,4), %eax
	testb	$32, %al
	jne	LBB0_11
LBB0_10:
	orl	$16, %esi
	movl	%esi, 4(%r9)
	movl	(%rcx,%r8,4), %eax
	testb	$64, %al
	je	LBB0_12
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_Pico,4,2                       ## @Pico
	.comm	_movie_size,4,2                 ## @movie_size
	.comm	_movie_data,8,3                 ## @movie_data
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"END OF MOVIE."

L_.str.1:                               ## @.str.1
	.asciz	"END OF MOVIE.\n"

	.comm	_PicoPad,8,3                    ## @PicoPad
	.no_dead_strip	_update_movie
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_movie
_update_movie:                          ; @update_movie
	.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
Lloh0:
	adrp	x8, _Pico@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Pico@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	add	x11, x8, x8, lsl #1
	add	w8, w11, #67
Lloh3:
	adrp	x9, _movie_size@GOTPAGE
Lloh4:
	ldr	x9, [x9, _movie_size@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_2
; %bb.1:
Lloh6:
	adrp	x19, _movie_data@GOTPAGE
Lloh7:
	ldr	x19, [x19, _movie_data@GOTPAGEOFF]
	ldr	x0, [x19]
	bl	_free
	str	xzr, [x19]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_emu_status_msg
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_lprintf
LBB0_2:
	add	x12, x11, #64
Lloh12:
	adrp	x8, _movie_data@GOTPAGE
Lloh13:
	ldr	x8, [x8, _movie_data@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x8]
	lsl	x13, x12, #2
	ldr	w8, [x9, x13]
	mov	w10, #143
	bic	w10, w10, w8
Lloh15:
	adrp	x8, _PicoPad@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PicoPad@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	w10, [x8]
	ldr	w13, [x9, x13]
	tbz	w13, #4, LBB0_19
; %bb.3:
	tbz	w13, #5, LBB0_20
LBB0_4:
	tbnz	w13, #6, LBB0_6
LBB0_5:
	orr	w10, w10, #0x20
	str	w10, [x8]
LBB0_6:
                                        ; kill: def $w11 killed $w11 killed $x11 def $x11
	sxtw	x12, w11
	add	x13, x12, #65
	lsl	x14, x13, #2
	ldr	w11, [x9, x14]
	mov	w15, #143
	bic	w11, w15, w11
	str	w11, [x8, #4]
	ldr	w14, [x9, x14]
	tbz	w14, #4, LBB0_21
; %bb.7:
	tbz	w14, #5, LBB0_22
LBB0_8:
	tbnz	w14, #6, LBB0_10
LBB0_9:
	orr	w11, w11, #0x20
	str	w11, [x8, #4]
LBB0_10:
	add	x12, x12, #66
	lsl	x13, x12, #2
	ldr	w14, [x9, x13]
	mov	w15, #2560
	bic	w14, w15, w14, lsl #8
	orr	w10, w14, w10
	str	w10, [x8]
	ldr	w13, [x9, x13]
	tbnz	w13, #0, LBB0_12
; %bb.11:
	orr	w10, w10, #0x400
	str	w10, [x8]
	ldr	w13, [x9, x12, lsl #2]
LBB0_12:
	tbnz	w13, #2, LBB0_14
; %bb.13:
	orr	w10, w10, #0x100
	str	w10, [x8]
	ldr	w13, [x9, x12, lsl #2]
LBB0_14:
	mov	w10, #2560
	bic	w10, w10, w13, lsl #4
	orr	w10, w10, w11
	str	w10, [x8, #4]
	ldr	w11, [x9, x12, lsl #2]
	tbnz	w11, #4, LBB0_16
; %bb.15:
	orr	w10, w10, #0x400
	str	w10, [x8, #4]
	ldr	w11, [x9, x12, lsl #2]
LBB0_16:
	tbnz	w11, #6, LBB0_18
; %bb.17:
	orr	w9, w10, #0x100
	str	w9, [x8, #4]
LBB0_18:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_19:
	orr	w10, w10, #0x40
	str	w10, [x8]
	ldr	w13, [x9, x12, lsl #2]
	tbnz	w13, #5, LBB0_4
LBB0_20:
	orr	w10, w10, #0x10
	str	w10, [x8]
	ldr	w13, [x9, x12, lsl #2]
	tbz	w13, #6, LBB0_5
	b	LBB0_6
LBB0_21:
	orr	w11, w11, #0x40
	str	w11, [x8, #4]
	ldr	w14, [x9, x13, lsl #2]
	tbnz	w14, #5, LBB0_8
LBB0_22:
	orr	w11, w11, #0x10
	str	w11, [x8, #4]
	ldr	w14, [x9, x13, lsl #2]
	tbz	w14, #6, LBB0_9
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_Pico,4,2                       ; @Pico
	.comm	_movie_size,4,2                 ; @movie_size
	.comm	_movie_data,8,3                 ; @movie_data
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"END OF MOVIE."

l_.str.1:                               ; @.str.1
	.asciz	"END OF MOVIE.\n"

	.comm	_PicoPad,8,3                    ; @PicoPad
	.no_dead_strip	_update_movie
.subsections_via_symbols
