	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prism2_plx_genesis_reset
_prism2_plx_genesis_reset:              ## @prism2_plx_genesis_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	(%rdi), %rbx
	movq	8(%rbx), %rax
	movslq	(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	(%rax,%rdi,4), %rdi
	callq	_readb
	movl	%eax, %r15d
	movq	_COR_SRESET@GOTPCREL(%rip), %r12
	movb	(%r12), %al
	orb	%r15b, %al
	movslq	(%rbx), %rsi
	shlq	$2, %rsi
	addq	8(%rbx), %rsi
	movzbl	%al, %edi
	callq	_writeb
	movl	$10, %edi
	callq	_mdelay
	movq	8(%rbx), %rax
	movslq	(%rbx), %rcx
	leaq	(%rax,%rcx,4), %rsi
	addq	$8, %rsi
	movzbl	%r14b, %edi
	callq	_writeb
	movl	$10, %edi
	callq	_mdelay
	movb	(%r12), %al
	notb	%al
	andb	%r15b, %al
	movslq	(%rbx), %rsi
	shlq	$2, %rsi
	addq	8(%rbx), %rsi
	movzbl	%al, %edi
	callq	_writeb
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_inb
	movl	%eax, %r15d
	movq	_COR_SRESET@GOTPCREL(%rip), %r12
	movb	(%r12), %al
	orb	%r15b, %al
	movl	(%rbx), %esi
	movzbl	%al, %edi
	callq	_outb
	movl	$10, %edi
	callq	_mdelay
	movl	(%rbx), %esi
	addl	$2, %esi
	movzbl	%r14b, %edi
	callq	_outb
	movl	$10, %edi
	callq	_mdelay
	movb	(%r12), %al
	notb	%al
	andb	%r15b, %al
	movl	(%rbx), %esi
	movzbl	%al, %edi
	callq	_outb
LBB0_3:
	movl	$10, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mdelay                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_COR_SRESET,1,0                 ## @COR_SRESET
	.no_dead_strip	_prism2_plx_genesis_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prism2_plx_genesis_reset
_prism2_plx_genesis_reset:              ; @prism2_plx_genesis_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldr	x21, [x0]
	ldr	x8, [x21, #8]
	ldrsw	x0, [x21]
	cbz	x8, LBB0_2
; %bb.1:
	add	x0, x8, x0, lsl #2
	bl	_readb
	mov	x20, x0
Lloh0:
	adrp	x22, _COR_SRESET@GOTPAGE
Lloh1:
	ldr	x22, [x22, _COR_SRESET@GOTPAGEOFF]
	ldrb	w8, [x22]
	orr	w8, w8, w0
	ldr	x9, [x21, #8]
	ldrsw	x10, [x21]
	add	x1, x9, x10, lsl #2
	and	w0, w8, #0xff
	bl	_writeb
	mov	w0, #10
	bl	_mdelay
	ldr	x8, [x21, #8]
	ldrsw	x9, [x21]
	add	x8, x8, x9, lsl #2
	add	x1, x8, #8
	and	w0, w19, #0xff
	bl	_writeb
	mov	w0, #10
	bl	_mdelay
	ldrb	w8, [x22]
	bic	w0, w20, w8
	ldr	x8, [x21, #8]
	ldrsw	x9, [x21]
	add	x1, x8, x9, lsl #2
	bl	_writeb
	b	LBB0_3
LBB0_2:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_inb
	mov	x20, x0
Lloh2:
	adrp	x22, _COR_SRESET@GOTPAGE
Lloh3:
	ldr	x22, [x22, _COR_SRESET@GOTPAGEOFF]
	ldrb	w8, [x22]
	orr	w8, w8, w0
	ldr	w1, [x21]
	and	w0, w8, #0xff
	bl	_outb
	mov	w0, #10
	bl	_mdelay
	ldr	w8, [x21]
	add	w1, w8, #2
	and	w0, w19, #0xff
	bl	_outb
	mov	w0, #10
	bl	_mdelay
	ldrb	w8, [x22]
	bic	w0, w20, w8
	ldr	w1, [x21]
	bl	_outb
LBB0_3:
	mov	w0, #10
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mdelay
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_COR_SRESET,1,0                 ; @COR_SRESET
	.no_dead_strip	_prism2_plx_genesis_reset
.subsections_via_symbols
