	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, 16(%rax)
	leaq	L_.str(%rip), %rdi
	callq	_syscon_regmap_lookup_by_compatible
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	8(%rbx), %rdi
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	callq	_syscon_regmap_lookup_by_compatible
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	%r15, %rdi
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_7:
	movq	_SYSMGR_ISWGRP_HANDOFF3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_regmap_read
	movq	_F2S_BRIDGE_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_altera_fpga2sdram_br_ops@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rcx
	callq	_devm_fpga_bridge_create
	testq	%rax, %rax
	je	LBB0_1
## %bb.8:
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%r15, %rdi
	callq	_fpga_bridge_register
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	movq	(%rbx), %rdx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	movl	(%r14), %edi
	leaq	L_.str.5(%rip), %rsi
	leaq	-36(%rbp), %rdx
	callq	_of_property_read_u32
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movl	-36(%rbp), %edx
	cmpl	$2, %edx
	jl	LBB0_12
## %bb.11:
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_14:
	movl	%r12d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	testl	%edx, %edx
	leaq	L_.str.9(%rip), %rax
	leaq	L_.str.8(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	movl	-36(%rbp), %esi
	movq	%rbx, %rdi
	callq	__alt_fpga2sdram_enable_set
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_fpga_bridge_unregister
	movl	%ebx, %r12d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"altr,sdr-ctl"

L_.str.1:                               ## @.str.1
	.asciz	"regmap for altr,sdr-ctl lookup failed.\n"

L_.str.2:                               ## @.str.2
	.asciz	"altr,sys-mgr"

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

	.comm	_SYSMGR_ISWGRP_HANDOFF3,4,2     ## @SYSMGR_ISWGRP_HANDOFF3
	.comm	_F2S_BRIDGE_NAME,4,2            ## @F2S_BRIDGE_NAME
	.comm	_altera_fpga2sdram_br_ops,4,2   ## @altera_fpga2sdram_br_ops
L_.str.4:                               ## @.str.4
	.asciz	"driver initialized with handoff %08x\n"

L_.str.5:                               ## @.str.5
	.asciz	"bridge-enable"

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

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

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

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

	.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	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	str	x19, [x0, #16]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_syscon_regmap_lookup_by_compatible
	str	x0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #8]
	b	LBB0_5
LBB0_3:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_syscon_regmap_lookup_by_compatible
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.4:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x21
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
	add	sp, sp, #64
	b	_PTR_ERR
LBB0_6:
Lloh11:
	adrp	x8, _SYSMGR_ISWGRP_HANDOFF3@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SYSMGR_ISWGRP_HANDOFF3@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x20
	bl	_regmap_read
Lloh14:
	adrp	x8, _F2S_BRIDGE_NAME@GOTPAGE
Lloh15:
	ldr	x8, [x8, _F2S_BRIDGE_NAME@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, _altera_fpga2sdram_br_ops@GOTPAGE
Lloh18:
	ldr	x2, [x2, _altera_fpga2sdram_br_ops@GOTPAGEOFF]
	mov	x0, x19
	mov	x3, x20
	bl	_devm_fpga_bridge_create
	cbz	x0, LBB0_10
; %bb.7:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_platform_set_drvdata
	mov	x0, x21
	bl	_fpga_bridge_register
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.8:
	ldr	x2, [x20]
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	w0, [x19]
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	add	x2, sp, #12
	bl	_of_property_read_u32
	cbz	w0, LBB0_12
; %bb.9:
	mov	w22, #0
	b	LBB0_11
LBB0_10:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_11:
	mov	x0, x22
	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_12:
	ldr	w2, [sp, #12]
	cmp	w2, #2
	b.lt	LBB0_14
; %bb.13:
Lloh26:
	adrp	x1, l_.str.6@PAGE
Lloh27:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	mov	w22, #0
	b	LBB0_11
LBB0_14:
Lloh28:
	adrp	x8, l_.str.8@PAGE
Lloh29:
	add	x8, x8, l_.str.8@PAGEOFF
Lloh30:
	adrp	x9, l_.str.9@PAGE
Lloh31:
	add	x9, x9, l_.str.9@PAGEOFF
	cmp	w2, #0
	csel	x2, x9, x8, eq
Lloh32:
	adrp	x1, l_.str.7@PAGE
Lloh33:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	__alt_fpga2sdram_enable_set
	mov	x22, x0
	cbz	w0, LBB0_11
; %bb.15:
	mov	x0, x21
	bl	_fpga_bridge_unregister
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"altr,sdr-ctl"

l_.str.1:                               ; @.str.1
	.asciz	"regmap for altr,sdr-ctl lookup failed.\n"

l_.str.2:                               ; @.str.2
	.asciz	"altr,sys-mgr"

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

	.comm	_SYSMGR_ISWGRP_HANDOFF3,4,2     ; @SYSMGR_ISWGRP_HANDOFF3
	.comm	_F2S_BRIDGE_NAME,4,2            ; @F2S_BRIDGE_NAME
	.comm	_altera_fpga2sdram_br_ops,4,2   ; @altera_fpga2sdram_br_ops
l_.str.4:                               ; @.str.4
	.asciz	"driver initialized with handoff %08x\n"

l_.str.5:                               ; @.str.5
	.asciz	"bridge-enable"

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

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

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

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

	.no_dead_strip	_alt_fpga_bridge_probe
.subsections_via_symbols
