	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdla_set_config
_sdla_set_config:                       ## @sdla_set_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	_EINVAL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r15d
	callq	_netdev_priv
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.1:
	xorl	%r15d, %r15d
	subl	(%rbx), %r15d
	jmp	LBB0_65
LBB0_2:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_valid_port@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movl	(%rdi,%rbx,4), %eax
	cmpl	(%r13), %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_5:
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	je	LBB0_13
## %bb.6:
	movl	(%r13), %edi
	movq	_SDLA_IO_EXTENTS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	16(%r14), %edx
	callq	_request_region
	testl	%eax, %eax
	je	LBB0_12
## %bb.7:
	movl	(%r13), %r12d
	movq	_SDLA_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx)
	movb	$0, 8(%rcx)
	movl	(%rbx), %eax
	movl	$1, %ebx
	cmpl	$2, %eax
	jl	LBB0_11
## %bb.8:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r12,%rbx), %edi
	callq	_inb
	cmpl	$255, %eax
	jne	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	incl	%ebx
	movq	_SDLA_IO_EXTENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jl	LBB0_9
LBB0_11:
	cmpl	%eax, %ebx
	je	LBB0_15
	jmp	LBB0_18
LBB0_12:
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_warn
LBB0_13:
	xorl	%r15d, %r15d
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_65
LBB0_14:
	movq	_SDLA_IO_EXTENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jne	LBB0_18
LBB0_15:
	movq	_SDLA_HALT@GOTPCREL(%rip), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movsbl	(%rax), %edi
	movq	_SDLA_REG_Z80_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	callq	_outb
	movq	_SDLA_S502_STS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	addl	%r12d, %edi
	callq	_inb
	andl	$15, %eax
	cmpl	$8, %eax
	jne	LBB0_18
## %bb.16:
	movq	_SDLA_S502E_INTACK@GOTPCREL(%rip), %rax
	movsbl	(%rax), %edi
	movq	_SDLA_REG_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	callq	_outb
	movl	(%rbx), %edi
	addl	%r12d, %edi
	callq	_inb
	andl	$15, %eax
	cmpl	$12, %eax
	jne	LBB0_18
## %bb.17:
	movb	$1, %al
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	$130, -60(%rbp)                 ## 4-byte Folded Spill
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_36
LBB0_18:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movl	%r12d, %edi
	callq	_inb
	movq	_SDLA_IO_EXTENTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_22
## %bb.19:
	movsbl	%al, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	leal	(%r12,%rbx), %edi
	callq	_inb
	cmpl	%r14d, %eax
	jne	LBB0_24
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	incl	%ebx
	movq	_SDLA_IO_EXTENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %ebx
	jl	LBB0_20
## %bb.23:
	cmpl	%ecx, %ebx
	je	LBB0_25
	jmp	LBB0_28
LBB0_22:
	xorl	%ebx, %ebx
	cmpl	%ecx, %ebx
	je	LBB0_25
	jmp	LBB0_28
LBB0_24:
	movq	_SDLA_IO_EXTENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %ebx
	jne	LBB0_28
LBB0_25:
	movq	_SDLA_HALT@GOTPCREL(%rip), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movsbl	(%rax), %edi
	movq	_SDLA_REG_CONTROL@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	addq	%r12, %rsi
	callq	_outb
	movq	_SDLA_S502_STS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	addl	%r12d, %edi
	callq	_inb
	andl	$126, %eax
	cmpl	$48, %eax
	jne	LBB0_28
## %bb.26:
	movq	_SDLA_S507_ENABLE@GOTPCREL(%rip), %rax
	movsbl	(%rax), %edi
	movq	(%r14), %rsi
	addq	%r12, %rsi
	callq	_outb
	movl	(%rbx), %edi
	addl	%r12d, %edi
	callq	_inb
	andl	$126, %eax
	cmpl	$50, %eax
	jne	LBB0_28
## %bb.27:
	movb	$1, %bl
	movl	$129, -60(%rbp)                 ## 4-byte Folded Spill
	jmp	LBB0_31
LBB0_28:
	movq	_SDLA_HALT@GOTPCREL(%rip), %r14
	movsbl	(%r14), %edi
	movq	_SDLA_REG_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	callq	_outb
	movq	_SDLA_S508_STS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	addl	%r12d, %edi
	callq	_inb
	testb	$63, %al
	jne	LBB0_32
## %bb.29:
	movq	_SDLA_S508_INTEN@GOTPCREL(%rip), %rax
	movsbl	(%rax), %edi
	movq	_SDLA_REG_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	callq	_outb
	movl	(%rbx), %edi
	addl	%r12d, %edi
	callq	_inb
	andl	$63, %eax
	cmpl	$16, %eax
	jne	LBB0_32
## %bb.30:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movb	$1, %bl
	movl	$128, -60(%rbp)                 ## 4-byte Folded Spill
LBB0_31:
	movl	$0, -56(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_37
LBB0_32:
	movq	_SDLA_S502A_HALT@GOTPCREL(%rip), %rax
	movsbl	(%rax), %edi
	movq	_SDLA_REG_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	callq	_outb
	movq	_SDLA_S502_STS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	addl	%r12d, %edi
	callq	_inb
	cmpl	$64, %eax
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_40
## %bb.33:
	movq	_SDLA_S502A_START@GOTPCREL(%rip), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movsbl	(%rax), %edi
	movq	_SDLA_REG_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	callq	_outb
	movl	(%rbx), %edi
	addl	%r12d, %edi
	callq	_inb
	cmpl	$64, %eax
	jne	LBB0_40
## %bb.34:
	movq	_SDLA_S502A_INTEN@GOTPCREL(%rip), %rax
	movsbl	(%rax), %edi
	movq	_SDLA_REG_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	callq	_outb
	movl	(%rbx), %edi
	addl	%r12d, %edi
	callq	_inb
	cmpl	$68, %eax
	jne	LBB0_40
## %bb.35:
	movb	$1, %al
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	$131, -60(%rbp)                 ## 4-byte Folded Spill
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
LBB0_36:
	xorl	%ebx, %ebx
LBB0_37:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movsbl	(%rax), %edi
	movq	_SDLA_REG_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r12, %rsi
	callq	_outb
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%rdx)
	cmpl	$895, %r12d                     ## imm = 0x37F
	jg	LBB0_41
## %bb.38:
	cmpl	$624, %r12d                     ## imm = 0x270
	je	LBB0_43
## %bb.39:
	cmpl	$640, %r12d                     ## imm = 0x280
	je	LBB0_43
	jmp	LBB0_44
LBB0_40:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_notice
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_64
LBB0_41:
	cmpl	$912, %r12d                     ## imm = 0x390
	je	LBB0_43
## %bb.42:
	cmpl	$896, %r12d                     ## imm = 0x380
	jne	LBB0_44
LBB0_43:
	testb	%bl, %bl
	je	LBB0_64
LBB0_44:
	movl	4(%r13), %eax
	cmpl	$15, %eax
	ja	LBB0_64
## %bb.45:
	movl	$39952, %ecx                    ## imm = 0x9C10
	btl	%eax, %ecx
	jae	LBB0_47
## %bb.46:
	testb	%bl, %bl
	jne	LBB0_51
	jmp	LBB0_64
LBB0_47:
	movl	$168, %ecx
	btl	%eax, %ecx
	jae	LBB0_49
## %bb.48:
	cmpb	$0, -56(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_51
	jmp	LBB0_64
LBB0_49:
	cmpl	$2, %eax
	jne	LBB0_64
## %bb.50:
	cmpb	$0, -52(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_64
LBB0_51:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_sdla_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edi
	movl	16(%r14), %ecx
	movq	%rdx, %rbx
	xorl	%edx, %edx
	movq	%r14, %r8
	callq	_request_irq
	testq	%rax, %rax
	jne	LBB0_64
## %bb.52:
	movq	%rbx, %rdx
	cmpl	$129, 4(%rbx)
	jne	LBB0_56
## %bb.53:
	movl	4(%r14), %eax
	addl	$-3, %eax
	cmpl	$12, %eax
	ja	LBB0_56
## %bb.54:
	movl	$5015, %ecx                     ## imm = 0x1397
	btl	%eax, %ecx
	jae	LBB0_56
## %bb.55:
	cltq
	leaq	l_switch.table.sdla_set_config(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movb	(%rax), %al
	movb	%al, 8(%rdx)
LBB0_56:
	movq	_valid_mem@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_61
## %bb.57:
	xorl	%ebx, %ebx
LBB0_58:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movl	(%rdi,%rbx,4), %eax
	cmpl	8(%r13), %eax
	je	LBB0_60
## %bb.59:                              ##   in Loop: Header=BB0_58 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_58
LBB0_60:
	movq	%r15, %rcx
	jmp	LBB0_62
LBB0_61:
	movq	%r15, %rcx
	xorl	%ebx, %ebx
LBB0_62:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	(%rcx), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jne	LBB0_66
LBB0_63:
	movl	4(%r13), %edi
	movq	%r14, %rsi
	callq	_free_irq
LBB0_64:
	negl	%r15d
	movq	_SDLA_IO_EXTENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_release_region
LBB0_65:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_66:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	cmpl	$129, %esi
	je	LBB0_69
## %bb.67:
	cmpl	$131, %esi
	jne	LBB0_73
## %bb.68:
	movl	8(%r13), %edx
	movl	%edx, %eax
	andl	$61440, %eax                    ## imm = 0xF000
	cmpl	$57344, %eax                    ## imm = 0xE000
	je	LBB0_63
	jmp	LBB0_74
LBB0_69:
	movl	8(%r13), %ecx
	movl	%ecx, %eax
	andl	$-65536, %eax                   ## imm = 0xFFFF0000
	cmpl	$851968, %eax                   ## imm = 0xD0000
	je	LBB0_63
## %bb.70:
	movq	_SDLA_8K_WINDOW@GOTPCREL(%rip), %rdx
	movl	%ecx, %eax
	shrl	$12, %eax
	andb	$15, %al
	orb	(%rdx), %al
	shrl	$16, %ecx
	addl	$-10, %ecx
	cmpw	$4, %cx
	ja	LBB0_83
## %bb.71:
	movzwl	%cx, %ecx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmpq	*%rcx
LBB0_72:
	movq	_SDLA_S507_SEG_A@GOTPCREL(%rip), %rcx
	jmp	LBB0_94
LBB0_73:
	movl	8(%r13), %edx
LBB0_74:
	movl	%edx, %eax
	andl	$-65536, %eax                   ## imm = 0xFFFF0000
	cmpl	$720896, %eax                   ## imm = 0xB0000
	je	LBB0_63
## %bb.75:
	movl	%edx, %eax
	andl	$61440, %eax                    ## imm = 0xF000
	xorl	%edi, %edi
	cmpl	$128, %esi
	sete	%cl
	movq	_SDLA_8K_WINDOW@GOTPCREL(%rip), %rbx
	movzbl	(%rbx), %ebx
	cmovel	%edi, %ebx
	orb	$12, %cl
	shrl	%cl, %eax
	orl	%ebx, %eax
	leal	-130(%rsi), %ecx
	cmpl	$2, %ecx
	jae	LBB0_79
## %bb.76:
	shrl	$16, %edx
	addl	$-10, %edx
	cmpw	$4, %dx
	ja	LBB0_83
## %bb.77:
	movzwl	%dx, %ecx
	leaq	LJTI0_2(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmpq	*%rcx
LBB0_78:
	movq	_SDLA_S502_SEG_A@GOTPCREL(%rip), %rcx
	jmp	LBB0_94
LBB0_79:
	cmpl	$128, %esi
	jne	LBB0_83
## %bb.80:
	shrl	$16, %edx
	addl	$-10, %edx
	cmpw	$4, %dx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	ja	LBB0_95
## %bb.81:
	movzwl	%dx, %ecx
	leaq	LJTI0_1(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_82:
	movq	_SDLA_S508_SEG_A@GOTPCREL(%rip), %rcx
	jmp	LBB0_94
LBB0_83:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_95
LBB0_84:
	movq	_SDLA_S507_SEG_B@GOTPCREL(%rip), %rcx
	jmp	LBB0_94
LBB0_85:
	movq	_SDLA_S507_SEG_C@GOTPCREL(%rip), %rcx
	jmp	LBB0_94
LBB0_86:
	movq	_SDLA_S507_SEG_E@GOTPCREL(%rip), %rcx
	jmp	LBB0_94
LBB0_87:
	movq	_SDLA_S502_SEG_C@GOTPCREL(%rip), %rcx
	jmp	LBB0_94
LBB0_88:
	movq	_SDLA_S502_SEG_D@GOTPCREL(%rip), %rcx
	jmp	LBB0_94
LBB0_89:
	movq	_SDLA_S502_SEG_E@GOTPCREL(%rip), %rcx
	jmp	LBB0_94
LBB0_91:
	movq	_SDLA_S508_SEG_C@GOTPCREL(%rip), %rcx
	jmp	LBB0_94
LBB0_92:
	movq	_SDLA_S508_SEG_D@GOTPCREL(%rip), %rcx
	jmp	LBB0_94
LBB0_93:
	movq	_SDLA_S508_SEG_E@GOTPCREL(%rip), %rcx
LBB0_94:
	orb	(%rcx), %al
LBB0_95:
	movq	_SDLA_REG_PC_WINDOW@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	%r12, %rsi
	movsbl	%al, %edi
	callq	_outb
	movl	4(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_99
## %bb.96:
	cmpl	$129, %eax
	je	LBB0_101
## %bb.97:
	cmpl	$130, %eax
	jne	LBB0_103
## %bb.98:
	movq	_SDLA_S502E_ENABLE@GOTPCREL(%rip), %rax
	jmp	LBB0_100
LBB0_99:
	movq	_SDLA_MEMEN@GOTPCREL(%rip), %rax
LBB0_100:
	movb	(%rax), %al
	jmp	LBB0_102
LBB0_101:
	movq	_SDLA_MEMEN@GOTPCREL(%rip), %rcx
	movb	8(%rbx), %al
	orb	(%rcx), %al
LBB0_102:
	movb	%al, 8(%rbx)
	jmp	LBB0_104
LBB0_103:
	movb	8(%rbx), %al
LBB0_104:
	movq	_SDLA_REG_CONTROL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	%r12, %rsi
	movsbl	%al, %edi
	callq	_outb
	movl	4(%r13), %eax
	movl	%eax, 4(%r14)
	movl	%r12d, (%r14)
	movl	8(%r13), %eax
	movl	%eax, 8(%r14)
	addl	$8192, %eax                     ## imm = 0x2000
	movl	%eax, 12(%r14)
	movl	$1, (%rbx)
	xorl	%r15d, %r15d
	jmp	LBB0_65
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_72, LBB0_72-LJTI0_0
.set L0_0_set_84, LBB0_84-LJTI0_0
.set L0_0_set_85, LBB0_85-LJTI0_0
.set L0_0_set_95, LBB0_95-LJTI0_0
.set L0_0_set_86, LBB0_86-LJTI0_0
LJTI0_0:
	.long	L0_0_set_72
	.long	L0_0_set_84
	.long	L0_0_set_85
	.long	L0_0_set_95
	.long	L0_0_set_86
.set L0_1_set_82, LBB0_82-LJTI0_1
.set L0_1_set_95, LBB0_95-LJTI0_1
.set L0_1_set_91, LBB0_91-LJTI0_1
.set L0_1_set_92, LBB0_92-LJTI0_1
.set L0_1_set_93, LBB0_93-LJTI0_1
LJTI0_1:
	.long	L0_1_set_82
	.long	L0_1_set_95
	.long	L0_1_set_91
	.long	L0_1_set_92
	.long	L0_1_set_93
.set L0_2_set_78, LBB0_78-LJTI0_2
.set L0_2_set_95, LBB0_95-LJTI0_2
.set L0_2_set_87, LBB0_87-LJTI0_2
.set L0_2_set_88, LBB0_88-LJTI0_2
.set L0_2_set_89, LBB0_89-LJTI0_2
LJTI0_2:
	.long	L0_2_set_78
	.long	L0_2_set_95
	.long	L0_2_set_87
	.long	L0_2_set_88
	.long	L0_2_set_89
	.end_data_region
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_valid_port,8,3                 ## @valid_port
	.comm	_SDLA_IO_EXTENTS,4,2            ## @SDLA_IO_EXTENTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"io-port 0x%04lx in use\n"

	.comm	_SDLA_UNKNOWN,4,2               ## @SDLA_UNKNOWN
	.comm	_SDLA_HALT,1,0                  ## @SDLA_HALT
	.comm	_SDLA_REG_Z80_CONTROL,8,3       ## @SDLA_REG_Z80_CONTROL
	.comm	_SDLA_S502_STS,4,2              ## @SDLA_S502_STS
	.comm	_SDLA_S502E_INTACK,1,0          ## @SDLA_S502E_INTACK
	.comm	_SDLA_REG_CONTROL,8,3           ## @SDLA_REG_CONTROL
	.comm	_SDLA_S507_ENABLE,1,0           ## @SDLA_S507_ENABLE
	.comm	_SDLA_S508_STS,4,2              ## @SDLA_S508_STS
	.comm	_SDLA_S508_INTEN,1,0            ## @SDLA_S508_INTEN
	.comm	_SDLA_S502A_HALT,1,0            ## @SDLA_S502A_HALT
	.comm	_SDLA_S502A_START,1,0           ## @SDLA_S502A_START
	.comm	_SDLA_S502A_INTEN,1,0           ## @SDLA_S502A_INTEN
L_.str.1:                               ## @.str.1
	.asciz	"Unknown card type\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_sdla_isr,4,2                   ## @sdla_isr
	.comm	_SDLA_S507_IRQ3,1,0             ## @SDLA_S507_IRQ3
	.comm	_SDLA_S507_IRQ4,1,0             ## @SDLA_S507_IRQ4
	.comm	_SDLA_S507_IRQ5,1,0             ## @SDLA_S507_IRQ5
	.comm	_SDLA_S507_IRQ7,1,0             ## @SDLA_S507_IRQ7
	.comm	_SDLA_S507_IRQ10,1,0            ## @SDLA_S507_IRQ10
	.comm	_SDLA_S507_IRQ11,1,0            ## @SDLA_S507_IRQ11
	.comm	_SDLA_S507_IRQ12,1,0            ## @SDLA_S507_IRQ12
	.comm	_SDLA_S507_IRQ15,1,0            ## @SDLA_S507_IRQ15
	.comm	_valid_mem,8,3                  ## @valid_mem
	.comm	_SDLA_8K_WINDOW,1,0             ## @SDLA_8K_WINDOW
	.comm	_SDLA_S502_SEG_A,1,0            ## @SDLA_S502_SEG_A
	.comm	_SDLA_S502_SEG_C,1,0            ## @SDLA_S502_SEG_C
	.comm	_SDLA_S502_SEG_D,1,0            ## @SDLA_S502_SEG_D
	.comm	_SDLA_S502_SEG_E,1,0            ## @SDLA_S502_SEG_E
	.comm	_SDLA_S507_SEG_A,1,0            ## @SDLA_S507_SEG_A
	.comm	_SDLA_S507_SEG_B,1,0            ## @SDLA_S507_SEG_B
	.comm	_SDLA_S507_SEG_C,1,0            ## @SDLA_S507_SEG_C
	.comm	_SDLA_S507_SEG_E,1,0            ## @SDLA_S507_SEG_E
	.comm	_SDLA_S508_SEG_A,1,0            ## @SDLA_S508_SEG_A
	.comm	_SDLA_S508_SEG_C,1,0            ## @SDLA_S508_SEG_C
	.comm	_SDLA_S508_SEG_D,1,0            ## @SDLA_S508_SEG_D
	.comm	_SDLA_S508_SEG_E,1,0            ## @SDLA_S508_SEG_E
	.comm	_SDLA_REG_PC_WINDOW,8,3         ## @SDLA_REG_PC_WINDOW
	.comm	_SDLA_S502E_ENABLE,1,0          ## @SDLA_S502E_ENABLE
	.comm	_SDLA_MEMEN,1,0                 ## @SDLA_MEMEN
	.no_dead_strip	_sdla_set_config
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.sdla_set_config
l_switch.table.sdla_set_config:
	.quad	_SDLA_S507_IRQ3
	.quad	_SDLA_S507_IRQ4
	.quad	_SDLA_S507_IRQ5
	.quad	_SDLA_S507_IRQ3
	.quad	_SDLA_S507_IRQ7
	.quad	_SDLA_S507_IRQ3
	.quad	_SDLA_S507_IRQ3
	.quad	_SDLA_S507_IRQ10
	.quad	_SDLA_S507_IRQ11
	.quad	_SDLA_S507_IRQ12
	.quad	_SDLA_S507_IRQ3
	.quad	_SDLA_S507_IRQ3
	.quad	_SDLA_S507_IRQ15

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdla_set_config
_sdla_set_config:                       ; @sdla_set_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x25, _EINVAL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _EINVAL@GOTPAGEOFF]
	ldr	w26, [x25]
	bl	_netdev_priv
	ldr	w8, [x0]
	cbnz	w8, LBB0_12
; %bb.1:
	mov	x21, x0
Lloh2:
	adrp	x22, _valid_port@GOTPAGE
Lloh3:
	ldr	x22, [x22, _valid_port@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x23, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	ldr	w8, [x0, x23, lsl #2]
	ldr	w9, [x20]
	cmp	w8, w9
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	cmp	x23, w0, sxtw
	b.lt	LBB0_3
	b	LBB0_6
LBB0_5:
	mov	w23, #0
LBB0_6:
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w23, w0
	b.eq	LBB0_12
; %bb.7:
	ldr	w0, [x20]
Lloh4:
	adrp	x24, _SDLA_IO_EXTENTS@GOTPAGE
Lloh5:
	ldr	x24, [x24, _SDLA_IO_EXTENTS@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	w2, [x19, #16]
	bl	_request_region
	cbz	w0, LBB0_11
; %bb.8:
Lloh6:
	adrp	x8, _SDLA_UNKNOWN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDLA_UNKNOWN@GOTPAGEOFF]
	ldr	w22, [x20]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x21, #4]
	strb	wzr, [x21, #8]
	ldr	w8, [x24]
	mov	w23, #1
	cmp	w8, #2
	b.lt	LBB0_15
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	w0, w22, w23
	bl	_inb
	cmp	w0, #255
	b.ne	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w23, w23, #1
	ldr	w8, [x24]
	cmp	w23, w8
	b.lt	LBB0_9
	b	LBB0_15
LBB0_11:
	ldr	w1, [x19]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_12:
	ldr	w8, [x25]
	neg	w23, w8
LBB0_13:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_14:
	ldr	w8, [x24]
LBB0_15:
Lloh11:
	adrp	x27, _SDLA_REG_CONTROL@GOTPAGE
Lloh12:
	ldr	x27, [x27, _SDLA_REG_CONTROL@GOTPAGEOFF]
Lloh13:
	adrp	x28, _SDLA_S502_STS@GOTPAGE
Lloh14:
	ldr	x28, [x28, _SDLA_S502_STS@GOTPAGEOFF]
	cmp	w23, w8
	b.ne	LBB0_19
; %bb.16:
Lloh15:
	adrp	x8, _SDLA_HALT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SDLA_HALT@GOTPAGEOFF]
Lloh17:
	ldrsb	w0, [x8]
Lloh18:
	adrp	x8, _SDLA_REG_Z80_CONTROL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SDLA_REG_Z80_CONTROL@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	add	x1, x8, x22
	bl	_outb
	ldr	w8, [x28]
	add	w0, w8, w22
	bl	_inb
	and	w8, w0, #0xf
	cmp	w8, #8
	b.ne	LBB0_19
; %bb.17:
Lloh21:
	adrp	x8, _SDLA_S502E_INTACK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SDLA_S502E_INTACK@GOTPAGEOFF]
Lloh23:
	ldrsb	w0, [x8]
	ldr	x8, [x27]
	add	x1, x8, x22
	bl	_outb
	ldr	w8, [x28]
	add	w0, w8, w22
	bl	_inb
	and	w8, w0, #0xf
	cmp	w8, #12
	b.ne	LBB0_19
; %bb.18:
	mov	w28, #0
	mov	w23, #0
	mov	w8, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	mov	w27, #130
	b	LBB0_32
LBB0_19:
	mov	x0, x22
	bl	_inb
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.20:
	mov	x28, x27
	mov	w23, #0
	sxtb	w27, w0
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	add	w0, w22, w23
	bl	_inb
	cmp	w0, w27
	b.ne	LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	add	w23, w23, #1
	ldr	w8, [x24]
	cmp	w23, w8
	b.lt	LBB0_21
	b	LBB0_25
LBB0_23:
	mov	w23, #0
	cmp	w23, w8
	b.eq	LBB0_26
	b	LBB0_29
LBB0_24:
	ldr	w8, [x24]
LBB0_25:
	mov	x27, x28
Lloh24:
	adrp	x28, _SDLA_S502_STS@GOTPAGE
Lloh25:
	ldr	x28, [x28, _SDLA_S502_STS@GOTPAGEOFF]
	cmp	w23, w8
	b.ne	LBB0_29
LBB0_26:
Lloh26:
	adrp	x8, _SDLA_HALT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SDLA_HALT@GOTPAGEOFF]
Lloh28:
	ldrsb	w0, [x8]
	ldr	x8, [x27]
	add	x1, x8, x22
	bl	_outb
	ldr	w8, [x28]
	add	w0, w8, w22
	bl	_inb
	and	w8, w0, #0x7e
	cmp	w8, #48
	b.ne	LBB0_29
; %bb.27:
Lloh29:
	adrp	x8, _SDLA_S507_ENABLE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SDLA_S507_ENABLE@GOTPAGEOFF]
Lloh31:
	ldrsb	w0, [x8]
	ldr	x8, [x27]
	add	x1, x8, x22
	bl	_outb
	ldr	w8, [x28]
	add	w0, w8, w22
	bl	_inb
	and	w8, w0, #0x7e
	cmp	w8, #50
	b.ne	LBB0_29
; %bb.28:
	mov	w28, #0
	str	wzr, [sp, #12]                  ; 4-byte Folded Spill
	mov	w23, #1
	mov	w27, #129
	b	LBB0_32
LBB0_29:
Lloh32:
	adrp	x8, _SDLA_HALT@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SDLA_HALT@GOTPAGEOFF]
Lloh34:
	ldrsb	w0, [x8]
	ldr	x8, [x27]
	add	x1, x8, x22
	bl	_outb
Lloh35:
	adrp	x23, _SDLA_S508_STS@GOTPAGE
Lloh36:
	ldr	x23, [x23, _SDLA_S508_STS@GOTPAGEOFF]
	ldr	w8, [x23]
	add	w0, w8, w22
	bl	_inb
	tst	w0, #0x3f
	b.ne	LBB0_36
; %bb.30:
Lloh37:
	adrp	x8, _SDLA_S508_INTEN@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SDLA_S508_INTEN@GOTPAGEOFF]
Lloh39:
	ldrsb	w0, [x8]
	ldr	x8, [x27]
	add	x1, x8, x22
	bl	_outb
	ldr	w8, [x23]
	add	w0, w8, w22
	bl	_inb
	and	w8, w0, #0x3f
	cmp	w8, #16
	b.ne	LBB0_36
; %bb.31:
	mov	w28, #0
	str	wzr, [sp, #12]                  ; 4-byte Folded Spill
	mov	w23, #1
	mov	w27, #128
LBB0_32:
Lloh40:
	adrp	x8, _SDLA_HALT@GOTPAGE
Lloh41:
	ldr	x8, [x8, _SDLA_HALT@GOTPAGEOFF]
LBB0_33:
	ldrsb	w0, [x8]
Lloh42:
	adrp	x8, _SDLA_REG_CONTROL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _SDLA_REG_CONTROL@GOTPAGEOFF]
Lloh44:
	ldr	x8, [x8]
	add	x1, x8, x22
	bl	_outb
	str	w27, [x21, #4]
	cmp	w22, #895
	b.gt	LBB0_41
; %bb.34:
	cmp	w22, #624
	b.eq	LBB0_43
; %bb.35:
	cmp	w22, #640
	b.eq	LBB0_43
	b	LBB0_44
LBB0_36:
Lloh45:
	adrp	x8, _SDLA_S502A_HALT@GOTPAGE
Lloh46:
	ldr	x8, [x8, _SDLA_S502A_HALT@GOTPAGEOFF]
Lloh47:
	ldrsb	w0, [x8]
	ldr	x8, [x27]
	add	x1, x8, x22
	bl	_outb
	ldr	w8, [x28]
	add	w0, w8, w22
	bl	_inb
	cmp	w0, #64
	b.ne	LBB0_40
; %bb.37:
Lloh48:
	adrp	x8, _SDLA_S502A_START@GOTPAGE
Lloh49:
	ldr	x8, [x8, _SDLA_S502A_START@GOTPAGEOFF]
Lloh50:
	ldrsb	w0, [x8]
	ldr	x8, [x27]
	add	x1, x8, x22
	bl	_outb
	ldr	w8, [x28]
	add	w0, w8, w22
	bl	_inb
	cmp	w0, #64
	b.ne	LBB0_40
; %bb.38:
Lloh51:
	adrp	x8, _SDLA_S502A_INTEN@GOTPAGE
Lloh52:
	ldr	x8, [x8, _SDLA_S502A_INTEN@GOTPAGEOFF]
Lloh53:
	ldrsb	w0, [x8]
	ldr	x8, [x27]
	add	x1, x8, x22
	bl	_outb
	ldr	w8, [x28]
	add	w0, w8, w22
	bl	_inb
	cmp	w0, #68
	b.ne	LBB0_40
; %bb.39:
	str	wzr, [sp, #12]                  ; 4-byte Folded Spill
	mov	w23, #0
	mov	w28, #1
	mov	w27, #131
Lloh54:
	adrp	x8, _SDLA_S502A_START@GOTPAGE
Lloh55:
	ldr	x8, [x8, _SDLA_S502A_START@GOTPAGEOFF]
	b	LBB0_33
LBB0_40:
Lloh56:
	adrp	x1, l_.str.1@PAGE
Lloh57:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_notice
Lloh58:
	adrp	x8, _ENODEV@GOTPAGE
Lloh59:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh60:
	ldr	w26, [x8]
	b	LBB0_63
LBB0_41:
	cmp	w22, #912
	b.eq	LBB0_43
; %bb.42:
	cmp	w22, #896
	b.ne	LBB0_44
LBB0_43:
	cbz	w23, LBB0_63
LBB0_44:
	ldr	w8, [x20, #4]
	cmp	w8, #15
	b.hi	LBB0_63
; %bb.45:
	mov	w9, #1
	lsl	w9, w9, w8
	mov	w10, #39952
	tst	w9, w10
	b.eq	LBB0_47
; %bb.46:
	tbnz	w23, #0, LBB0_51
	b	LBB0_63
LBB0_47:
	mov	w10, #168
	tst	w9, w10
	b.eq	LBB0_49
; %bb.48:
	tbz	w28, #0, LBB0_51
	b	LBB0_63
LBB0_49:
	cmp	w8, #2
	b.ne	LBB0_63
; %bb.50:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	tbz	w8, #0, LBB0_63
LBB0_51:
Lloh61:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh62:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh63:
	ldr	w26, [x8]
	ldr	w0, [x19, #4]
Lloh64:
	adrp	x8, _sdla_isr@GOTPAGE
Lloh65:
	ldr	x8, [x8, _sdla_isr@GOTPAGEOFF]
Lloh66:
	ldr	w1, [x8]
	ldr	w3, [x19, #16]
	mov	w2, #0
	mov	x4, x19
	bl	_request_irq
	cbnz	x0, LBB0_63
; %bb.52:
	ldr	w8, [x21, #4]
	cmp	w8, #129
	b.ne	LBB0_56
; %bb.53:
	ldr	w8, [x19, #4]
	sub	w8, w8, #3
	cmp	w8, #12
	b.hi	LBB0_56
; %bb.54:
	mov	w9, #5015
	lsr	w9, w9, w8
	tbz	w9, #0, LBB0_56
; %bb.55:
Lloh67:
	adrp	x9, l_switch.table.sdla_set_config@PAGE
Lloh68:
	add	x9, x9, l_switch.table.sdla_set_config@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldrb	w8, [x8]
	strb	w8, [x21, #8]
LBB0_56:
Lloh69:
	adrp	x23, _valid_mem@GOTPAGE
Lloh70:
	ldr	x23, [x23, _valid_mem@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_60
; %bb.57:
	mov	x27, #0
LBB0_58:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23]
	ldr	w8, [x0, x27, lsl #2]
	ldr	w9, [x20, #8]
	cmp	w8, w9
	b.eq	LBB0_61
; %bb.59:                               ;   in Loop: Header=BB0_58 Depth=1
	add	x27, x27, #1
	bl	_ARRAY_SIZE
	cmp	x27, w0, sxtw
	b.lt	LBB0_58
	b	LBB0_61
LBB0_60:
	mov	w27, #0
LBB0_61:
	ldr	w26, [x25]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w27, w0
Lloh71:
	adrp	x23, _SDLA_REG_CONTROL@GOTPAGE
Lloh72:
	ldr	x23, [x23, _SDLA_REG_CONTROL@GOTPAGEOFF]
	b.ne	LBB0_64
LBB0_62:
	ldr	w0, [x20, #4]
	mov	x1, x19
	bl	_free_irq
LBB0_63:
	neg	w23, w26
	ldr	w1, [x24]
	mov	x0, x22
	bl	_release_region
	b	LBB0_13
LBB0_64:
	ldr	w9, [x21, #4]
	cmp	w9, #129
	b.eq	LBB0_67
; %bb.65:
	cmp	w9, #131
	b.ne	LBB0_71
; %bb.66:
	ldr	w10, [x20, #8]
	and	w8, w10, #0xf000
	cmp	w8, #14, lsl #12                ; =57344
	b.eq	LBB0_62
	b	LBB0_72
LBB0_67:
	ldr	w9, [x20, #8]
	and	w8, w9, #0xffff0000
	cmp	w8, #208, lsl #12               ; =851968
	b.eq	LBB0_62
; %bb.68:
Lloh73:
	adrp	x8, _SDLA_8K_WINDOW@GOTPAGE
Lloh74:
	ldr	x8, [x8, _SDLA_8K_WINDOW@GOTPAGEOFF]
	ldrb	w8, [x8]
	ubfx	w10, w9, #12, #4
	orr	w8, w10, w8
	lsr	w9, w9, #16
	sub	w9, w9, #10
	cmp	w9, #4
	b.hi	LBB0_91
; %bb.69:
Lloh75:
	adrp	x10, lJTI0_0@PAGE
Lloh76:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_70
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_70:
Lloh77:
	adrp	x9, _SDLA_S507_SEG_A@GOTPAGE
Lloh78:
	ldr	x9, [x9, _SDLA_S507_SEG_A@GOTPAGEOFF]
	b	LBB0_90
LBB0_71:
	ldr	w10, [x20, #8]
LBB0_72:
	and	w8, w10, #0xffff0000
	cmp	w8, #176, lsl #12               ; =720896
	b.eq	LBB0_62
; %bb.73:
Lloh79:
	adrp	x8, _SDLA_8K_WINDOW@GOTPAGE
Lloh80:
	ldr	x8, [x8, _SDLA_8K_WINDOW@GOTPAGEOFF]
	ldrb	w8, [x8]
	and	w11, w10, #0xf000
	mov	w12, #12
	cmp	w9, #128
	csel	w8, wzr, w8, eq
	cinc	w12, w12, eq
	lsr	w11, w11, w12
	orr	w8, w11, w8
	sub	w11, w9, #130
	cmp	w11, #2
	b.hs	LBB0_77
; %bb.74:
	lsr	w9, w10, #16
	sub	w9, w9, #10
	cmp	w9, #4
	b.hi	LBB0_91
; %bb.75:
Lloh81:
	adrp	x10, lJTI0_2@PAGE
Lloh82:
	add	x10, x10, lJTI0_2@PAGEOFF
	adr	x11, LBB0_76
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_76:
Lloh83:
	adrp	x9, _SDLA_S502_SEG_A@GOTPAGE
Lloh84:
	ldr	x9, [x9, _SDLA_S502_SEG_A@GOTPAGEOFF]
	b	LBB0_90
LBB0_77:
	cmp	w9, #128
	b.ne	LBB0_91
; %bb.78:
	lsr	w9, w10, #16
	sub	w9, w9, #10
	cmp	w9, #4
	b.hi	LBB0_91
; %bb.79:
Lloh85:
	adrp	x10, lJTI0_1@PAGE
Lloh86:
	add	x10, x10, lJTI0_1@PAGEOFF
	adr	x11, LBB0_80
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_80:
Lloh87:
	adrp	x9, _SDLA_S508_SEG_A@GOTPAGE
Lloh88:
	ldr	x9, [x9, _SDLA_S508_SEG_A@GOTPAGEOFF]
	b	LBB0_90
LBB0_81:
Lloh89:
	adrp	x9, _SDLA_S507_SEG_B@GOTPAGE
Lloh90:
	ldr	x9, [x9, _SDLA_S507_SEG_B@GOTPAGEOFF]
	b	LBB0_90
LBB0_82:
Lloh91:
	adrp	x9, _SDLA_S507_SEG_C@GOTPAGE
Lloh92:
	ldr	x9, [x9, _SDLA_S507_SEG_C@GOTPAGEOFF]
	b	LBB0_90
LBB0_83:
Lloh93:
	adrp	x9, _SDLA_S507_SEG_E@GOTPAGE
Lloh94:
	ldr	x9, [x9, _SDLA_S507_SEG_E@GOTPAGEOFF]
	b	LBB0_90
LBB0_84:
Lloh95:
	adrp	x9, _SDLA_S502_SEG_C@GOTPAGE
Lloh96:
	ldr	x9, [x9, _SDLA_S502_SEG_C@GOTPAGEOFF]
	b	LBB0_90
LBB0_85:
Lloh97:
	adrp	x9, _SDLA_S502_SEG_D@GOTPAGE
Lloh98:
	ldr	x9, [x9, _SDLA_S502_SEG_D@GOTPAGEOFF]
	b	LBB0_90
LBB0_86:
Lloh99:
	adrp	x9, _SDLA_S502_SEG_E@GOTPAGE
Lloh100:
	ldr	x9, [x9, _SDLA_S502_SEG_E@GOTPAGEOFF]
	b	LBB0_90
LBB0_87:
Lloh101:
	adrp	x9, _SDLA_S508_SEG_C@GOTPAGE
Lloh102:
	ldr	x9, [x9, _SDLA_S508_SEG_C@GOTPAGEOFF]
	b	LBB0_90
LBB0_88:
Lloh103:
	adrp	x9, _SDLA_S508_SEG_D@GOTPAGE
Lloh104:
	ldr	x9, [x9, _SDLA_S508_SEG_D@GOTPAGEOFF]
	b	LBB0_90
LBB0_89:
Lloh105:
	adrp	x9, _SDLA_S508_SEG_E@GOTPAGE
Lloh106:
	ldr	x9, [x9, _SDLA_S508_SEG_E@GOTPAGEOFF]
LBB0_90:
	ldrb	w9, [x9]
	orr	w8, w9, w8
LBB0_91:
Lloh107:
	adrp	x9, _SDLA_REG_PC_WINDOW@GOTPAGE
Lloh108:
	ldr	x9, [x9, _SDLA_REG_PC_WINDOW@GOTPAGEOFF]
Lloh109:
	ldr	x9, [x9]
	add	x1, x9, x22
	sxtb	w0, w8
	bl	_outb
	ldr	w8, [x21, #4]
	cmp	w8, #128
	b.eq	LBB0_95
; %bb.92:
	cmp	w8, #129
	b.eq	LBB0_97
; %bb.93:
	cmp	w8, #130
	b.ne	LBB0_99
; %bb.94:
Lloh110:
	adrp	x8, _SDLA_S502E_ENABLE@GOTPAGE
Lloh111:
	ldr	x8, [x8, _SDLA_S502E_ENABLE@GOTPAGEOFF]
	b	LBB0_96
LBB0_95:
Lloh112:
	adrp	x8, _SDLA_MEMEN@GOTPAGE
Lloh113:
	ldr	x8, [x8, _SDLA_MEMEN@GOTPAGEOFF]
LBB0_96:
	ldrb	w8, [x8]
	b	LBB0_98
LBB0_97:
Lloh114:
	adrp	x8, _SDLA_MEMEN@GOTPAGE
Lloh115:
	ldr	x8, [x8, _SDLA_MEMEN@GOTPAGEOFF]
	ldrb	w8, [x8]
	ldrb	w9, [x21, #8]
	orr	w8, w9, w8
LBB0_98:
	strb	w8, [x21, #8]
	b	LBB0_100
LBB0_99:
	ldrb	w8, [x21, #8]
LBB0_100:
	ldr	x9, [x23]
	add	x1, x9, x22
	sxtb	w0, w8
	bl	_outb
	mov	w23, #0
	ldp	w8, w9, [x20, #4]
	stp	w22, w8, [x19]
	add	w8, w9, #2, lsl #12             ; =8192
	stp	w9, w8, [x19, #8]
	mov	w8, #1
	str	w8, [x21]
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpLdrGot	Lloh69, Lloh70
	.loh AdrpLdrGot	Lloh71, Lloh72
	.loh AdrpLdrGot	Lloh73, Lloh74
	.loh AdrpAdd	Lloh75, Lloh76
	.loh AdrpLdrGot	Lloh77, Lloh78
	.loh AdrpLdrGot	Lloh79, Lloh80
	.loh AdrpAdd	Lloh81, Lloh82
	.loh AdrpLdrGot	Lloh83, Lloh84
	.loh AdrpAdd	Lloh85, Lloh86
	.loh AdrpLdrGot	Lloh87, Lloh88
	.loh AdrpLdrGot	Lloh89, Lloh90
	.loh AdrpLdrGot	Lloh91, Lloh92
	.loh AdrpLdrGot	Lloh93, Lloh94
	.loh AdrpLdrGot	Lloh95, Lloh96
	.loh AdrpLdrGot	Lloh97, Lloh98
	.loh AdrpLdrGot	Lloh99, Lloh100
	.loh AdrpLdrGot	Lloh101, Lloh102
	.loh AdrpLdrGot	Lloh103, Lloh104
	.loh AdrpLdrGot	Lloh105, Lloh106
	.loh AdrpLdrGotLdr	Lloh107, Lloh108, Lloh109
	.loh AdrpLdrGot	Lloh110, Lloh111
	.loh AdrpLdrGot	Lloh112, Lloh113
	.loh AdrpLdrGot	Lloh114, Lloh115
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_70-LBB0_70)>>2
	.byte	(LBB0_81-LBB0_70)>>2
	.byte	(LBB0_82-LBB0_70)>>2
	.byte	(LBB0_91-LBB0_70)>>2
	.byte	(LBB0_83-LBB0_70)>>2
lJTI0_1:
	.byte	(LBB0_80-LBB0_80)>>2
	.byte	(LBB0_91-LBB0_80)>>2
	.byte	(LBB0_87-LBB0_80)>>2
	.byte	(LBB0_88-LBB0_80)>>2
	.byte	(LBB0_89-LBB0_80)>>2
lJTI0_2:
	.byte	(LBB0_76-LBB0_76)>>2
	.byte	(LBB0_91-LBB0_76)>>2
	.byte	(LBB0_84-LBB0_76)>>2
	.byte	(LBB0_85-LBB0_76)>>2
	.byte	(LBB0_86-LBB0_76)>>2
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_valid_port,8,3                 ; @valid_port
	.comm	_SDLA_IO_EXTENTS,4,2            ; @SDLA_IO_EXTENTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"io-port 0x%04lx in use\n"

	.comm	_SDLA_UNKNOWN,4,2               ; @SDLA_UNKNOWN
	.comm	_SDLA_HALT,1,0                  ; @SDLA_HALT
	.comm	_SDLA_REG_Z80_CONTROL,8,3       ; @SDLA_REG_Z80_CONTROL
	.comm	_SDLA_S502_STS,4,2              ; @SDLA_S502_STS
	.comm	_SDLA_S502E_INTACK,1,0          ; @SDLA_S502E_INTACK
	.comm	_SDLA_REG_CONTROL,8,3           ; @SDLA_REG_CONTROL
	.comm	_SDLA_S507_ENABLE,1,0           ; @SDLA_S507_ENABLE
	.comm	_SDLA_S508_STS,4,2              ; @SDLA_S508_STS
	.comm	_SDLA_S508_INTEN,1,0            ; @SDLA_S508_INTEN
	.comm	_SDLA_S502A_HALT,1,0            ; @SDLA_S502A_HALT
	.comm	_SDLA_S502A_START,1,0           ; @SDLA_S502A_START
	.comm	_SDLA_S502A_INTEN,1,0           ; @SDLA_S502A_INTEN
l_.str.1:                               ; @.str.1
	.asciz	"Unknown card type\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_sdla_isr,4,2                   ; @sdla_isr
	.comm	_SDLA_S507_IRQ3,1,0             ; @SDLA_S507_IRQ3
	.comm	_SDLA_S507_IRQ4,1,0             ; @SDLA_S507_IRQ4
	.comm	_SDLA_S507_IRQ5,1,0             ; @SDLA_S507_IRQ5
	.comm	_SDLA_S507_IRQ7,1,0             ; @SDLA_S507_IRQ7
	.comm	_SDLA_S507_IRQ10,1,0            ; @SDLA_S507_IRQ10
	.comm	_SDLA_S507_IRQ11,1,0            ; @SDLA_S507_IRQ11
	.comm	_SDLA_S507_IRQ12,1,0            ; @SDLA_S507_IRQ12
	.comm	_SDLA_S507_IRQ15,1,0            ; @SDLA_S507_IRQ15
	.comm	_valid_mem,8,3                  ; @valid_mem
	.comm	_SDLA_8K_WINDOW,1,0             ; @SDLA_8K_WINDOW
	.comm	_SDLA_S502_SEG_A,1,0            ; @SDLA_S502_SEG_A
	.comm	_SDLA_S502_SEG_C,1,0            ; @SDLA_S502_SEG_C
	.comm	_SDLA_S502_SEG_D,1,0            ; @SDLA_S502_SEG_D
	.comm	_SDLA_S502_SEG_E,1,0            ; @SDLA_S502_SEG_E
	.comm	_SDLA_S507_SEG_A,1,0            ; @SDLA_S507_SEG_A
	.comm	_SDLA_S507_SEG_B,1,0            ; @SDLA_S507_SEG_B
	.comm	_SDLA_S507_SEG_C,1,0            ; @SDLA_S507_SEG_C
	.comm	_SDLA_S507_SEG_E,1,0            ; @SDLA_S507_SEG_E
	.comm	_SDLA_S508_SEG_A,1,0            ; @SDLA_S508_SEG_A
	.comm	_SDLA_S508_SEG_C,1,0            ; @SDLA_S508_SEG_C
	.comm	_SDLA_S508_SEG_D,1,0            ; @SDLA_S508_SEG_D
	.comm	_SDLA_S508_SEG_E,1,0            ; @SDLA_S508_SEG_E
	.comm	_SDLA_REG_PC_WINDOW,8,3         ; @SDLA_REG_PC_WINDOW
	.comm	_SDLA_S502E_ENABLE,1,0          ; @SDLA_S502E_ENABLE
	.comm	_SDLA_MEMEN,1,0                 ; @SDLA_MEMEN
	.no_dead_strip	_sdla_set_config
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.sdla_set_config
l_switch.table.sdla_set_config:
	.quad	_SDLA_S507_IRQ3
	.quad	_SDLA_S507_IRQ4
	.quad	_SDLA_S507_IRQ5
	.quad	_SDLA_S507_IRQ3
	.quad	_SDLA_S507_IRQ7
	.quad	_SDLA_S507_IRQ3
	.quad	_SDLA_S507_IRQ3
	.quad	_SDLA_S507_IRQ10
	.quad	_SDLA_S507_IRQ11
	.quad	_SDLA_S507_IRQ12
	.quad	_SDLA_S507_IRQ3
	.quad	_SDLA_S507_IRQ3
	.quad	_SDLA_S507_IRQ15

.subsections_via_symbols
