	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fpga_reset
_fpga_reset:                            ## @fpga_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	%edi, %r14d
	callq	_IER
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_outb
	movq	_LCR_DLAB@GOTPCREL(%rip), %rax
	movq	_LCR_BIT5@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	orl	(%rax), %ebx
	movl	%r14d, %edi
	callq	_LCR
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outb
	movl	%r14d, %edi
	callq	_DLL
	movl	$1, %edi
	movl	%eax, %esi
	callq	_outb
	movl	%r14d, %edi
	callq	_DLM
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_outb
	movl	(%r15), %ebx
	movl	%r14d, %edi
	callq	_LCR
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outb
	movl	%r14d, %edi
	callq	_LSR
	movl	%eax, %edi
	callq	_inb
	movl	%r14d, %edi
	callq	_MSR
	movl	%eax, %edi
	callq	_inb
	movq	_MCR_OUT1@GOTPCREL(%rip), %r15
	movq	_MCR_OUT2@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	orl	(%r15), %ebx
	movl	%r14d, %edi
	callq	_MCR
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outb
	movl	$100, %edi
	callq	_delay
	movq	_MCR_DTR@GOTPCREL(%rip), %rax
	movq	_MCR_RTS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	orl	(%r15), %ebx
	orl	(%r12), %ebx
	movl	%r14d, %edi
	callq	_MCR
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outb
	movl	$100, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_delay                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LCR_DLAB,4,2                   ## @LCR_DLAB
	.comm	_LCR_BIT5,4,2                   ## @LCR_BIT5
	.comm	_MCR_OUT1,4,2                   ## @MCR_OUT1
	.comm	_MCR_OUT2,4,2                   ## @MCR_OUT2
	.comm	_MCR_DTR,4,2                    ## @MCR_DTR
	.comm	_MCR_RTS,4,2                    ## @MCR_RTS
	.no_dead_strip	_fpga_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fpga_reset
_fpga_reset:                            ; @fpga_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, x0
	bl	_IER
	mov	x1, x0
	mov	w0, #0
	bl	_outb
Lloh0:
	adrp	x8, _LCR_DLAB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LCR_DLAB@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x21, _LCR_BIT5@GOTPAGE
Lloh4:
	ldr	x21, [x21, _LCR_BIT5@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w20, w9, w8
	mov	x0, x19
	bl	_LCR
	mov	x1, x0
	mov	x0, x20
	bl	_outb
	mov	x0, x19
	bl	_DLL
	mov	x1, x0
	mov	w0, #1
	bl	_outb
	mov	x0, x19
	bl	_DLM
	mov	x1, x0
	mov	w0, #0
	bl	_outb
	ldr	w20, [x21]
	mov	x0, x19
	bl	_LCR
	mov	x1, x0
	mov	x0, x20
	bl	_outb
	mov	x0, x19
	bl	_LSR
	bl	_inb
	mov	x0, x19
	bl	_MSR
	bl	_inb
Lloh5:
	adrp	x21, _MCR_OUT1@GOTPAGE
Lloh6:
	ldr	x21, [x21, _MCR_OUT1@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh7:
	adrp	x22, _MCR_OUT2@GOTPAGE
Lloh8:
	ldr	x22, [x22, _MCR_OUT2@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w20, w9, w8
	mov	x0, x19
	bl	_MCR
	mov	x1, x0
	mov	x0, x20
	bl	_outb
	mov	w0, #100
	bl	_delay
Lloh9:
	adrp	x8, _MCR_DTR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MCR_DTR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _MCR_RTS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MCR_RTS@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x21]
	orr	w8, w8, w9
	ldr	w9, [x22]
	orr	w20, w8, w9
	mov	x0, x19
	bl	_MCR
	mov	x1, x0
	mov	x0, x20
	bl	_outb
	mov	w0, #100
	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	_delay
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LCR_DLAB,4,2                   ; @LCR_DLAB
	.comm	_LCR_BIT5,4,2                   ; @LCR_BIT5
	.comm	_MCR_OUT1,4,2                   ; @MCR_OUT1
	.comm	_MCR_OUT2,4,2                   ; @MCR_OUT2
	.comm	_MCR_DTR,4,2                    ; @MCR_DTR
	.comm	_MCR_RTS,4,2                    ; @MCR_RTS
	.no_dead_strip	_fpga_reset
.subsections_via_symbols
