	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fpga_write
_fpga_write:                            ## @fpga_write
	.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, %ebx
	movl	%edi, %r15d
	movq	_jiffies@GOTPCREL(%rip), %r13
	movslq	(%r13), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	movslq	%ecx, %r12
	addq	%rax, %r12
	xorl	%eax, %eax
	movq	_MCR_RTS@GOTPCREL(%rip), %rcx
	movq	_MCR_DTR@GOTPCREL(%rip), %rdx
	movq	_MCR_OUT1@GOTPCREL(%rip), %rsi
	movq	_MCR_OUT2@GOTPCREL(%rip), %rdi
	movq	_LSR_TSRE@GOTPCREL(%rip), %r14
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %eax
	sarb	$7, %al
	andb	(%rcx), %al
	orb	(%rdx), %al
	movzbl	%al, %eax
	movzbl	(%rsi), %ecx
	movzbl	(%rdi), %ebx
	orl	%ecx, %ebx
	orl	%eax, %ebx
	movl	%r15d, %edi
	callq	_MCR
	movl	%ebx, %edi
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%eax, %esi
	callq	_outb
	addb	%bl, %bl
	movl	%r15d, %edi
	callq	_THR
	movl	$252, %edi
	movl	%eax, %esi
	callq	_outb
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r15d, %edi
	callq	_LSR
	movl	%eax, %edi
	callq	_inb
	testl	%eax, (%r14)
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	(%r13), %edi
	movq	%r12, %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_2
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	cmpl	$8, %eax
	movq	_MCR_RTS@GOTPCREL(%rip), %rcx
	movq	_MCR_DTR@GOTPCREL(%rip), %rdx
	movq	_MCR_OUT1@GOTPCREL(%rip), %rsi
	movq	_MCR_OUT2@GOTPCREL(%rip), %rdi
	jne	LBB0_1
## %bb.6:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_4:
	movl	$-1, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.comm	_MCR_RTS,1,0                    ## @MCR_RTS
	.comm	_MCR_DTR,1,0                    ## @MCR_DTR
	.comm	_MCR_OUT1,1,0                   ## @MCR_OUT1
	.comm	_MCR_OUT2,1,0                   ## @MCR_OUT2
	.comm	_LSR_TSRE,4,2                   ## @LSR_TSRE
	.no_dead_strip	_fpga_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fpga_write
_fpga_write:                            ; @fpga_write
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	mov	x20, x0
	mov	w23, #0
Lloh0:
	adrp	x24, _jiffies@GOTPAGE
Lloh1:
	ldr	x24, [x24, _jiffies@GOTPAGEOFF]
Lloh2:
	adrp	x8, _HZ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
	ldrsw	x9, [x24]
Lloh4:
	ldrsw	x8, [x8]
	mov	w10, #26215
	movk	w10, #26214, lsl #16
	mul	x8, x8, x10
	lsr	x10, x8, #63
	asr	x8, x8, #34
	add	w8, w8, w10
	add	x21, x9, w8, sxtw
Lloh5:
	adrp	x8, _MCR_RTS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MCR_RTS@GOTPAGEOFF]
Lloh7:
	adrp	x9, _MCR_DTR@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MCR_DTR@GOTPAGEOFF]
Lloh9:
	adrp	x11, _MCR_OUT1@GOTPAGE
Lloh10:
	ldr	x11, [x11, _MCR_OUT1@GOTPAGEOFF]
Lloh11:
	adrp	x12, _MCR_OUT2@GOTPAGE
Lloh12:
	ldr	x12, [x12, _MCR_OUT2@GOTPAGEOFF]
Lloh13:
	adrp	x25, _LSR_TSRE@GOTPAGE
Lloh14:
	ldr	x25, [x25, _LSR_TSRE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
	ldrb	w8, [x8]
	mov	x27, x9
	ldrb	w9, [x9]
	sxtb	w10, w19
	and	w8, w8, w10, lsr #7
	orr	w8, w9, w8
	mov	x28, x11
	ldrb	w9, [x11]
	orr	w8, w8, w9
	mov	x26, x12
	ldrb	w9, [x12]
	orr	w22, w8, w9
	mov	x0, x20
	bl	_MCR
	mov	x1, x0
	mov	x0, x22
	bl	_outb
	lsl	w19, w19, #1
	mov	x0, x20
	bl	_THR
	mov	x1, x0
	mov	w0, #252
	bl	_outb
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	bl	_LSR
	bl	_inb
	ldr	w8, [x25]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=2
	ldr	w0, [x24]
	mov	x1, x21
	bl	_time_after
	cbz	x0, LBB0_2
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	add	w23, w23, #1
	cmp	w23, #8
Lloh15:
	adrp	x8, _MCR_RTS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MCR_RTS@GOTPAGEOFF]
	mov	x9, x27
	mov	x11, x28
	mov	x12, x26
	b.ne	LBB0_1
; %bb.5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.comm	_MCR_RTS,1,0                    ; @MCR_RTS
	.comm	_MCR_DTR,1,0                    ; @MCR_DTR
	.comm	_MCR_OUT1,1,0                   ; @MCR_OUT1
	.comm	_MCR_OUT2,1,0                   ; @MCR_OUT2
	.comm	_LSR_TSRE,4,2                   ; @LSR_TSRE
	.no_dead_strip	_fpga_write
.subsections_via_symbols
