	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function altera_ps_probe
_altera_ps_probe:                       ## @altera_ps_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r14
	cmpq	$0, (%rbx)
	je	LBB0_6
## %bb.4:
	movq	_of_ef_match@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_of_match_device
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:
	movl	(%rax), %eax
	movl	%eax, 40(%r14)
	jmp	LBB0_8
LBB0_6:
	movq	%rbx, %rdi
	callq	_spi_get_device_id
	movl	%eax, %edi
	callq	_id_to_data
	movl	%eax, 40(%r14)
	testl	%eax, %eax
	je	LBB0_5
LBB0_8:
	movq	%rbx, 32(%r14)
	movq	_GPIOD_OUT_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 24(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	24(%r14), %rdi
	callq	_PTR_ERR
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	24(%r14), %rdi
	jmp	LBB0_14
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_10:
	movq	_GPIOD_IN@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devm_gpiod_get
	movq	%rax, 16(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	16(%r14), %rdi
	callq	_PTR_ERR
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	16(%r14), %rdi
	jmp	LBB0_14
LBB0_12:
	movl	(%r15), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devm_gpiod_get_optional
	movq	%rax, 8(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	8(%r14), %rdi
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	callq	_PTR_ERR
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	8(%r14), %rdi
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_15:
	testq	%rdi, %rdi
	jne	LBB0_17
## %bb.16:
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
LBB0_17:
	movl	(%r14), %r15d
	movq	%rbx, %rdi
	callq	_dev_driver_string
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_dev_name
	leaq	L_.str.7(%rip), %rdx
	movl	%r15d, %edi
	movl	$4, %esi
	movq	%r12, %rcx
	movq	%rax, %r8
	callq	_snprintf
	movl	(%r14), %esi
	movq	_altera_ps_ops@GOTPCREL(%rip), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rcx
	callq	_devm_fpga_mgr_create
	testq	%rax, %rax
	je	LBB0_1
## %bb.18:
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_spi_set_drvdata
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fpga_mgr_register              ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_of_ef_match,4,2                ## @of_ef_match
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nconfig"

	.comm	_GPIOD_OUT_LOW,4,2              ## @GPIOD_OUT_LOW
L_.str.1:                               ## @.str.1
	.asciz	"Failed to get config gpio: %ld\n"

L_.str.2:                               ## @.str.2
	.asciz	"nstat"

	.comm	_GPIOD_IN,4,2                   ## @GPIOD_IN
L_.str.3:                               ## @.str.3
	.asciz	"Failed to get status gpio: %ld\n"

L_.str.4:                               ## @.str.4
	.asciz	"confd"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to get confd gpio: %ld\n"

L_.str.6:                               ## @.str.6
	.asciz	"Not using confd gpio"

L_.str.7:                               ## @.str.7
	.asciz	"%s %s"

	.comm	_altera_ps_ops,4,2              ## @altera_ps_ops
	.no_dead_strip	_altera_ps_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function altera_ps_probe
_altera_ps_probe:                       ; @altera_ps_probe
	.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
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_17
; %bb.1:
	mov	x20, x0
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _of_ef_match@GOTPAGE
Lloh4:
	ldr	x8, [x8, _of_ef_match@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_of_match_device
	cbz	x0, LBB0_7
; %bb.3:
	ldr	w8, [x0]
	str	w8, [x20, #40]
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_spi_get_device_id
	bl	_id_to_data
	str	w0, [x20, #40]
	cbz	w0, LBB0_7
LBB0_5:
	str	x19, [x20, #32]
Lloh6:
	adrp	x8, _GPIOD_OUT_LOW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GPIOD_OUT_LOW@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	str	x0, [x20, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.6:
	ldr	x0, [x20, #24]
	bl	_PTR_ERR
	mov	x2, x0
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #24]
	b	LBB0_12
LBB0_7:
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_18
LBB0_8:
Lloh15:
	adrp	x21, _GPIOD_IN@GOTPAGE
Lloh16:
	ldr	x21, [x21, _GPIOD_IN@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get
	str	x0, [x20, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.9:
	ldr	x0, [x20, #16]
	bl	_PTR_ERR
	mov	x2, x0
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #16]
	b	LBB0_12
LBB0_10:
	ldr	w2, [x21]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_devm_gpiod_get_optional
	str	x0, [x20, #8]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x20, #8]
	cbz	x8, LBB0_13
; %bb.11:
	bl	_PTR_ERR
	mov	x2, x0
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #8]
LBB0_12:
	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
	b	_PTR_ERR
LBB0_13:
	cbnz	x0, LBB0_15
; %bb.14:
Lloh25:
	adrp	x1, l_.str.6@PAGE
Lloh26:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_15:
	ldr	w21, [x20]
	mov	x0, x19
	bl	_dev_driver_string
	mov	x22, x0
	mov	x0, x19
	bl	_dev_name
	mov	x4, x0
Lloh27:
	adrp	x2, l_.str.7@PAGE
Lloh28:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x21
	mov	w1, #4
	mov	x3, x22
	bl	_snprintf
	ldr	w1, [x20]
Lloh29:
	adrp	x2, _altera_ps_ops@GOTPAGE
Lloh30:
	ldr	x2, [x2, _altera_ps_ops@GOTPAGEOFF]
	mov	x0, x19
	mov	x3, x20
	bl	_devm_fpga_mgr_create
	cbz	x0, LBB0_17
; %bb.16:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_spi_set_drvdata
	mov	x0, x20
	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
	b	_fpga_mgr_register
LBB0_17:
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w0, w8
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_of_ef_match,4,2                ; @of_ef_match
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nconfig"

	.comm	_GPIOD_OUT_LOW,4,2              ; @GPIOD_OUT_LOW
l_.str.1:                               ; @.str.1
	.asciz	"Failed to get config gpio: %ld\n"

l_.str.2:                               ; @.str.2
	.asciz	"nstat"

	.comm	_GPIOD_IN,4,2                   ; @GPIOD_IN
l_.str.3:                               ; @.str.3
	.asciz	"Failed to get status gpio: %ld\n"

l_.str.4:                               ; @.str.4
	.asciz	"confd"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to get confd gpio: %ld\n"

l_.str.6:                               ; @.str.6
	.asciz	"Not using confd gpio"

l_.str.7:                               ; @.str.7
	.asciz	"%s %s"

	.comm	_altera_ps_ops,4,2              ; @altera_ps_ops
	.no_dead_strip	_altera_ps_probe
.subsections_via_symbols
