	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UpdateFlags
_UpdateFlags:                           ## @UpdateFlags
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_cassette_motor@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.1:
	movq	_CASSETTE_status@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_CASSETTE_STATUS_READ_WRITE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	cmpq	%rdi, %rcx
	sete	%dl
	movq	_CASSETTE_STATUS_READ_ONLY@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	sete	%al
	orb	%dl, %al
	movq	_eof_of_tape@GOTPCREL(%rip), %rsi
	cmpl	$0, (%rsi)
	sete	%dl
	andb	%al, %dl
	movzbl	%dl, %eax
	movq	_cassette_readable@GOTPCREL(%rip), %rdx
	movl	%eax, (%rdx)
	xorl	%eax, %eax
	cmpq	%rdi, %rcx
	jne	LBB0_3
## %bb.2:
	movq	_CASSETTE_write_protect@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	$0, (%rcx)
	sete	%al
	jmp	LBB0_3
LBB0_4:
	movq	_cassette_readable@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	xorl	%eax, %eax
LBB0_3:
	movq	_cassette_writable@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cassette_motor,8,3             ## @cassette_motor
	.comm	_CASSETTE_status,8,3            ## @CASSETTE_status
	.comm	_CASSETTE_STATUS_READ_WRITE,8,3 ## @CASSETTE_STATUS_READ_WRITE
	.comm	_CASSETTE_STATUS_READ_ONLY,8,3  ## @CASSETTE_STATUS_READ_ONLY
	.comm	_eof_of_tape,4,2                ## @eof_of_tape
	.comm	_cassette_readable,4,2          ## @cassette_readable
	.comm	_CASSETTE_write_protect,4,2     ## @CASSETTE_write_protect
	.comm	_cassette_writable,4,2          ## @cassette_writable
	.no_dead_strip	_UpdateFlags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UpdateFlags
_UpdateFlags:                           ; @UpdateFlags
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _cassette_motor@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cassette_motor@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _CASSETTE_status@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CASSETTE_status@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _CASSETTE_STATUS_READ_WRITE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CASSETTE_STATUS_READ_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _CASSETTE_STATUS_READ_ONLY@GOTPAGE
Lloh10:
	ldr	x10, [x10, _CASSETTE_STATUS_READ_ONLY@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x8, x10
	cset	w10, eq
Lloh12:
	adrp	x11, _eof_of_tape@GOTPAGE
Lloh13:
	ldr	x11, [x11, _eof_of_tape@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	cmp	w11, #0
	cset	w11, eq
	cmp	x8, x9
	cset	w8, eq
	orr	w8, w8, w10
	and	w8, w8, w11
Lloh15:
	adrp	x9, _cassette_readable@GOTPAGE
Lloh16:
	ldr	x9, [x9, _cassette_readable@GOTPAGEOFF]
Lloh17:
	str	w8, [x9]
	b.ne	LBB0_4
; %bb.2:
Lloh18:
	adrp	x8, _CASSETTE_write_protect@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CASSETTE_write_protect@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w8, eq
	b	LBB0_5
LBB0_3:
Lloh21:
	adrp	x9, _cassette_readable@GOTPAGE
Lloh22:
	ldr	x9, [x9, _cassette_readable@GOTPAGEOFF]
Lloh23:
	str	wzr, [x9]
	b	LBB0_5
LBB0_4:
	mov	w8, #0
LBB0_5:
Lloh24:
	adrp	x9, _cassette_writable@GOTPAGE
Lloh25:
	ldr	x9, [x9, _cassette_writable@GOTPAGEOFF]
Lloh26:
	str	w8, [x9]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_cassette_motor,8,3             ; @cassette_motor
	.comm	_CASSETTE_status,8,3            ; @CASSETTE_status
	.comm	_CASSETTE_STATUS_READ_WRITE,8,3 ; @CASSETTE_STATUS_READ_WRITE
	.comm	_CASSETTE_STATUS_READ_ONLY,8,3  ; @CASSETTE_STATUS_READ_ONLY
	.comm	_eof_of_tape,4,2                ; @eof_of_tape
	.comm	_cassette_readable,4,2          ; @cassette_readable
	.comm	_CASSETTE_write_protect,4,2     ; @CASSETTE_write_protect
	.comm	_cassette_writable,4,2          ; @cassette_writable
	.no_dead_strip	_UpdateFlags
.subsections_via_symbols
