	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ts73xx_fpga_write
_ts73xx_fpga_write:                     ## @ts73xx_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
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.1:
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	(%rdi), %r12
	xorl	%ebx, %ebx
	movq	_TS73XX_FPGA_DATA_REG@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_TS73XX_FPGA_CONFIG_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r12), %rdi
	movq	_TS73XX_FPGA_WRITE_DONE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$1, %edx
	movl	$1, %ecx
	callq	_readb_poll_timeout
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movsbl	(%r14,%rbx), %edi
	movq	(%r13), %rsi
	addq	(%r12), %rsi
	callq	_writeb
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_2
LBB0_4:
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TS73XX_FPGA_CONFIG_REG,8,3     ## @TS73XX_FPGA_CONFIG_REG
	.comm	_TS73XX_FPGA_WRITE_DONE,4,2     ## @TS73XX_FPGA_WRITE_DONE
	.comm	_TS73XX_FPGA_WRITE_DONE_TIMEOUT,4,2 ## @TS73XX_FPGA_WRITE_DONE_TIMEOUT
	.comm	_TS73XX_FPGA_DATA_REG,8,3       ## @TS73XX_FPGA_DATA_REG
	.no_dead_strip	_ts73xx_fpga_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ts73xx_fpga_write
_ts73xx_fpga_write:                     ; @ts73xx_fpga_write
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x2, LBB0_4
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	ldr	x21, [x0]
Lloh0:
	adrp	x22, _TS73XX_FPGA_CONFIG_REG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TS73XX_FPGA_CONFIG_REG@GOTPAGEOFF]
Lloh2:
	adrp	x23, _TS73XX_FPGA_WRITE_DONE_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _TS73XX_FPGA_WRITE_DONE_TIMEOUT@GOTPAGEOFF]
Lloh4:
	adrp	x24, _TS73XX_FPGA_DATA_REG@GOTPAGE
Lloh5:
	ldr	x24, [x24, _TS73XX_FPGA_DATA_REG@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x9, [x22]
	add	x0, x9, x8
	ldr	w4, [x23]
	mov	w2, #1
	mov	w3, #1
	bl	_readb_poll_timeout
	tbnz	w0, #31, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x19, x19, #1
	ldrsb	w0, [x20], #1
	ldr	x8, [x21]
	ldr	x9, [x24]
	add	x1, x9, x8
	bl	_writeb
	cbnz	x19, LBB0_2
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_TS73XX_FPGA_CONFIG_REG,8,3     ; @TS73XX_FPGA_CONFIG_REG
	.comm	_TS73XX_FPGA_WRITE_DONE,4,2     ; @TS73XX_FPGA_WRITE_DONE
	.comm	_TS73XX_FPGA_WRITE_DONE_TIMEOUT,4,2 ; @TS73XX_FPGA_WRITE_DONE_TIMEOUT
	.comm	_TS73XX_FPGA_DATA_REG,8,3       ; @TS73XX_FPGA_DATA_REG
	.no_dead_strip	_ts73xx_fpga_write
.subsections_via_symbols
