	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_g5_acquire_regmap
_aspeed_g5_acquire_regmap:              ## @aspeed_g5_acquire_regmap
	.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
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_ASPEED_IP_SCU@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	8(%r15), %rax
	movslq	%ebx, %rbx
	xorl	%edi, %edi
	cmpq	$0, (%rax,%rbx,8)
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_WARN
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %r14
	jmp	LBB0_17
LBB0_2:
	movq	_ASPEED_NR_PINMUX_IPS@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jle	LBB0_3
## %bb.6:
	movq	8(%r15), %rax
	movslq	%ebx, %r14
	movq	(%rax,%r14,8), %rdi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	8(%r15), %rax
	movq	(%rax,%r14,8), %r14
LBB0_17:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ASPEED_IP_GFX@GOTPCREL(%rip), %r12
	cmpl	%ebx, (%r12)
	jne	LBB0_12
## %bb.9:
	movq	(%r15), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	callq	_of_parse_phandle
	testq	%rax, %rax
	je	LBB0_18
## %bb.10:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_syscon_node_to_regmap
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_of_node_put
	movq	%r14, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_17
## %bb.11:
	movq	8(%r15), %rax
	movslq	(%r12), %rcx
	movq	%r14, (%rax,%rcx,8)
	movq	(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_16
LBB0_12:
	movq	_ASPEED_IP_LPC@GOTPCREL(%rip), %r12
	cmpl	%ebx, (%r12)
	jne	LBB0_3
## %bb.13:
	movq	(%r15), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edx
	callq	_of_parse_phandle
	testq	%rax, %rax
	je	LBB0_19
## %bb.14:
	movq	%rax, %rbx
	movq	(%rax), %rdi
	callq	_syscon_node_to_regmap
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_of_node_put
	movq	%r14, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_17
## %bb.15:
	movq	8(%r15), %rax
	movslq	(%r12), %rcx
	movq	%r14, (%rax,%rcx,8)
	movq	(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
LBB0_16:
	callq	_dev_dbg
	jmp	LBB0_17
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_18:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movl	%r14d, %edi
	jmp	LBB0_5
LBB0_19:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_ASPEED_IP_SCU,4,2              ## @ASPEED_IP_SCU
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Missing SCU syscon!"

	.comm	_ASPEED_NR_PINMUX_IPS,4,2       ## @ASPEED_NR_PINMUX_IPS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ASPEED_IP_GFX,4,2              ## @ASPEED_IP_GFX
L_.str.1:                               ## @.str.1
	.asciz	"aspeed,external-nodes"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"Acquired GFX regmap"

	.comm	_ASPEED_IP_LPC,4,2              ## @ASPEED_IP_LPC
L_.str.3:                               ## @.str.3
	.asciz	"Acquired LPC regmap"

	.no_dead_strip	_aspeed_g5_acquire_regmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aspeed_g5_acquire_regmap
_aspeed_g5_acquire_regmap:              ; @aspeed_g5_acquire_regmap
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ASPEED_IP_SCU@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ASPEED_IP_SCU@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	sbfiz	x20, x20, #3, #32
	ldr	x8, [x8, x20]
	cmp	x8, #0
	cset	w0, eq
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN
	ldr	x8, [x19, #8]
	ldr	x20, [x8, x20]
	b	LBB0_5
LBB0_2:
Lloh5:
	adrp	x8, _ASPEED_NR_PINMUX_IPS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ASPEED_NR_PINMUX_IPS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w20
	b.le	LBB0_15
; %bb.3:
	ldr	x8, [x19, #8]
	ldr	x0, [x8, w20, sxtw #3]
	bl	_likely
	cbz	x0, LBB0_6
; %bb.4:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	sxtw	x8, w20
	ldr	x9, [x19, #8]
	ldr	x20, [x9, x8, lsl #3]
LBB0_5:
	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
	ret
LBB0_6:
Lloh8:
	adrp	x22, _ASPEED_IP_GFX@GOTPAGE
Lloh9:
	ldr	x22, [x22, _ASPEED_IP_GFX@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w20
	b.ne	LBB0_10
; %bb.7:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #0
	bl	_of_parse_phandle
	cbz	x0, LBB0_17
; %bb.8:
	mov	x21, x0
	bl	_syscon_node_to_regmap
	mov	x20, x0
	mov	x0, x21
	bl	_of_node_put
	mov	x0, x20
	bl	_IS_ERR
	cbnz	x0, LBB0_5
; %bb.9:
	ldr	x8, [x19, #8]
	ldrsw	x9, [x22]
	str	x20, [x8, x9, lsl #3]
	ldr	x0, [x19]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_10:
Lloh14:
	adrp	x22, _ASPEED_IP_LPC@GOTPAGE
Lloh15:
	ldr	x22, [x22, _ASPEED_IP_LPC@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, w20
	b.ne	LBB0_15
; %bb.11:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #1
	bl	_of_parse_phandle
	cbz	x0, LBB0_17
; %bb.12:
	mov	x21, x0
	ldr	x0, [x0]
	bl	_syscon_node_to_regmap
	mov	x20, x0
	mov	x0, x21
	bl	_of_node_put
	mov	x0, x20
	bl	_IS_ERR
	cbnz	x0, LBB0_5
; %bb.13:
	ldr	x8, [x19, #8]
	ldrsw	x9, [x22]
	str	x20, [x8, x9, lsl #3]
	ldr	x0, [x19]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_14:
	bl	_dev_dbg
	b	LBB0_5
LBB0_15:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_16:
	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
	b	_ERR_PTR
LBB0_17:
Lloh22:
	adrp	x8, _ENODEV@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ASPEED_IP_SCU,4,2              ; @ASPEED_IP_SCU
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Missing SCU syscon!"

	.comm	_ASPEED_NR_PINMUX_IPS,4,2       ; @ASPEED_NR_PINMUX_IPS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ASPEED_IP_GFX,4,2              ; @ASPEED_IP_GFX
l_.str.1:                               ; @.str.1
	.asciz	"aspeed,external-nodes"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"Acquired GFX regmap"

	.comm	_ASPEED_IP_LPC,4,2              ; @ASPEED_IP_LPC
l_.str.3:                               ; @.str.3
	.asciz	"Acquired LPC regmap"

	.no_dead_strip	_aspeed_g5_acquire_regmap
.subsections_via_symbols
