	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function socfpga_a10_fpga_state
_socfpga_a10_fpga_state:                ## @socfpga_a10_fpga_state
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rdi
	callq	_socfpga_a10_fpga_read_stat
	movq	_A10_FPGAMGR_IMGCFG_STAT_F2S_USERMODE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_FPGA_MGR_STATE_OPERATING@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movq	_A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	_FPGA_MGR_STATE_WRITE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	movq	_A10_FPGAMGR_IMGCFG_STAT_F2S_CRC_ERROR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	movq	_FPGA_MGR_STATE_WRITE_COMPLETE_ERR@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movq	_A10_FPGAMGR_IMGCFG_STAT_F2S_NSTATUS_PIN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_7
## %bb.8:
	movq	_FPGA_MGR_STATE_RESET@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_FPGA_MGR_STATE_UNKNOWN@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_A10_FPGAMGR_IMGCFG_STAT_F2S_USERMODE,4,2 ## @A10_FPGAMGR_IMGCFG_STAT_F2S_USERMODE
	.comm	_FPGA_MGR_STATE_OPERATING,4,2   ## @FPGA_MGR_STATE_OPERATING
	.comm	_A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY,4,2 ## @A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY
	.comm	_FPGA_MGR_STATE_WRITE,4,2       ## @FPGA_MGR_STATE_WRITE
	.comm	_A10_FPGAMGR_IMGCFG_STAT_F2S_CRC_ERROR,4,2 ## @A10_FPGAMGR_IMGCFG_STAT_F2S_CRC_ERROR
	.comm	_FPGA_MGR_STATE_WRITE_COMPLETE_ERR,4,2 ## @FPGA_MGR_STATE_WRITE_COMPLETE_ERR
	.comm	_A10_FPGAMGR_IMGCFG_STAT_F2S_NSTATUS_PIN,4,2 ## @A10_FPGAMGR_IMGCFG_STAT_F2S_NSTATUS_PIN
	.comm	_FPGA_MGR_STATE_RESET,4,2       ## @FPGA_MGR_STATE_RESET
	.comm	_FPGA_MGR_STATE_UNKNOWN,4,2     ## @FPGA_MGR_STATE_UNKNOWN
	.no_dead_strip	_socfpga_a10_fpga_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function socfpga_a10_fpga_state
_socfpga_a10_fpga_state:                ; @socfpga_a10_fpga_state
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x0, [x0]
	bl	_socfpga_a10_fpga_read_stat
Lloh0:
	adrp	x8, _A10_FPGAMGR_IMGCFG_STAT_F2S_USERMODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _A10_FPGAMGR_IMGCFG_STAT_F2S_USERMODE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _FPGA_MGR_STATE_OPERATING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FPGA_MGR_STATE_OPERATING@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
Lloh5:
	adrp	x8, _A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _FPGA_MGR_STATE_WRITE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FPGA_MGR_STATE_WRITE@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh10:
	adrp	x8, _A10_FPGAMGR_IMGCFG_STAT_F2S_CRC_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _A10_FPGAMGR_IMGCFG_STAT_F2S_CRC_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.5:
Lloh13:
	adrp	x8, _FPGA_MGR_STATE_WRITE_COMPLETE_ERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FPGA_MGR_STATE_WRITE_COMPLETE_ERR@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, _A10_FPGAMGR_IMGCFG_STAT_F2S_NSTATUS_PIN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _A10_FPGAMGR_IMGCFG_STAT_F2S_NSTATUS_PIN@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _FPGA_MGR_STATE_UNKNOWN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _FPGA_MGR_STATE_UNKNOWN@GOTPAGEOFF]
Lloh20:
	adrp	x10, _FPGA_MGR_STATE_RESET@GOTPAGE
Lloh21:
	ldr	x10, [x10, _FPGA_MGR_STATE_RESET@GOTPAGEOFF]
	tst	w8, w0
	csel	x8, x10, x9, eq
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_A10_FPGAMGR_IMGCFG_STAT_F2S_USERMODE,4,2 ; @A10_FPGAMGR_IMGCFG_STAT_F2S_USERMODE
	.comm	_FPGA_MGR_STATE_OPERATING,4,2   ; @FPGA_MGR_STATE_OPERATING
	.comm	_A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY,4,2 ; @A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY
	.comm	_FPGA_MGR_STATE_WRITE,4,2       ; @FPGA_MGR_STATE_WRITE
	.comm	_A10_FPGAMGR_IMGCFG_STAT_F2S_CRC_ERROR,4,2 ; @A10_FPGAMGR_IMGCFG_STAT_F2S_CRC_ERROR
	.comm	_FPGA_MGR_STATE_WRITE_COMPLETE_ERR,4,2 ; @FPGA_MGR_STATE_WRITE_COMPLETE_ERR
	.comm	_A10_FPGAMGR_IMGCFG_STAT_F2S_NSTATUS_PIN,4,2 ; @A10_FPGAMGR_IMGCFG_STAT_F2S_NSTATUS_PIN
	.comm	_FPGA_MGR_STATE_RESET,4,2       ; @FPGA_MGR_STATE_RESET
	.comm	_FPGA_MGR_STATE_UNKNOWN,4,2     ; @FPGA_MGR_STATE_UNKNOWN
	.no_dead_strip	_socfpga_a10_fpga_state
.subsections_via_symbols
