	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function netup_altera_fpga_rw
_netup_altera_fpga_rw:                  ## @netup_altera_fpga_rw
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r12
	movq	_MC417_RWD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cx_read
	movl	%eax, %ebx
	movq	_MC417_OEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ALT_DATA@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.1:
	callq	_cx_set
	movq	_ALT_RD@GOTPCREL(%rip), %rcx
	movq	_ALT_WR@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	callq	_cx_clear
	xorl	%ebx, %r13d
	andl	(%r14), %r13d
	xorl	%r13d, %ebx
	movq	_ALT_WR@GOTPCREL(%rip), %rcx
	movq	_ALT_RD@GOTPCREL(%rip), %rax
LBB0_3:
	movq	_ALT_AD_RG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %esi
	orl	%ebx, %esi
	notl	%edx
	andl	%ebx, %edx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	cmovnel	%esi, %edx
	movq	_ALT_CS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	orl	(%rcx), %esi
	notl	%esi
	andl	%edx, %esi
	orl	(%rax), %esi
	movq	_MC417_RWD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_cx_write
	movl	(%rbx), %edi
	callq	_cx_read
	movl	%eax, %ebx
	movq	_ALT_RDY@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	movq	_jiffies@GOTPCREL(%rip), %r14
	je	LBB0_7
## %bb.4:
	addq	-56(%rbp), %r12                 ## 8-byte Folded Reload
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	movq	%r12, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, %edi
	callq	_udelay
	movq	_MC417_RWD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cx_read
	movl	%eax, %ebx
	testl	%eax, (%r13)
	jne	LBB0_5
LBB0_7:
	movq	_MC417_RWD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ALT_RD@GOTPCREL(%rip), %rax
	movq	_ALT_WR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	orl	(%r15), %esi
	callq	_cx_set
	movq	_ALT_DATA@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	cmovel	%eax, %ebx
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_MC417_RWD,4,2                  ## @MC417_RWD
	.comm	_MC417_OEN,4,2                  ## @MC417_OEN
	.comm	_ALT_DATA,4,2                   ## @ALT_DATA
	.comm	_ALT_AD_RG,4,2                  ## @ALT_AD_RG
	.comm	_ALT_CS,4,2                     ## @ALT_CS
	.comm	_ALT_RD,4,2                     ## @ALT_RD
	.comm	_ALT_WR,4,2                     ## @ALT_WR
	.comm	_ALT_RDY,4,2                    ## @ALT_RDY
	.no_dead_strip	_netup_altera_fpga_rw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function netup_altera_fpga_rw
_netup_altera_fpga_rw:                  ; @netup_altera_fpga_rw
	.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, x3
	mov	x23, x2
	mov	x21, x1
Lloh0:
	adrp	x25, _jiffies@GOTPAGE
Lloh1:
	ldr	x25, [x25, _jiffies@GOTPAGEOFF]
	ldr	x27, [x25]
	mov	w0, #1
	bl	_msecs_to_jiffies
	mov	x20, x0
Lloh2:
	adrp	x26, _MC417_RWD@GOTPAGE
Lloh3:
	ldr	x26, [x26, _MC417_RWD@GOTPAGEOFF]
	ldr	w0, [x26]
	bl	_cx_read
	mov	x22, x0
Lloh4:
	adrp	x8, _MC417_OEN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MC417_OEN@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x24, _ALT_DATA@GOTPAGE
Lloh8:
	ldr	x24, [x24, _ALT_DATA@GOTPAGEOFF]
	ldr	w1, [x24]
	cbz	w19, LBB0_2
; %bb.1:
	bl	_cx_set
Lloh9:
	adrp	x8, _ALT_RD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ALT_RD@GOTPAGEOFF]
Lloh11:
	adrp	x9, _ALT_WR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ALT_WR@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
	bl	_cx_clear
	ldr	w8, [x24]
	bic	w9, w22, w8
	and	w8, w8, w23
	orr	w22, w9, w8
Lloh13:
	adrp	x8, _ALT_WR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ALT_WR@GOTPAGEOFF]
Lloh15:
	adrp	x9, _ALT_RD@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ALT_RD@GOTPAGEOFF]
LBB0_3:
Lloh17:
	adrp	x28, _ALT_WR@GOTPAGE
Lloh18:
	ldr	x28, [x28, _ALT_WR@GOTPAGEOFF]
Lloh19:
	adrp	x10, _ALT_AD_RG@GOTPAGE
Lloh20:
	ldr	x10, [x10, _ALT_AD_RG@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	orr	w11, w10, w22
	bic	w10, w22, w10
	cmp	w21, #0
	csel	w10, w10, w11, eq
Lloh22:
	adrp	x22, _ALT_CS@GOTPAGE
Lloh23:
	ldr	x22, [x22, _ALT_CS@GOTPAGEOFF]
	ldr	w11, [x22]
	ldr	w8, [x8]
	orr	w8, w11, w8
	bic	w8, w10, w8
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	w0, [x26]
	bl	_cx_write
	ldr	w0, [x26]
	bl	_cx_read
	mov	x21, x0
Lloh24:
	adrp	x23, _ALT_RDY@GOTPAGE
Lloh25:
	ldr	x23, [x23, _ALT_RDY@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.4:
	add	x20, x20, x27
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	mov	x1, x20
	bl	_time_after
	cbnz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	bl	_udelay
	ldr	w0, [x26]
	bl	_cx_read
	mov	x21, x0
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_5
LBB0_7:
	ldr	w0, [x26]
Lloh26:
	adrp	x8, _ALT_RD@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ALT_RD@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	ldr	w9, [x28]
	orr	w8, w9, w8
	ldr	w9, [x22]
	orr	w1, w8, w9
	bl	_cx_set
	ldr	w8, [x24]
	and	w8, w8, w21
	cmp	w19, #0
	csel	w0, wzr, w8, eq
	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	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_MC417_RWD,4,2                  ; @MC417_RWD
	.comm	_MC417_OEN,4,2                  ; @MC417_OEN
	.comm	_ALT_DATA,4,2                   ; @ALT_DATA
	.comm	_ALT_AD_RG,4,2                  ; @ALT_AD_RG
	.comm	_ALT_CS,4,2                     ; @ALT_CS
	.comm	_ALT_RD,4,2                     ; @ALT_RD
	.comm	_ALT_WR,4,2                     ; @ALT_WR
	.comm	_ALT_RDY,4,2                    ; @ALT_RDY
	.no_dead_strip	_netup_altera_fpga_rw
.subsections_via_symbols
