	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_altr_sysmgr_regmap_lookup_by_phandle ## -- Begin function altr_sysmgr_regmap_lookup_by_phandle
	.p2align	4, 0x90
_altr_sysmgr_regmap_lookup_by_phandle:  ## @altr_sysmgr_regmap_lookup_by_phandle
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_of_parse_phandle
	movq	%rax, %rbx
LBB0_2:
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.5:
	movq	_altr_sysmgr_driver@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_driver_find_device_by_of_node
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_of_node_put
	testq	%r14, %r14
	je	LBB0_6
## %bb.7:
	movq	%r14, %rdi
	callq	_dev_get_drvdata
	movq	(%rax), %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%edi, %edi
	subl	(%rax), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_altr_sysmgr_driver,4,2         ## @altr_sysmgr_driver
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_altr_sysmgr_regmap_lookup_by_phandle ; -- Begin function altr_sysmgr_regmap_lookup_by_phandle
	.p2align	2
_altr_sysmgr_regmap_lookup_by_phandle:  ; @altr_sysmgr_regmap_lookup_by_phandle
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	cbz	x1, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w2, #0
	bl	_of_parse_phandle
	mov	x19, x0
LBB0_2:
	cbz	x19, LBB0_5
; %bb.3:
Lloh0:
	adrp	x0, _altr_sysmgr_driver@GOTPAGE
Lloh1:
	ldr	x0, [x0, _altr_sysmgr_driver@GOTPAGEOFF]
	mov	x1, x19
	bl	_driver_find_device_by_of_node
	mov	x20, x0
	mov	x0, x19
	bl	_of_node_put
	cbz	x20, LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_dev_get_drvdata
	ldr	x0, [x0]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh4:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ERR_PTR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_altr_sysmgr_driver,4,2         ; @altr_sysmgr_driver
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
.subsections_via_symbols
