	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alt_fpga_bridge_probe
_alt_fpga_bridge_probe:                 ## @alt_fpga_bridge_probe
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_altera_fpga_of_match@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_of_match_device
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	(%rax), %r14
	movl	(%r15), %edi
	xorl	%esi, %esi
	callq	_of_reset_control_get_exclusive_by_index
	movl	%eax, 24(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movl	4(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	24(%r14), %edi
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_4:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_5:
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	cmpq	$0, 16(%r14)
	je	LBB0_10
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	callq	_syscon_regmap_lookup_by_compatible
	movl	%eax, 8(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	8(%r14), %edi
	jmp	LBB0_3
LBB0_10:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movl	%eax, (%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%r14), %edi
	jmp	LBB0_3
LBB0_12:
	movl	(%r14), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.5(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_14:
	movl	(%r15), %edi
	leaq	L_.str.6(%rip), %rsi
	leaq	-28(%rbp), %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	jne	LBB0_18
## %bb.15:
	movl	-28(%rbp), %edx
	cmpl	$2, %edx
	jl	LBB0_17
## %bb.16:
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
	jmp	LBB0_18
LBB0_17:
	testl	%edx, %edx
	leaq	L_.str.10(%rip), %rax
	leaq	L_.str.9(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.8(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
	movl	-28(%rbp), %esi
	movq	%r14, %rdi
	callq	__alt_hps2fpga_enable_set
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
LBB0_18:
	movl	4(%r14), %esi
	movq	_altera_hps2fpga_br_ops@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%r14, %rcx
	callq	_devm_fpga_bridge_create
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%rbx, %rdi
	callq	_fpga_bridge_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
## %bb.20:
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_21:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_22:
	movl	(%r14), %edi
	callq	_clk_disable_unprepare
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_altera_fpga_of_match,4,2       ## @altera_fpga_of_match
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to match device\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"Could not get %s reset control\n"

L_.str.2:                               ## @.str.2
	.asciz	"altr,l3regs"

L_.str.3:                               ## @.str.3
	.asciz	"regmap for altr,l3regs lookup failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"no clock specified\n"

L_.str.5:                               ## @.str.5
	.asciz	"could not enable clock\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.6:                               ## @.str.6
	.asciz	"bridge-enable"

L_.str.7:                               ## @.str.7
	.asciz	"invalid bridge-enable %u > 1\n"

L_.str.8:                               ## @.str.8
	.asciz	"%s bridge\n"

L_.str.9:                               ## @.str.9
	.asciz	"enabling"

L_.str.10:                              ## @.str.10
	.asciz	"disabling"

	.comm	_altera_hps2fpga_br_ops,4,2     ## @altera_hps2fpga_br_ops
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_alt_fpga_bridge_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alt_fpga_bridge_probe
_alt_fpga_bridge_probe:                 ; @alt_fpga_bridge_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _altera_fpga_of_match@GOTPAGE
Lloh1:
	ldr	x8, [x8, _altera_fpga_of_match@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_of_match_device
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x19, [x0]
	ldr	w0, [x20]
	mov	w1, #0
	bl	_of_reset_control_get_exclusive_by_index
	str	w0, [x19, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.2:
	ldr	w8, [x19, #4]
	str	x8, [sp]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w0, [x19, #24]
LBB0_3:
	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
	add	sp, sp, #64
	b	_PTR_ERR
LBB0_4:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_6:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
LBB0_7:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_10
; %bb.8:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_syscon_regmap_lookup_by_compatible
	str	w0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.9:
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w0, [x19, #8]
	b	LBB0_3
LBB0_10:
	mov	x0, x20
	mov	x1, #0
	bl	_devm_clk_get
	str	w0, [x19]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.11:
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w0, [x19]
	b	LBB0_3
LBB0_12:
	ldr	w0, [x19]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_14
; %bb.13:
Lloh15:
	adrp	x1, l_.str.5@PAGE
Lloh16:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh17:
	adrp	x8, _EBUSY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_5
LBB0_14:
	ldr	w0, [x20]
Lloh19:
	adrp	x1, l_.str.6@PAGE
Lloh20:
	add	x1, x1, l_.str.6@PAGEOFF
	add	x2, sp, #12
	bl	_of_property_read_u32
	cbnz	w0, LBB0_18
; %bb.15:
	ldr	w2, [sp, #12]
	cmp	w2, #2
	b.lt	LBB0_17
; %bb.16:
Lloh21:
	adrp	x1, l_.str.7@PAGE
Lloh22:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
	b	LBB0_18
LBB0_17:
Lloh23:
	adrp	x8, l_.str.9@PAGE
Lloh24:
	add	x8, x8, l_.str.9@PAGEOFF
Lloh25:
	adrp	x9, l_.str.10@PAGE
Lloh26:
	add	x9, x9, l_.str.10@PAGEOFF
	cmp	w2, #0
	csel	x2, x9, x8, eq
Lloh27:
	adrp	x1, l_.str.8@PAGE
Lloh28:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	__alt_hps2fpga_enable_set
	mov	x21, x0
	cbnz	w0, LBB0_21
LBB0_18:
	ldr	w1, [x19, #4]
Lloh29:
	adrp	x2, _altera_hps2fpga_br_ops@GOTPAGE
Lloh30:
	ldr	x2, [x2, _altera_hps2fpga_br_ops@GOTPAGEOFF]
	mov	x0, x20
	mov	x3, x19
	bl	_devm_fpga_bridge_create
	cbz	x0, LBB0_20
; %bb.19:
	mov	x21, x0
	mov	x0, x20
	mov	x1, x21
	bl	_platform_set_drvdata
	mov	x0, x21
	bl	_fpga_bridge_register
	mov	x21, x0
	cbnz	w0, LBB0_21
	b	LBB0_6
LBB0_20:
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_21:
	ldr	w0, [x19]
	bl	_clk_disable_unprepare
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_altera_fpga_of_match,4,2       ; @altera_fpga_of_match
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to match device\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"Could not get %s reset control\n"

l_.str.2:                               ; @.str.2
	.asciz	"altr,l3regs"

l_.str.3:                               ; @.str.3
	.asciz	"regmap for altr,l3regs lookup failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"no clock specified\n"

l_.str.5:                               ; @.str.5
	.asciz	"could not enable clock\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.6:                               ; @.str.6
	.asciz	"bridge-enable"

l_.str.7:                               ; @.str.7
	.asciz	"invalid bridge-enable %u > 1\n"

l_.str.8:                               ; @.str.8
	.asciz	"%s bridge\n"

l_.str.9:                               ; @.str.9
	.asciz	"enabling"

l_.str.10:                              ; @.str.10
	.asciz	"disabling"

	.comm	_altera_hps2fpga_br_ops,4,2     ; @altera_hps2fpga_br_ops
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_alt_fpga_bridge_probe
.subsections_via_symbols
