	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AFILE_DetectFileType           ## -- Begin function AFILE_DetectFileType
	.p2align	4, 0x90
_AFILE_DetectFileType:                  ## @AFILE_DetectFileType
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	movq	_AFILE_ERROR@GOTPCREL(%rip), %r12
	testq	%rax, %rax
	je	LBB0_51
## %bb.1:
	movq	%rax, %r15
	leaq	-64(%rbp), %rdi
	movl	$1, %esi
	movl	$4, %edx
	movq	%rax, %rcx
	callq	_fread
	cmpl	$4, %eax
	jne	LBB0_2
## %bb.3:
	movl	-64(%rbp), %r13d
	cmpl	$248, %r13d
	jg	LBB0_10
## %bb.4:
	leal	-31(%r13), %eax
	cmpl	$119, %eax
	ja	LBB0_5
## %bb.9:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_18:
	movl	-60(%rbp), %eax
	cmpl	$32, %eax
	je	LBB0_20
## %bb.19:
	addl	$-48, %eax
	cmpl	$9, %eax
	jbe	LBB0_20
LBB0_36:
	movq	%r15, %rdi
	callq	_Util_flen
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_fclose
	leal	-16(%r14), %eax
	imull	$-1963413621, %eax, %ecx        ## imm = 0x8AF8AF8B
	addl	$61356672, %ecx                 ## imm = 0x3A83A80
	rorl	$2, %ecx
	cmpl	$30678336, %ecx                 ## imm = 0x1D41D40
	jbe	LBB0_37
LBB0_40:
	cmpl	$4096, %r14d                    ## imm = 0x1000
	jl	LBB0_44
## %bb.41:
	movq	_CARTRIDGE_MAX_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jg	LBB0_44
## %bb.42:
	movq	_AFILE_ROM@GOTPCREL(%rip), %r12
	cmpl	$40960, %r14d                   ## imm = 0xA000
	je	LBB0_51
## %bb.43:
	movl	%r14d, %eax
	shrl	%eax
	andl	$1431655765, %eax               ## imm = 0x55555555
	movl	%r14d, %ecx
	subl	%eax, %ecx
	movl	%ecx, %eax
	andl	$858993459, %eax                ## imm = 0x33333333
	shrl	$2, %ecx
	andl	$858993459, %ecx                ## imm = 0x33333333
	addl	%eax, %ecx
	movl	%ecx, %eax
	shrl	$4, %eax
	addl	%ecx, %eax
	andl	$252645135, %eax                ## imm = 0xF0F0F0F
	imull	$16843009, %eax, %eax           ## imm = 0x1010101
	shrl	$24, %eax
	cmpl	$2, %eax
	jb	LBB0_51
LBB0_44:
	movl	-60(%rbp), %eax
	shll	$7, %eax
	cmpl	%r14d, %eax
	jne	LBB0_46
## %bb.45:
	movq	_AFILE_BOOT_TAPE@GOTPCREL(%rip), %r12
	jmp	LBB0_51
LBB0_2:
	movq	%r15, %rdi
	callq	_fclose
	jmp	LBB0_51
LBB0_20:
	movq	%r15, %rdi
	callq	_fclose
	movq	_AFILE_LST@GOTPCREL(%rip), %r12
	jmp	LBB0_51
LBB0_10:
	leal	-249(%r13), %eax
	cmpl	$2, %eax
	jae	LBB0_11
## %bb.35:
	movq	%r15, %rdi
	callq	_fclose
	movq	_AFILE_DCM@GOTPCREL(%rip), %r12
	jmp	LBB0_51
LBB0_37:
	cltq
	imulq	$-368140053, %rax, %rax         ## imm = 0xEA0EA0EB
	shrq	$32, %rax
	addl	%r14d, %eax
	addl	$-16, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$7, %eax
	addl	%ecx, %eax
	shll	$8, %r13d
	addl	-60(%rbp), %r13d
	cmpl	%eax, %r13d
	jne	LBB0_40
## %bb.38:
	cmpl	$80, -56(%rbp)
	jne	LBB0_40
## %bb.39:
	movq	_AFILE_PRO@GOTPCREL(%rip), %r12
	jmp	LBB0_51
LBB0_46:
	testb	$127, %r14b
	je	LBB0_47
## %bb.48:
	leaq	-64(%rbp), %rdi
	callq	_IMG_TAPE_FileSupported
	testq	%rax, %rax
	jne	LBB0_49
## %bb.50:
	movq	_AFILE_ERROR@GOTPCREL(%rip), %r12
	jmp	LBB0_51
LBB0_11:
	cmpl	$255, %r13d
	jne	LBB0_36
## %bb.12:
	cmpl	$255, -60(%rbp)
	jne	LBB0_36
## %bb.13:
	cmpl	$255, -56(%rbp)
	jne	LBB0_15
## %bb.14:
	cmpl	$255, -52(%rbp)
	je	LBB0_36
LBB0_15:
	movq	%r15, %rdi
	callq	_fclose
	movq	_AFILE_XEX@GOTPCREL(%rip), %r12
	jmp	LBB0_51
LBB0_5:
	testl	%r13d, %r13d
	jne	LBB0_36
## %bb.6:
	cmpl	$0, -60(%rbp)
	jne	LBB0_36
## %bb.7:
	movl	-56(%rbp), %eax
	orl	-52(%rbp), %eax
	je	LBB0_36
## %bb.8:
	movq	%r15, %rdi
	callq	_fclose
	movq	_AFILE_BAS@GOTPCREL(%rip), %r12
	jmp	LBB0_51
LBB0_47:
	movq	_AFILE_XFD@GOTPCREL(%rip), %r12
	jmp	LBB0_51
LBB0_16:
	cmpl	$139, -60(%rbp)
	jne	LBB0_36
## %bb.17:
	movq	%r15, %rdi
	callq	_fclose
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	jmp	LBB0_51
LBB0_21:
	movl	-60(%rbp), %edx
	movl	-56(%rbp), %ecx
	movl	-52(%rbp), %eax
	cmpl	$84, %edx
	jne	LBB0_25
## %bb.22:
	cmpl	$65, %ecx
	jne	LBB0_25
## %bb.23:
	cmpl	$82, %eax
	jne	LBB0_25
## %bb.24:
	movq	%r15, %rdi
	callq	_fclose
	movq	_AFILE_STATE@GOTPCREL(%rip), %r12
	jmp	LBB0_51
LBB0_29:
	cmpl	$65, -60(%rbp)
	jne	LBB0_36
## %bb.30:
	cmpl	$82, -56(%rbp)
	jne	LBB0_36
## %bb.31:
	cmpl	$84, -52(%rbp)
	jne	LBB0_36
## %bb.32:
	movq	%r15, %rdi
	callq	_fclose
	movq	_AFILE_CART@GOTPCREL(%rip), %r12
	jmp	LBB0_51
LBB0_33:
	cmpl	$2, -60(%rbp)
	jne	LBB0_36
## %bb.34:
	movq	%r15, %rdi
	callq	_fclose
	movq	_AFILE_ATR@GOTPCREL(%rip), %r12
	jmp	LBB0_51
LBB0_49:
	movq	_AFILE_CAS@GOTPCREL(%rip), %r12
	jmp	LBB0_51
LBB0_25:
	cmpl	$84, %edx
	jne	LBB0_36
## %bb.26:
	cmpl	$56, %ecx
	jne	LBB0_36
## %bb.27:
	cmpl	$88, %eax
	jne	LBB0_36
## %bb.28:
	movq	%r15, %rdi
	callq	_fclose
	movq	_AFILE_ATX@GOTPCREL(%rip), %r12
LBB0_51:
	movl	(%r12), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_53
## %bb.52:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_53:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_36, LBB0_36-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_29, LBB0_29-LJTI0_0
.set L0_0_set_33, LBB0_33-LJTI0_0
LJTI0_0:
	.long	L0_0_set_16
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_18
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_21
	.long	L0_0_set_36
	.long	L0_0_set_29
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_36
	.long	L0_0_set_33
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

	.comm	_AFILE_ERROR,4,2                ## @AFILE_ERROR
	.comm	_AFILE_BAS,4,2                  ## @AFILE_BAS
L_.str.1:                               ## @.str.1
	.asciz	"\"%s\" is a compressed file."

L_.str.2:                               ## @.str.2
	.asciz	"This executable does not support compressed files. You can uncompress this file"

L_.str.3:                               ## @.str.3
	.asciz	"with an external program that supports gzip (*.gz) files (e.g. gunzip)"

L_.str.4:                               ## @.str.4
	.asciz	"and then load into this emulator."

	.comm	_AFILE_LST,4,2                  ## @AFILE_LST
	.comm	_AFILE_STATE,4,2                ## @AFILE_STATE
	.comm	_AFILE_ATX,4,2                  ## @AFILE_ATX
	.comm	_AFILE_CART,4,2                 ## @AFILE_CART
	.comm	_AFILE_ATR,4,2                  ## @AFILE_ATR
	.comm	_AFILE_DCM,4,2                  ## @AFILE_DCM
	.comm	_AFILE_XEX,4,2                  ## @AFILE_XEX
	.comm	_AFILE_PRO,4,2                  ## @AFILE_PRO
	.comm	_CARTRIDGE_MAX_SIZE,4,2         ## @CARTRIDGE_MAX_SIZE
	.comm	_AFILE_ROM,4,2                  ## @AFILE_ROM
	.comm	_AFILE_BOOT_TAPE,4,2            ## @AFILE_BOOT_TAPE
	.comm	_AFILE_XFD,4,2                  ## @AFILE_XFD
	.comm	_AFILE_CAS,4,2                  ## @AFILE_CAS
	.comm	_AFILE_ATR_GZ,4,2               ## @AFILE_ATR_GZ
	.comm	_AFILE_STATE_GZ,4,2             ## @AFILE_STATE_GZ
	.comm	_AFILE_XFD_GZ,4,2               ## @AFILE_XFD_GZ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AFILE_DetectFileType           ; -- Begin function AFILE_DetectFileType
	.p2align	2
_AFILE_DetectFileType:                  ; @AFILE_DetectFileType
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
Lloh5:
	adrp	x21, _AFILE_ERROR@GOTPAGE
Lloh6:
	ldr	x21, [x21, _AFILE_ERROR@GOTPAGEOFF]
	cbz	x0, LBB0_14
; %bb.1:
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #1
	mov	w2, #4
	mov	x3, x19
	bl	_fread
	cmp	w0, #4
	b.ne	LBB0_15
; %bb.2:
	ldr	w22, [sp, #8]
	cmp	w22, #248
	b.gt	LBB0_18
; %bb.3:
	sub	w8, w22, #31
	cmp	w8, #119
	b.hi	LBB0_30
; %bb.4:
Lloh7:
	adrp	x9, lJTI0_0@PAGE
Lloh8:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_5
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_5:
	ldr	w8, [sp, #12]
	cmp	w8, #32
	b.eq	LBB0_17
; %bb.6:
	sub	w8, w8, #48
	cmp	w8, #9
	b.ls	LBB0_17
LBB0_7:
	mov	x0, x19
	bl	_Util_flen
	mov	x20, x0
	mov	x0, x19
	bl	_fclose
	sub	w9, w20, #16
	mov	w8, #41195
	movk	w8, #59918, lsl #16
	smull	x8, w9, w8
	lsr	x8, x8, #32
	add	w8, w8, w9
	asr	w10, w8, #7
	add	w8, w10, w8, lsr #31
	mov	w10, #140
	msub	w9, w8, w10, w9
	cbz	w9, LBB0_20
LBB0_8:
	cmp	w20, #1, lsl #12                ; =4096
	b.lt	LBB0_12
; %bb.9:
Lloh9:
	adrp	x8, _CARTRIDGE_MAX_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CARTRIDGE_MAX_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w20, w8
	b.gt	LBB0_12
; %bb.10:
Lloh12:
	adrp	x8, _AFILE_ROM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AFILE_ROM@GOTPAGEOFF]
	cmp	w20, #10, lsl #12               ; =40960
	b.eq	LBB0_51
; %bb.11:
	mov	w9, w20
	fmov	d0, x9
	cnt.8b	v0, v0
	uaddlv.8b	h0, v0
	fmov	w9, s0
	cmp	w9, #2
	b.lo	LBB0_51
LBB0_12:
	ldr	w8, [sp, #12]
	cmp	w20, w8, lsl #7
	b.ne	LBB0_23
; %bb.13:
Lloh14:
	adrp	x8, _AFILE_BOOT_TAPE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AFILE_BOOT_TAPE@GOTPAGEOFF]
	b	LBB0_51
LBB0_14:
	mov	x8, x21
	b	LBB0_51
LBB0_15:
	mov	x0, x19
	bl	_fclose
LBB0_16:
Lloh16:
	adrp	x8, _AFILE_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AFILE_ERROR@GOTPAGEOFF]
	b	LBB0_51
LBB0_17:
	mov	x0, x19
	bl	_fclose
Lloh18:
	adrp	x8, _AFILE_LST@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AFILE_LST@GOTPAGEOFF]
	b	LBB0_51
LBB0_18:
	sub	w8, w22, #249
	cmp	w8, #2
	b.hs	LBB0_25
; %bb.19:
	mov	x0, x19
	bl	_fclose
Lloh20:
	adrp	x8, _AFILE_DCM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AFILE_DCM@GOTPAGEOFF]
	b	LBB0_51
LBB0_20:
	ldr	w9, [sp, #12]
	add	w9, w9, w22, lsl #8
	cmp	w9, w8
	b.ne	LBB0_8
; %bb.21:
	ldr	w8, [sp, #16]
	cmp	w8, #80
	b.ne	LBB0_8
; %bb.22:
Lloh22:
	adrp	x8, _AFILE_PRO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AFILE_PRO@GOTPAGEOFF]
	b	LBB0_51
LBB0_23:
	tst	w20, #0x7f
	b.eq	LBB0_34
; %bb.24:
	add	x0, sp, #8
	bl	_IMG_TAPE_FileSupported
Lloh24:
	adrp	x8, _AFILE_CAS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AFILE_CAS@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x21, x8, eq
	b	LBB0_51
LBB0_25:
	cmp	w22, #255
	b.ne	LBB0_7
; %bb.26:
	ldr	w8, [sp, #12]
	cmp	w8, #255
	b.ne	LBB0_7
; %bb.27:
	ldr	w8, [sp, #16]
	cmp	w8, #255
	b.ne	LBB0_29
; %bb.28:
	ldr	w8, [sp, #20]
	cmp	w8, #255
	b.eq	LBB0_7
LBB0_29:
	mov	x0, x19
	bl	_fclose
Lloh26:
	adrp	x8, _AFILE_XEX@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AFILE_XEX@GOTPAGEOFF]
	b	LBB0_51
LBB0_30:
	cbnz	w22, LBB0_7
; %bb.31:
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_7
; %bb.32:
	ldp	w8, w9, [sp, #16]
	orr	w8, w8, w9
	cbz	w8, LBB0_7
; %bb.33:
	mov	x0, x19
	bl	_fclose
Lloh28:
	adrp	x8, _AFILE_BAS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AFILE_BAS@GOTPAGEOFF]
	b	LBB0_51
LBB0_34:
Lloh30:
	adrp	x8, _AFILE_XFD@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AFILE_XFD@GOTPAGEOFF]
	b	LBB0_51
LBB0_35:
	ldr	w8, [sp, #12]
	cmp	w8, #139
	b.ne	LBB0_7
; %bb.36:
	mov	x0, x19
	bl	_fclose
	str	x20, [sp]
Lloh32:
	adrp	x0, l_.str.1@PAGE
Lloh33:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Log_print
Lloh34:
	adrp	x0, l_.str.2@PAGE
Lloh35:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_Log_print
Lloh36:
	adrp	x0, l_.str.3@PAGE
Lloh37:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_Log_print
Lloh38:
	adrp	x0, l_.str.4@PAGE
Lloh39:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_Log_print
	b	LBB0_16
LBB0_37:
	ldp	w10, w9, [sp, #12]
	ldr	w8, [sp, #20]
	cmp	w10, #84
	b.ne	LBB0_47
; %bb.38:
	cmp	w9, #65
	b.ne	LBB0_47
; %bb.39:
	cmp	w8, #82
	b.ne	LBB0_47
; %bb.40:
	mov	x0, x19
	bl	_fclose
Lloh40:
	adrp	x8, _AFILE_STATE@GOTPAGE
Lloh41:
	ldr	x8, [x8, _AFILE_STATE@GOTPAGEOFF]
	b	LBB0_51
LBB0_41:
	ldr	w8, [sp, #12]
	cmp	w8, #65
	b.ne	LBB0_7
; %bb.42:
	ldr	w8, [sp, #16]
	cmp	w8, #82
	b.ne	LBB0_7
; %bb.43:
	ldr	w8, [sp, #20]
	cmp	w8, #84
	b.ne	LBB0_7
; %bb.44:
	mov	x0, x19
	bl	_fclose
Lloh42:
	adrp	x8, _AFILE_CART@GOTPAGE
Lloh43:
	ldr	x8, [x8, _AFILE_CART@GOTPAGEOFF]
	b	LBB0_51
LBB0_45:
	ldr	w8, [sp, #12]
	cmp	w8, #2
	b.ne	LBB0_7
; %bb.46:
	mov	x0, x19
	bl	_fclose
Lloh44:
	adrp	x8, _AFILE_ATR@GOTPAGE
Lloh45:
	ldr	x8, [x8, _AFILE_ATR@GOTPAGEOFF]
	b	LBB0_51
LBB0_47:
	cmp	w10, #84
	b.ne	LBB0_7
; %bb.48:
	cmp	w9, #56
	b.ne	LBB0_7
; %bb.49:
	cmp	w8, #88
	b.ne	LBB0_7
; %bb.50:
	mov	x0, x19
	bl	_fclose
Lloh46:
	adrp	x8, _AFILE_ATX@GOTPAGE
Lloh47:
	ldr	x8, [x8, _AFILE_ATX@GOTPAGEOFF]
LBB0_51:
	ldr	w0, [x8]
	ldr	x8, [sp, #24]
Lloh48:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh49:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh50:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_53
; %bb.52:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_53:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_35-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>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(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_7-LBB0_5)>>2
	.byte	(LBB0_45-LBB0_5)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

	.comm	_AFILE_ERROR,4,2                ; @AFILE_ERROR
	.comm	_AFILE_BAS,4,2                  ; @AFILE_BAS
l_.str.1:                               ; @.str.1
	.asciz	"\"%s\" is a compressed file."

l_.str.2:                               ; @.str.2
	.asciz	"This executable does not support compressed files. You can uncompress this file"

l_.str.3:                               ; @.str.3
	.asciz	"with an external program that supports gzip (*.gz) files (e.g. gunzip)"

l_.str.4:                               ; @.str.4
	.asciz	"and then load into this emulator."

	.comm	_AFILE_LST,4,2                  ; @AFILE_LST
	.comm	_AFILE_STATE,4,2                ; @AFILE_STATE
	.comm	_AFILE_ATX,4,2                  ; @AFILE_ATX
	.comm	_AFILE_CART,4,2                 ; @AFILE_CART
	.comm	_AFILE_ATR,4,2                  ; @AFILE_ATR
	.comm	_AFILE_DCM,4,2                  ; @AFILE_DCM
	.comm	_AFILE_XEX,4,2                  ; @AFILE_XEX
	.comm	_AFILE_PRO,4,2                  ; @AFILE_PRO
	.comm	_CARTRIDGE_MAX_SIZE,4,2         ; @CARTRIDGE_MAX_SIZE
	.comm	_AFILE_ROM,4,2                  ; @AFILE_ROM
	.comm	_AFILE_BOOT_TAPE,4,2            ; @AFILE_BOOT_TAPE
	.comm	_AFILE_XFD,4,2                  ; @AFILE_XFD
	.comm	_AFILE_CAS,4,2                  ; @AFILE_CAS
	.comm	_AFILE_ATR_GZ,4,2               ; @AFILE_ATR_GZ
	.comm	_AFILE_STATE_GZ,4,2             ; @AFILE_STATE_GZ
	.comm	_AFILE_XFD_GZ,4,2               ; @AFILE_XFD_GZ
.subsections_via_symbols
