	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SYSROM_WriteConfig             ## -- Begin function SYSROM_WriteConfig
	.p2align	4, 0x90
_SYSROM_WriteConfig:                    ## @SYSROM_WriteConfig
	.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	%rdi, %r12
	movq	_SYSROM_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movl	$8, %ebx
	movq	_SYSROM_roms@GOTPCREL(%rip), %r13
	leaq	L_.str(%rip), %r14
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	movslq	%eax, %rcx
	addq	$16, %rbx
	cmpq	%rcx, %r15
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rcx
	cmpl	$0, (%rcx,%rbx)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_cfg_strings@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r15,8), %rdx
	movq	-8(%rcx,%rbx), %rcx
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	_SYSROM_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_4
LBB0_5:
	movq	_cfg_strings_rev@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	_SYSROM_os_versions@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	_Atari800_MACHINE_800@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	(%rax,%rcx,8), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	movq	_Atari800_MACHINE_XLXE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	(%rax,%rcx,8), %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	movq	_Atari800_MACHINE_5200@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	(%rax,%rcx,8), %rdx
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%r14), %rax
	movq	_SYSROM_basic_version@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rdx
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%r14), %rax
	movq	_SYSROM_xegame_version@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rdx
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fprintf                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SYSROM_SIZE,4,2                ## @SYSROM_SIZE
	.comm	_SYSROM_roms,8,3                ## @SYSROM_roms
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s=%s\n"

	.comm	_cfg_strings,8,3                ## @cfg_strings
L_.str.1:                               ## @.str.1
	.asciz	"OS_400/800_VERSION=%s\n"

	.comm	_cfg_strings_rev,8,3            ## @cfg_strings_rev
	.comm	_SYSROM_os_versions,8,3         ## @SYSROM_os_versions
	.comm	_Atari800_MACHINE_800,8,3       ## @Atari800_MACHINE_800
L_.str.2:                               ## @.str.2
	.asciz	"OS_XL/XE_VERSION=%s\n"

	.comm	_Atari800_MACHINE_XLXE,8,3      ## @Atari800_MACHINE_XLXE
L_.str.3:                               ## @.str.3
	.asciz	"OS_5200_VERSION=%s\n"

	.comm	_Atari800_MACHINE_5200,8,3      ## @Atari800_MACHINE_5200
L_.str.4:                               ## @.str.4
	.asciz	"BASIC_VERSION=%s\n"

	.comm	_SYSROM_basic_version,8,3       ## @SYSROM_basic_version
L_.str.5:                               ## @.str.5
	.asciz	"XEGS_GAME_VERSION=%s\n"

	.comm	_SYSROM_xegame_version,8,3      ## @SYSROM_xegame_version
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SYSROM_WriteConfig             ; -- Begin function SYSROM_WriteConfig
	.p2align	2
_SYSROM_WriteConfig:                    ; @SYSROM_WriteConfig
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x21, _SYSROM_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SYSROM_SIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x22, #0
	mov	x23, #0
Lloh2:
	adrp	x24, _SYSROM_roms@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SYSROM_roms@GOTPAGEOFF]
Lloh4:
	adrp	x25, _cfg_strings@GOTPAGE
Lloh5:
	ldr	x25, [x25, _cfg_strings@GOTPAGEOFF]
Lloh6:
	adrp	x20, l_.str@PAGE
Lloh7:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	add	x22, x22, #16
	cmp	x23, w8, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x24]
	add	x10, x9, x22
	ldr	w10, [x10, #8]
	cbnz	w10, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x25]
	ldr	x2, [x8, x23, lsl #3]
	ldr	x8, [x9, x22]
	str	x8, [sp]
	mov	x0, x19
	mov	x1, x20
	bl	_fprintf
	ldr	w8, [x21]
	b	LBB0_2
LBB0_5:
Lloh8:
	adrp	x20, _cfg_strings_rev@GOTPAGE
Lloh9:
	ldr	x20, [x20, _cfg_strings_rev@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh10:
	adrp	x21, _SYSROM_os_versions@GOTPAGE
Lloh11:
	ldr	x21, [x21, _SYSROM_os_versions@GOTPAGEOFF]
Lloh12:
	adrp	x9, _Atari800_MACHINE_800@GOTPAGE
Lloh13:
	ldr	x9, [x9, _Atari800_MACHINE_800@GOTPAGEOFF]
	ldr	x10, [x21]
Lloh14:
	ldr	x9, [x9]
	ldr	x9, [x10, x9, lsl #3]
	ldr	x2, [x8, x9, lsl #3]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	ldr	x8, [x20]
Lloh17:
	adrp	x9, _Atari800_MACHINE_XLXE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _Atari800_MACHINE_XLXE@GOTPAGEOFF]
	ldr	x10, [x21]
Lloh19:
	ldr	x9, [x9]
	ldr	x9, [x10, x9, lsl #3]
	ldr	x2, [x8, x9, lsl #3]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	ldr	x8, [x20]
Lloh22:
	adrp	x9, _Atari800_MACHINE_5200@GOTPAGE
Lloh23:
	ldr	x9, [x9, _Atari800_MACHINE_5200@GOTPAGEOFF]
	ldr	x10, [x21]
Lloh24:
	ldr	x9, [x9]
	ldr	x9, [x10, x9, lsl #3]
	ldr	x2, [x8, x9, lsl #3]
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	ldr	x8, [x20]
Lloh27:
	adrp	x9, _SYSROM_basic_version@GOTPAGE
Lloh28:
	ldr	x9, [x9, _SYSROM_basic_version@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	ldr	x2, [x8, x9, lsl #3]
Lloh30:
	adrp	x1, l_.str.4@PAGE
Lloh31:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	ldr	x8, [x20]
Lloh32:
	adrp	x9, _SYSROM_xegame_version@GOTPAGE
Lloh33:
	ldr	x9, [x9, _SYSROM_xegame_version@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	ldr	x2, [x8, x9, lsl #3]
Lloh35:
	adrp	x1, l_.str.5@PAGE
Lloh36:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_fprintf
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_SYSROM_SIZE,4,2                ; @SYSROM_SIZE
	.comm	_SYSROM_roms,8,3                ; @SYSROM_roms
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s=%s\n"

	.comm	_cfg_strings,8,3                ; @cfg_strings
l_.str.1:                               ; @.str.1
	.asciz	"OS_400/800_VERSION=%s\n"

	.comm	_cfg_strings_rev,8,3            ; @cfg_strings_rev
	.comm	_SYSROM_os_versions,8,3         ; @SYSROM_os_versions
	.comm	_Atari800_MACHINE_800,8,3       ; @Atari800_MACHINE_800
l_.str.2:                               ; @.str.2
	.asciz	"OS_XL/XE_VERSION=%s\n"

	.comm	_Atari800_MACHINE_XLXE,8,3      ; @Atari800_MACHINE_XLXE
l_.str.3:                               ; @.str.3
	.asciz	"OS_5200_VERSION=%s\n"

	.comm	_Atari800_MACHINE_5200,8,3      ; @Atari800_MACHINE_5200
l_.str.4:                               ; @.str.4
	.asciz	"BASIC_VERSION=%s\n"

	.comm	_SYSROM_basic_version,8,3       ; @SYSROM_basic_version
l_.str.5:                               ; @.str.5
	.asciz	"XEGS_GAME_VERSION=%s\n"

	.comm	_SYSROM_xegame_version,8,3      ; @SYSROM_xegame_version
.subsections_via_symbols
