	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spectrum_reset
_spectrum_reset:                        ## @spectrum_reset
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_pcmcia_dev_present
	testl	%eax, %eax
	je	LBB0_10
## %bb.1:
	movq	_CISREG_COR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pcmcia_read_config_byte
	testl	%eax, %eax
	jne	LBB0_10
## %bb.2:
	movl	(%r15), %esi
	movq	_COR_SOFT_RESET@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	orl	-48(%rbp), %edx
	movq	%rbx, %rdi
	callq	_pcmcia_write_config_byte
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movq	_CISREG_CCSR@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pcmcia_read_config_byte
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	testl	%r14d, %r14d
	jne	LBB0_5
## %bb.6:
	movq	_HCR_RUN@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_HCR_IDLE@GOTPCREL(%rip), %rax
LBB0_7:
	movq	_HCR_MEM16@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	-44(%rbp), %edx
	orl	(%rax), %edx
	movl	%edx, -44(%rbp)
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_pcmcia_write_config_byte
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	movl	(%r15), %esi
	movl	(%r12), %edx
	notl	%edx
	andl	-48(%rbp), %edx
	movq	%rbx, %rdi
	callq	_pcmcia_write_config_byte
	testl	%eax, %eax
	je	LBB0_9
LBB0_10:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_udelay
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_CISREG_COR,4,2                 ## @CISREG_COR
	.comm	_COR_SOFT_RESET,4,2             ## @COR_SOFT_RESET
	.comm	_CISREG_CCSR,4,2                ## @CISREG_CCSR
	.comm	_HCR_IDLE,4,2                   ## @HCR_IDLE
	.comm	_HCR_RUN,4,2                    ## @HCR_RUN
	.comm	_HCR_MEM16,4,2                  ## @HCR_MEM16
	.no_dead_strip	_spectrum_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spectrum_reset
_spectrum_reset:                        ; @spectrum_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	bl	_pcmcia_dev_present
	cbz	w0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x21, _CISREG_COR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CISREG_COR@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pcmcia_read_config_byte
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	w1, [x21]
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x22, _COR_SOFT_RESET@GOTPAGE
Lloh3:
	ldr	x22, [x22, _COR_SOFT_RESET@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_pcmcia_write_config_byte
	cbnz	w0, LBB0_6
; %bb.3:
	mov	w0, #1000
	bl	_udelay
Lloh4:
	adrp	x23, _CISREG_CCSR@GOTPAGE
Lloh5:
	ldr	x23, [x23, _CISREG_CCSR@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #8
	mov	x0, x19
	bl	_pcmcia_read_config_byte
	cbnz	w0, LBB0_6
; %bb.4:
Lloh6:
	adrp	x8, _HCR_IDLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HCR_IDLE@GOTPAGEOFF]
Lloh8:
	adrp	x9, _HCR_RUN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HCR_RUN@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _HCR_MEM16@GOTPAGE
Lloh11:
	ldr	x9, [x9, _HCR_MEM16@GOTPAGEOFF]
	ldr	w10, [sp, #8]
Lloh12:
	ldr	w9, [x9]
	and	w9, w9, w10
	orr	w2, w9, w8
	str	w2, [sp, #8]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_pcmcia_write_config_byte
	cbnz	w0, LBB0_6
; %bb.5:
	mov	w0, #1000
	bl	_udelay
	ldr	w1, [x21]
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	bic	w2, w8, w9
	mov	x0, x19
	bl	_pcmcia_write_config_byte
	cbz	w0, LBB0_8
LBB0_6:
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	mov	w0, #1000
	bl	_udelay
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_CISREG_COR,4,2                 ; @CISREG_COR
	.comm	_COR_SOFT_RESET,4,2             ; @COR_SOFT_RESET
	.comm	_CISREG_CCSR,4,2                ; @CISREG_CCSR
	.comm	_HCR_IDLE,4,2                   ; @HCR_IDLE
	.comm	_HCR_RUN,4,2                    ; @HCR_RUN
	.comm	_HCR_MEM16,4,2                  ; @HCR_MEM16
	.no_dead_strip	_spectrum_reset
.subsections_via_symbols
