	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function machxo2_spi_state
_machxo2_spi_state:                     ## @machxo2_spi_state
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rdi), %rdi
	leaq	-16(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_get_status
	movq	_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_1
LBB0_4:
	movq	_FPGA_MGR_STATE_UNKNOWN@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-16(%rbp), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	leaq	-16(%rbp), %rdi
	callq	_get_err
	movq	_ENOERR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_FPGA_MGR_STATE_OPERATING@GOTPCREL(%rip), %rax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_BUSY,4,2                       ## @BUSY
	.comm	_DONE,4,2                       ## @DONE
	.comm	_ENOERR,8,3                     ## @ENOERR
	.comm	_FPGA_MGR_STATE_OPERATING,4,2   ## @FPGA_MGR_STATE_OPERATING
	.comm	_FPGA_MGR_STATE_UNKNOWN,4,2     ## @FPGA_MGR_STATE_UNKNOWN
	.no_dead_strip	_machxo2_spi_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function machxo2_spi_state
_machxo2_spi_state:                     ; @machxo2_spi_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x0, [x0]
	add	x1, sp, #8
	bl	_get_status
Lloh0:
	adrp	x8, _BUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BUSY@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_test_bit
	cbz	x0, LBB0_3
LBB0_1:
Lloh3:
	adrp	x8, _FPGA_MGR_STATE_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FPGA_MGR_STATE_UNKNOWN@GOTPAGEOFF]
LBB0_2:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
LBB0_3:
Lloh5:
	adrp	x8, _DONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DONE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_test_bit
	cbz	x0, LBB0_1
; %bb.4:
	add	x0, sp, #8
	bl	_get_err
Lloh8:
	adrp	x8, _ENOERR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOERR@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_1
; %bb.5:
Lloh11:
	adrp	x8, _FPGA_MGR_STATE_OPERATING@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FPGA_MGR_STATE_OPERATING@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_BUSY,4,2                       ; @BUSY
	.comm	_DONE,4,2                       ; @DONE
	.comm	_ENOERR,8,3                     ; @ENOERR
	.comm	_FPGA_MGR_STATE_OPERATING,4,2   ; @FPGA_MGR_STATE_OPERATING
	.comm	_FPGA_MGR_STATE_UNKNOWN,4,2     ; @FPGA_MGR_STATE_UNKNOWN
	.no_dead_strip	_machxo2_spi_state
.subsections_via_symbols
