	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SYSROM_ChooseROMs              ## -- Begin function SYSROM_ChooseROMs
	.p2align	4, 0x90
_SYSROM_ChooseROMs:                     ## @SYSROM_ChooseROMs
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, %r15
	movq	%rcx, %r12
	movl	%edi, %ebx
	movq	_SYSROM_os_versions@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	movl	(%rax,%rcx,4), %eax
	movq	_SYSROM_AUTO@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	jne	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_SYSROM_AutoChooseOS
LBB0_2:
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movq	_SYSROM_roms@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%eax, %rdx
	movq	(%rcx,%rdx,8), %rdx
	xorl	%ecx, %ecx
	cmpb	$1, (%rdx)
	sbbl	%ecx, %ecx
	orl	%eax, %ecx
	jmp	LBB0_5
LBB0_3:
	movl	$-1, %ecx
LBB0_5:
	movl	%ecx, (%r12)
	movq	_Atari800_MACHINE_5200@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_7
## %bb.6:
	movl	$-1, (%r15)
	jmp	LBB0_18
LBB0_7:
	movq	_SYSROM_basic_version@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	(%r13), %eax
	jne	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_SYSROM_AutoChooseBASIC
LBB0_9:
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.11:
	movq	_SYSROM_roms@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%eax, %rdx
	movq	(%rcx,%rdx,8), %rdx
	xorl	%ecx, %ecx
	cmpb	$1, (%rdx)
	sbbl	%ecx, %ecx
	orl	%eax, %ecx
	jmp	LBB0_12
LBB0_10:
	movl	$-1, %ecx
LBB0_12:
	movl	%ecx, (%r15)
	movq	_SYSROM_xegame_version@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	(%r13), %eax
	jne	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	callq	_SYSROM_AutoChooseXEGame
LBB0_14:
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.16:
	movq	_SYSROM_roms@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%eax, %rdx
	movq	(%rcx,%rdx,8), %rdx
	xorl	%ecx, %ecx
	cmpb	$1, (%rdx)
	sbbl	%ecx, %ecx
	orl	%eax, %ecx
	jmp	LBB0_17
LBB0_15:
	movl	$-1, %ecx
LBB0_17:
	movl	%ecx, (%r14)
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYSROM_os_versions,8,3         ## @SYSROM_os_versions
	.comm	_SYSROM_AUTO,4,2                ## @SYSROM_AUTO
	.comm	_SYSROM_roms,8,3                ## @SYSROM_roms
	.comm	_Atari800_MACHINE_5200,4,2      ## @Atari800_MACHINE_5200
	.comm	_SYSROM_basic_version,4,2       ## @SYSROM_basic_version
	.comm	_SYSROM_xegame_version,4,2      ## @SYSROM_xegame_version
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SYSROM_ChooseROMs              ; -- Begin function SYSROM_ChooseROMs
	.p2align	2
_SYSROM_ChooseROMs:                     ; @SYSROM_ChooseROMs
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x5
	mov	x20, x4
	mov	x22, x3
	mov	x21, x0
Lloh0:
	adrp	x8, _SYSROM_os_versions@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYSROM_os_versions@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w0, [x8, w0, sxtw #2]
Lloh3:
	adrp	x23, _SYSROM_AUTO@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SYSROM_AUTO@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_SYSROM_AutoChooseOS
LBB0_2:
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _SYSROM_roms@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SYSROM_roms@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x8, [x8, w0, sxtw #3]
	ldrb	w8, [x8]
	cmp	w8, #0
	csinv	w8, w0, wzr, ne
	b	LBB0_5
LBB0_4:
	mov	w8, #-1
LBB0_5:
	str	w8, [x22]
Lloh8:
	adrp	x8, _Atari800_MACHINE_5200@GOTPAGE
Lloh9:
	ldr	x8, [x8, _Atari800_MACHINE_5200@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_7
; %bb.6:
	mov	w8, #-1
	str	w8, [x20]
	b	LBB0_18
LBB0_7:
Lloh11:
	adrp	x8, _SYSROM_basic_version@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SYSROM_basic_version@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.8:
	bl	_SYSROM_AutoChooseBASIC
LBB0_9:
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.10:
Lloh14:
	adrp	x8, _SYSROM_roms@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SYSROM_roms@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	x8, [x8, w0, sxtw #3]
	ldrb	w8, [x8]
	cmp	w8, #0
	csinv	w8, w0, wzr, ne
	b	LBB0_12
LBB0_11:
	mov	w8, #-1
LBB0_12:
	str	w8, [x20]
Lloh17:
	adrp	x8, _SYSROM_xegame_version@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SYSROM_xegame_version@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_14
; %bb.13:
	bl	_SYSROM_AutoChooseXEGame
LBB0_14:
	cmn	w0, #1
	b.eq	LBB0_16
; %bb.15:
Lloh20:
	adrp	x8, _SYSROM_roms@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SYSROM_roms@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	ldr	x8, [x8, w0, sxtw #3]
	ldrb	w8, [x8]
	cmp	w8, #0
	csinv	w8, w0, wzr, ne
	b	LBB0_17
LBB0_16:
	mov	w8, #-1
LBB0_17:
	str	w8, [x19]
LBB0_18:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SYSROM_os_versions,8,3         ; @SYSROM_os_versions
	.comm	_SYSROM_AUTO,4,2                ; @SYSROM_AUTO
	.comm	_SYSROM_roms,8,3                ; @SYSROM_roms
	.comm	_Atari800_MACHINE_5200,4,2      ; @Atari800_MACHINE_5200
	.comm	_SYSROM_basic_version,4,2       ; @SYSROM_basic_version
	.comm	_SYSROM_xegame_version,4,2      ; @SYSROM_xegame_version
.subsections_via_symbols
