	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function socfpga_a10_fpga_wait_for_pr_ready
_socfpga_a10_fpga_wait_for_pr_ready:    ## @socfpga_a10_fpga_wait_for_pr_ready
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_socfpga_a10_fpga_read_stat
	movq	_A10_FPGAMGR_IMGCFG_STAT_F2S_PR_ERROR@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_22
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_21:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_22:
	movq	_A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	testl	%eax, (%r12)
	je	LBB0_2
LBB0_23:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r14, %rdi
	callq	_socfpga_a10_fpga_read_stat
	testl	%eax, (%r15)
	jne	LBB0_1
## %bb.3:
	testl	%eax, (%r12)
	jne	LBB0_23
## %bb.4:
	movq	%r14, %rdi
	callq	_socfpga_a10_fpga_read_stat
	testl	%eax, (%r15)
	jne	LBB0_1
## %bb.5:
	testl	%eax, (%r12)
	jne	LBB0_23
## %bb.6:
	movq	%r14, %rdi
	callq	_socfpga_a10_fpga_read_stat
	testl	%eax, (%r15)
	jne	LBB0_1
## %bb.7:
	testl	%eax, (%r12)
	jne	LBB0_23
## %bb.8:
	movq	%r14, %rdi
	callq	_socfpga_a10_fpga_read_stat
	testl	%eax, (%r15)
	jne	LBB0_1
## %bb.9:
	testl	%eax, (%r12)
	jne	LBB0_23
## %bb.10:
	movq	%r14, %rdi
	callq	_socfpga_a10_fpga_read_stat
	testl	%eax, (%r15)
	jne	LBB0_1
## %bb.11:
	testl	%eax, (%r12)
	jne	LBB0_23
## %bb.12:
	movq	%r14, %rdi
	callq	_socfpga_a10_fpga_read_stat
	testl	%eax, (%r15)
	jne	LBB0_1
## %bb.13:
	testl	%eax, (%r12)
	jne	LBB0_23
## %bb.14:
	movq	%r14, %rdi
	callq	_socfpga_a10_fpga_read_stat
	testl	%eax, (%r15)
	jne	LBB0_1
## %bb.15:
	testl	%eax, (%r12)
	jne	LBB0_23
## %bb.16:
	movq	%r14, %rdi
	callq	_socfpga_a10_fpga_read_stat
	testl	%eax, (%r15)
	jne	LBB0_1
## %bb.17:
	testl	%eax, (%r12)
	jne	LBB0_23
## %bb.18:
	movq	%r14, %rdi
	callq	_socfpga_a10_fpga_read_stat
	testl	%eax, (%r15)
	jne	LBB0_1
## %bb.19:
	testl	%eax, (%r12)
	jne	LBB0_23
## %bb.20:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_A10_FPGAMGR_IMGCFG_STAT_F2S_PR_ERROR,4,2 ## @A10_FPGAMGR_IMGCFG_STAT_F2S_PR_ERROR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY,4,2 ## @A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_socfpga_a10_fpga_wait_for_pr_ready
.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_wait_for_pr_ready
_socfpga_a10_fpga_wait_for_pr_ready:    ; @socfpga_a10_fpga_wait_for_pr_ready
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_socfpga_a10_fpga_read_stat
Lloh0:
	adrp	x20, _A10_FPGAMGR_IMGCFG_STAT_F2S_PR_ERROR@GOTPAGE
Lloh1:
	ldr	x20, [x20, _A10_FPGAMGR_IMGCFG_STAT_F2S_PR_ERROR@GOTPAGEOFF]
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_3
LBB0_1:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
Lloh4:
	adrp	x21, _A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY@GOTPAGE
Lloh5:
	ldr	x21, [x21, _A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_6
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	bl	_socfpga_a10_fpga_read_stat
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.7:
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.8:
	mov	x0, x19
	bl	_socfpga_a10_fpga_read_stat
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.9:
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.10:
	mov	x0, x19
	bl	_socfpga_a10_fpga_read_stat
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.11:
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.12:
	mov	x0, x19
	bl	_socfpga_a10_fpga_read_stat
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.13:
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.14:
	mov	x0, x19
	bl	_socfpga_a10_fpga_read_stat
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.15:
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.16:
	mov	x0, x19
	bl	_socfpga_a10_fpga_read_stat
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.17:
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.18:
	mov	x0, x19
	bl	_socfpga_a10_fpga_read_stat
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.19:
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.20:
	mov	x0, x19
	bl	_socfpga_a10_fpga_read_stat
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.21:
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.22:
	mov	x0, x19
	bl	_socfpga_a10_fpga_read_stat
	ldr	w8, [x20]
	tst	w8, w0
	b.ne	LBB0_1
; %bb.23:
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.24:
Lloh6:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_A10_FPGAMGR_IMGCFG_STAT_F2S_PR_ERROR,4,2 ; @A10_FPGAMGR_IMGCFG_STAT_F2S_PR_ERROR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY,4,2 ; @A10_FPGAMGR_IMGCFG_STAT_F2S_PR_READY
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_socfpga_a10_fpga_wait_for_pr_ready
.subsections_via_symbols
