	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_config                    ## -- Begin function read_config
	.p2align	4, 0x90
_read_config:                           ## @read_config
	.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	$280, %rsp                      ## imm = 0x118
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r14
	leaq	-304(%rbp), %rdi
	movl	$256, %esi                      ## imm = 0x100
	movq	%rax, %rdx
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	leaq	-304(%rbp), %r15
	leaq	L_.str.3(%rip), %rbx
	movl	$0, -308(%rbp)                  ## 4-byte Folded Spill
	movq	%r14, -320(%rbp)                ## 8-byte Spill
	jmp	LBB0_5
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str.4(%rip), %rdi
LBB0_20:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rsi
LBB0_21:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_printf
LBB0_51:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, -308(%rbp)                  ## 4-byte Folded Spill
LBB0_52:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	movl	$256, %esi                      ## imm = 0x100
	movq	%r14, %rdx
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_53
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
	movq	%r15, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	cmpl	$2, %eax
	jl	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leal	-2(%rax), %ecx
	cmpb	$13, -304(%rbp,%rcx)
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	leal	-1(%rax), %edx
	cmpb	$10, -304(%rbp,%rdx)
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	addq	%rbp, %rcx
	addq	$-304, %rcx                     ## imm = 0xFED0
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$1, %eax
	jne	LBB0_13
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	decl	%eax
	leaq	(%rax,%rbp), %rcx
	addq	$-304, %rcx                     ## imm = 0xFED0
	movb	-304(%rbp,%rax), %al
	cmpb	$13, %al
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$10, %al
	jne	LBB0_13
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movb	$0, (%rcx)
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	movl	$61, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_52
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r12
	incq	%r12
	movb	$0, (%rax)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	$9, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_15
## %bb.25:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	leaq	L_.str.6(%rip), %rsi
	movl	$7, %edx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_52
## %bb.26:                              ##   in Loop: Header=BB0_5 Depth=1
	movzbl	-297(%rbp), %r13d
	leal	-53(%r13), %eax
	cmpb	$-6, %al
	ja	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movsbq	-295(%rbp), %r13
	leal	-52(%r13), %eax
	cmpb	$-4, %al
	jb	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_JOYSTICKTYPES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_23
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_joyparams@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r12, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_18
## %bb.22:                              ##   in Loop: Header=BB0_17 Depth=2
	incq	%rbx
	movq	_JOYSTICKTYPES@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jl	LBB0_17
	jmp	LBB0_23
LBB0_28:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_keysets@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-384(%rax,%r13,8), %rdx
	leaq	4(%rdx), %rcx
	leaq	8(%rdx), %r8
	leaq	12(%rdx), %r9
	leaq	16(%rdx), %r10
	leaq	20(%rdx), %r11
	leaq	24(%rdx), %rax
	leaq	28(%rdx), %rbx
	leaq	32(%rdx), %r14
	subq	$8, %rsp
	movq	%r12, %rdi
	leaq	L_.str.8(%rip), %rsi
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	pushq	%r11
	pushq	%r10
	callq	_sscanf
	addq	$48, %rsp
	cmpl	$9, %eax
	movl	-308(%rbp), %ecx                ## 4-byte Reload
	je	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str.9(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_printf
	movl	$1, %ecx
LBB0_30:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_keysets@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	-384(%rax,%r13,8), %rax
	cmpl	$256, (%rax)                    ## imm = 0x100
	jb	LBB0_31
## %bb.32:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	$255, (%rax)
	movl	$1, -308(%rbp)                  ## 4-byte Folded Spill
	leaq	L_.str.10(%rip), %rdi
	movl	$1, %esi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_printf
	movq	(%rbx), %rax
	movq	-384(%rax,%r13,8), %rax
	jmp	LBB0_33
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_joytypes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, -192(%rax,%r13,4)
	movq	_JOYSTICKTYPES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_23:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%eax, %ebx
	leaq	L_.str.3(%rip), %rbx
	jne	LBB0_52
## %bb.24:                              ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str.5(%rip), %rdi
	movq	%r12, %rsi
	jmp	LBB0_21
LBB0_31:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%ecx, -308(%rbp)                ## 4-byte Spill
LBB0_33:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-320(%rbp), %r14                ## 8-byte Reload
	leaq	L_.str.3(%rip), %rbx
	cmpl	$256, 4(%rax)                   ## imm = 0x100
	jb	LBB0_34
## %bb.35:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	$255, 4(%rax)
	leaq	L_.str.10(%rip), %rdi
	movl	$2, %esi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_printf
	movq	_keysets@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-384(%rax,%r13,8), %rax
	movl	$1, %ecx
	cmpl	$256, 8(%rax)                   ## imm = 0x100
	jae	LBB0_37
	jmp	LBB0_38
LBB0_34:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	-308(%rbp), %ecx                ## 4-byte Reload
	cmpl	$256, 8(%rax)                   ## imm = 0x100
	jb	LBB0_38
LBB0_37:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$255, 8(%rax)
	leaq	L_.str.10(%rip), %rdi
	movl	$3, %esi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_printf
	movq	_keysets@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-384(%rax,%r13,8), %rax
	movl	$1, %ecx
LBB0_38:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$256, 12(%rax)                  ## imm = 0x100
	jae	LBB0_39
## %bb.40:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$256, 16(%rax)                  ## imm = 0x100
	jae	LBB0_41
LBB0_42:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$256, 20(%rax)                  ## imm = 0x100
	jae	LBB0_43
LBB0_44:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$256, 24(%rax)                  ## imm = 0x100
	jae	LBB0_45
LBB0_46:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpl	$256, 28(%rax)                  ## imm = 0x100
	jb	LBB0_47
LBB0_48:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$255, 28(%rax)
	leaq	L_.str.10(%rip), %rdi
	movl	$8, %esi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_printf
	movq	_keysets@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-384(%rax,%r13,8), %rax
	movl	$1, -308(%rbp)                  ## 4-byte Folded Spill
	cmpl	$256, 32(%rax)                  ## imm = 0x100
	jb	LBB0_52
	jmp	LBB0_50
LBB0_39:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$255, 12(%rax)
	leaq	L_.str.10(%rip), %rdi
	movl	$4, %esi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_printf
	movq	_keysets@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-384(%rax,%r13,8), %rax
	movl	$1, %ecx
	cmpl	$256, 16(%rax)                  ## imm = 0x100
	jb	LBB0_42
LBB0_41:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$255, 16(%rax)
	leaq	L_.str.10(%rip), %rdi
	movl	$5, %esi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_printf
	movq	_keysets@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-384(%rax,%r13,8), %rax
	movl	$1, %ecx
	cmpl	$256, 20(%rax)                  ## imm = 0x100
	jb	LBB0_44
LBB0_43:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$255, 20(%rax)
	leaq	L_.str.10(%rip), %rdi
	movl	$6, %esi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_printf
	movq	_keysets@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-384(%rax,%r13,8), %rax
	movl	$1, %ecx
	cmpl	$256, 24(%rax)                  ## imm = 0x100
	jb	LBB0_46
LBB0_45:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$255, 24(%rax)
	leaq	L_.str.10(%rip), %rdi
	movl	$7, %esi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_printf
	movq	_keysets@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-384(%rax,%r13,8), %rax
	movl	$1, %ecx
	cmpl	$256, 28(%rax)                  ## imm = 0x100
	jae	LBB0_48
LBB0_47:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%ecx, -308(%rbp)                ## 4-byte Spill
	cmpl	$256, 32(%rax)                  ## imm = 0x100
	jb	LBB0_52
LBB0_50:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$255, 32(%rax)
	leaq	L_.str.10(%rip), %rdi
	movl	$9, %esi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_51
LBB0_53:
	movq	%r14, %rdi
	callq	_fclose
	cmpl	$0, -308(%rbp)                  ## 4-byte Folded Reload
	je	LBB0_54
## %bb.56:
	movl	$1, %edi
	callq	_exit
LBB0_2:
	movq	%r14, %rdi
	callq	_fclose
LBB0_54:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_57
## %bb.55:
	addq	$280, %rsp                      ## imm = 0x118
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movl	$1, %edi
	callq	_exit
LBB0_57:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"atari800.cfg"

L_.str.1:                               ## @.str.1
	.asciz	"r"

L_.str.3:                               ## @.str.3
	.asciz	"JOYSTICK_"

L_.str.4:                               ## @.str.4
	.asciz	"Error in config lines: %s\n"

	.comm	_JOYSTICKTYPES,4,2              ## @JOYSTICKTYPES
	.comm	_joyparams,8,3                  ## @joyparams
	.comm	_joytypes,8,3                   ## @joytypes
L_.str.5:                               ## @.str.5
	.asciz	"Unrecognized joystick type %s\n"

L_.str.6:                               ## @.str.6
	.asciz	"KEYSET_"

L_.str.7:                               ## @.str.7
	.asciz	"Error in config line: %s\n"

L_.str.8:                               ## @.str.8
	.asciz	"%d %d %d %d %d %d %d %d %d"

	.comm	_keysets,8,3                    ## @keysets
L_.str.9:                               ## @.str.9
	.asciz	"Not enough parametres for KEYSET_x: %s\n"

L_.str.10:                              ## @.str.10
	.asciz	"Invalid %i. scancode in KEYSET parameter: %s\n"

L_str:                                  ## @str
	.asciz	"Error opening configuration file.\nExecute this utility from atari800 dir after configuring it!"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_read_config                    ; -- Begin function read_config
	.p2align	2
_read_config:                           ; @read_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #400
	.cfi_def_cfa_offset 400
	stp	x28, x27, [sp, #304]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #320]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #336]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #352]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #368]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #384]            ; 16-byte Folded Spill
	add	x29, sp, #384
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_51
; %bb.1:
	mov	x19, x0
	add	x27, sp, #32
	add	x0, sp, #32
	mov	w1, #256
	mov	x2, x19
	bl	_fgets
	cbz	x0, LBB0_48
; %bb.2:
	mov	w21, #0
Lloh7:
	adrp	x20, l_.str.3@PAGE
Lloh8:
	add	x20, x20, l_.str.3@PAGEOFF
Lloh9:
	adrp	x23, l_.str.4@PAGE
Lloh10:
	add	x23, x23, l_.str.4@PAGEOFF
Lloh11:
	adrp	x25, l_.str.6@PAGE
Lloh12:
	add	x25, x25, l_.str.6@PAGEOFF
Lloh13:
	adrp	x24, _keysets@GOTPAGE
Lloh14:
	ldr	x24, [x24, _keysets@GOTPAGEOFF]
	mov	w22, #255
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	x27, [sp]
	mov	x0, x23
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	bl	_printf
	mov	w21, #1
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #32
	mov	w1, #256
	mov	x2, x19
	bl	_fgets
	cbz	x0, LBB0_46
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_20 Depth 2
	add	x0, sp, #32
	bl	_strlen
	subs	w8, w0, #2
	b.lt	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x27, x8
	ldrb	w9, [x8]
	cmp	w9, #13
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	w9, w0, #1
	ldrb	w9, [x27, w9, uxtw]
	cmp	w9, #10
	b.ne	LBB0_10
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	cmp	w0, #1
	b.ne	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	w8, w0, #1
	add	x8, x27, x8
	ldrb	w9, [x8]
	cmp	w9, #13
	ccmp	w9, #10, #4, ne
	b.ne	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	strb	wzr, [x8]
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #32
	mov	w1, #61
	bl	_strchr
	cbz	x0, LBB0_5
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x28, x0
	strb	wzr, [x28], #1
	add	x0, sp, #32
	mov	x1, x20
	mov	w2, #9
	bl	_strncmp
	cbz	x0, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #32
	mov	x1, x25
	mov	w2, #7
	bl	_strncmp
	cbnz	x0, LBB0_5
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [sp, #39]
	sub	w9, w8, #53
	cmn	w9, #6
	b.hi	LBB0_22
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
	str	x27, [sp]
Lloh15:
	adrp	x0, l_.str.7@PAGE
Lloh16:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_4
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrsb	x9, [sp, #41]
	sub	w8, w9, #52
	and	w8, w8, #0xff
	cmp	w8, #252
	b.lo	LBB0_3
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh17:
	adrp	x8, _JOYSTICKTYPES@GOTPAGE
Lloh18:
	ldr	x8, [x8, _JOYSTICKTYPES@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_42
; %bb.19:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x26, #0
	sub	x22, x9, #48
LBB0_20:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
Lloh20:
	adrp	x8, _joyparams@GOTPAGE
Lloh21:
	ldr	x8, [x8, _joyparams@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	ldr	w1, [x8, x26, lsl #2]
	mov	x0, x28
	bl	_strcmp
	cbz	x0, LBB0_43
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	add	x26, x26, #1
Lloh23:
	adrp	x8, _JOYSTICKTYPES@GOTPAGE
Lloh24:
	ldr	x8, [x8, _JOYSTICKTYPES@GOTPAGEOFF]
Lloh25:
	ldrsw	x8, [x8]
	cmp	x26, x8
	b.lt	LBB0_20
	b	LBB0_44
LBB0_22:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	x26, x8, #48
	ldr	x8, [x24]
	ldr	x2, [x8, x26, lsl #3]
	add	x3, x2, #4
	add	x4, x2, #8
	add	x5, x2, #12
	add	x6, x2, #16
	add	x7, x2, #20
	add	x8, x2, #24
	add	x9, x2, #28
	add	x10, x2, #32
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
	mov	x0, x28
Lloh26:
	adrp	x1, l_.str.8@PAGE
Lloh27:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_sscanf
	cmp	w0, #9
	b.eq	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_6 Depth=1
	str	x28, [sp]
Lloh28:
	adrp	x0, l_.str.9@PAGE
Lloh29:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_printf
	mov	w21, #1
LBB0_24:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x24]
	ldr	x8, [x8, x26, lsl #3]
	ldr	w9, [x8]
	cmp	w9, #256
	b.lo	LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_6 Depth=1
	str	w22, [x8]
	mov	w21, #1
	stp	x21, x28, [sp]
Lloh30:
	adrp	x0, l_.str.10@PAGE
Lloh31:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_printf
	ldr	x8, [x24]
	ldr	x8, [x8, x26, lsl #3]
LBB0_26:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x8, #4]
	cmp	w9, #256
	b.lo	LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_6 Depth=1
	str	w22, [x8, #4]
	mov	w8, #2
	stp	x8, x28, [sp]
Lloh32:
	adrp	x0, l_.str.10@PAGE
Lloh33:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_printf
	ldr	x8, [x24]
	ldr	x8, [x8, x26, lsl #3]
	mov	w21, #1
LBB0_28:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x8, #8]
	cmp	w9, #256
	b.lo	LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_6 Depth=1
	str	w22, [x8, #8]
	mov	w8, #3
	stp	x8, x28, [sp]
Lloh34:
	adrp	x0, l_.str.10@PAGE
Lloh35:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_printf
	ldr	x8, [x24]
	ldr	x8, [x8, x26, lsl #3]
	mov	w21, #1
LBB0_30:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x8, #12]
	cmp	w9, #256
	b.lo	LBB0_32
; %bb.31:                               ;   in Loop: Header=BB0_6 Depth=1
	str	w22, [x8, #12]
	mov	w8, #4
	stp	x8, x28, [sp]
Lloh36:
	adrp	x0, l_.str.10@PAGE
Lloh37:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_printf
	ldr	x8, [x24]
	ldr	x8, [x8, x26, lsl #3]
	mov	w21, #1
LBB0_32:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x8, #16]
	cmp	w9, #256
	b.lo	LBB0_34
; %bb.33:                               ;   in Loop: Header=BB0_6 Depth=1
	str	w22, [x8, #16]
	mov	w8, #5
	stp	x8, x28, [sp]
Lloh38:
	adrp	x0, l_.str.10@PAGE
Lloh39:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_printf
	ldr	x8, [x24]
	ldr	x8, [x8, x26, lsl #3]
	mov	w21, #1
LBB0_34:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x8, #20]
	cmp	w9, #256
	b.lo	LBB0_36
; %bb.35:                               ;   in Loop: Header=BB0_6 Depth=1
	str	w22, [x8, #20]
	mov	w8, #6
	stp	x8, x28, [sp]
Lloh40:
	adrp	x0, l_.str.10@PAGE
Lloh41:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_printf
	ldr	x8, [x24]
	ldr	x8, [x8, x26, lsl #3]
	mov	w21, #1
LBB0_36:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x8, #24]
	cmp	w9, #256
	b.lo	LBB0_38
; %bb.37:                               ;   in Loop: Header=BB0_6 Depth=1
	str	w22, [x8, #24]
	mov	w8, #7
	stp	x8, x28, [sp]
Lloh42:
	adrp	x0, l_.str.10@PAGE
Lloh43:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_printf
	ldr	x8, [x24]
	ldr	x8, [x8, x26, lsl #3]
	mov	w21, #1
LBB0_38:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x8, #28]
	cmp	w9, #256
	b.lo	LBB0_40
; %bb.39:                               ;   in Loop: Header=BB0_6 Depth=1
	str	w22, [x8, #28]
	mov	w8, #8
	stp	x8, x28, [sp]
Lloh44:
	adrp	x0, l_.str.10@PAGE
Lloh45:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_printf
	ldr	x8, [x24]
	ldr	x8, [x8, x26, lsl #3]
	mov	w21, #1
LBB0_40:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x8, #32]
	cmp	w9, #256
	b.lo	LBB0_5
; %bb.41:                               ;   in Loop: Header=BB0_6 Depth=1
	str	w22, [x8, #32]
	mov	w8, #9
	stp	x8, x28, [sp]
Lloh46:
	adrp	x0, l_.str.10@PAGE
Lloh47:
	add	x0, x0, l_.str.10@PAGEOFF
	b	LBB0_4
LBB0_42:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w26, #0
	cmp	w26, w8
	b.ne	LBB0_5
	b	LBB0_45
LBB0_43:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh48:
	adrp	x8, _joytypes@GOTPAGE
Lloh49:
	ldr	x8, [x8, _joytypes@GOTPAGEOFF]
Lloh50:
	ldr	x8, [x8]
	str	w26, [x8, x22, lsl #2]
Lloh51:
	adrp	x8, _JOYSTICKTYPES@GOTPAGE
Lloh52:
	ldr	x8, [x8, _JOYSTICKTYPES@GOTPAGEOFF]
Lloh53:
	ldr	w8, [x8]
LBB0_44:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w22, #255
	cmp	w26, w8
	b.ne	LBB0_5
LBB0_45:                                ;   in Loop: Header=BB0_6 Depth=1
	str	x28, [sp]
Lloh54:
	adrp	x0, l_.str.5@PAGE
Lloh55:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_4
LBB0_46:
	mov	x0, x19
	bl	_fclose
	cbz	w21, LBB0_49
; %bb.47:
	mov	w0, #1
	bl	_exit
LBB0_48:
	mov	x0, x19
	bl	_fclose
LBB0_49:
	ldur	x8, [x29, #-96]
Lloh56:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh57:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh58:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_52
; %bb.50:
	ldp	x29, x30, [sp, #384]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #368]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #352]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #336]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #320]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #304]            ; 16-byte Folded Reload
	add	sp, sp, #400
	ret
LBB0_51:
Lloh59:
	adrp	x0, l_str@PAGE
Lloh60:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	w0, #1
	bl	_exit
LBB0_52:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpAdd	Lloh59, Lloh60
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"atari800.cfg"

l_.str.1:                               ; @.str.1
	.asciz	"r"

l_.str.3:                               ; @.str.3
	.asciz	"JOYSTICK_"

l_.str.4:                               ; @.str.4
	.asciz	"Error in config lines: %s\n"

	.comm	_JOYSTICKTYPES,4,2              ; @JOYSTICKTYPES
	.comm	_joyparams,8,3                  ; @joyparams
	.comm	_joytypes,8,3                   ; @joytypes
l_.str.5:                               ; @.str.5
	.asciz	"Unrecognized joystick type %s\n"

l_.str.6:                               ; @.str.6
	.asciz	"KEYSET_"

l_.str.7:                               ; @.str.7
	.asciz	"Error in config line: %s\n"

l_.str.8:                               ; @.str.8
	.asciz	"%d %d %d %d %d %d %d %d %d"

	.comm	_keysets,8,3                    ; @keysets
l_.str.9:                               ; @.str.9
	.asciz	"Not enough parametres for KEYSET_x: %s\n"

l_.str.10:                              ; @.str.10
	.asciz	"Invalid %i. scancode in KEYSET parameter: %s\n"

l_str:                                  ; @str
	.asciz	"Error opening configuration file.\nExecute this utility from atari800 dir after configuring it!"

.subsections_via_symbols
