	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_g5_sig_expr_set
_aspeed_g5_sig_expr_set:                ## @aspeed_g5_sig_expr_set
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rsi)
	jle	LBB0_17
## %bb.1:
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
LBB0_2:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rcx
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax,%rcx,4), %edi
	movq	24(%r12,%r14), %rsi
	movl	8(%r12,%r14), %edx
	movl	%r13d, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	jne	LBB0_22
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movslq	(%rsi), %rax
	addq	$32, %r14
	cmpq	%rax, %r15
	jge	LBB0_17
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rsi), %r12
	leaq	(%r12,%r14), %rcx
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	leaq	4(%r12,%r14), %rax
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	cmovneq	%rcx, %rax
	movl	(%rax), %r13d
	movl	8(%r12,%r14), %edi
	callq	___ffs
	movl	%eax, %ecx
	shll	%cl, %r13d
	movq	16(%r12,%r14), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_aspeed_g5_acquire_regmap
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_20
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%r12,%r14), %rax
	movq	_ASPEED_IP_SCU@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	cmpq	%rdx, %rax
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%r12,%r14), %rcx
	movq	_HW_STRAP1@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	$21, %edi
	callq	_BIT
	movl	%eax, %ebx
	movl	$22, %edi
	callq	_BIT
	orl	%ebx, %eax
	testl	%eax, -56(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_4
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%r12,%r14), %rax
	movq	_ASPEED_IP_SCU@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rcx
	movq	%rdx, %rax
	cmpq	%rdx, %rcx
	jne	LBB0_3
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%r12,%r14), %rcx
	movq	_HW_STRAP2@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_4
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_HW_STRAP1@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_2
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%r13d, %edx
	notl	%edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	andl	8(%rcx), %edx
	je	LBB0_2
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %edi
	movq	_HW_REVISION_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_22
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%r12,%r14), %rcx
	jmp	LBB0_3
LBB0_17:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_aspeed_sig_expr_eval
	movl	%eax, %ecx
	testl	%eax, %eax
	js	LBB0_21
## %bb.18:
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_22
## %bb.19:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_22
LBB0_20:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	movq	16(%r12,%r14), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_21:
	movl	%ecx, %eax
LBB0_22:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to acquire regmap for IP block %d\n"

	.comm	_ASPEED_IP_SCU,8,3              ## @ASPEED_IP_SCU
	.comm	_HW_STRAP1,8,3                  ## @HW_STRAP1
	.comm	_HW_STRAP2,8,3                  ## @HW_STRAP2
	.comm	_HW_REVISION_ID,4,2             ## @HW_REVISION_ID
	.comm	_EPERM,4,2                      ## @EPERM
	.no_dead_strip	_aspeed_g5_sig_expr_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aspeed_g5_sig_expr_set
_aspeed_g5_sig_expr_set:                ; @aspeed_g5_sig_expr_set
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	w8, [x1]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.1:
	mov	x24, #0
	mov	x25, #0
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x9, x8
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20]
	ldr	w0, [x8, x9, lsl #2]
	add	x8, x27, x24
	ldr	x1, [x8, #24]
	ldr	w2, [x28, #8]
	mov	x3, x22
	bl	_regmap_update_bits
	cbnz	w0, LBB0_21
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x21]
	add	x24, x24, #32
	cmp	x25, x8
	b.ge	LBB0_16
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x21, #8]
	add	x28, x27, x24
	add	x8, x28, #4
	cmp	w19, #0
	csel	x8, x8, x28, eq
	ldr	w26, [x8]
	ldr	w0, [x28, #8]
	bl	___ffs
	mov	x23, x0
	ldr	x1, [x28, #16]
	mov	x0, x20
	bl	_aspeed_g5_acquire_regmap
	mov	x22, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_19
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	lsl	w22, w26, w23
	ldr	x8, [x28, #16]
Lloh0:
	adrp	x9, _ASPEED_IP_SCU@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ASPEED_IP_SCU@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x9]
	cmp	x8, x10
	b.ne	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x27, x24
	ldr	x9, [x9, #24]
Lloh3:
	adrp	x10, _HW_STRAP1@GOTPAGE
Lloh4:
	ldr	x10, [x10, _HW_STRAP1@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w26, [x28, #8]
	mov	w0, #21
	bl	_BIT
	mov	x23, x0
	mov	w0, #22
	bl	_BIT
	orr	w8, w0, w23
	tst	w8, w26
	b.eq	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x28, #16]
Lloh6:
	adrp	x9, _ASPEED_IP_SCU@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ASPEED_IP_SCU@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x9]
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x9, x8
	mov	x8, x10
	cmp	x9, x10
	b.ne	LBB0_3
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x27, x24
	ldr	x9, [x9, #24]
Lloh9:
	adrp	x10, _HW_STRAP2@GOTPAGE
Lloh10:
	ldr	x10, [x10, _HW_STRAP2@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh12:
	adrp	x10, _HW_STRAP1@GOTPAGE
Lloh13:
	ldr	x10, [x10, _HW_STRAP1@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x28, #8]
	bics	w2, w9, w22
	b.eq	LBB0_2
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x20]
	ldr	w0, [x9, x8, lsl #2]
Lloh15:
	adrp	x8, _HW_REVISION_ID@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HW_REVISION_ID@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_regmap_write
	tbnz	w0, #31, LBB0_21
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x28, #16]
	b	LBB0_3
LBB0_16:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_aspeed_sig_expr_eval
	tbnz	w0, #31, LBB0_21
; %bb.17:
	cbz	w0, LBB0_20
; %bb.18:
	mov	w0, #0
	b	LBB0_21
LBB0_19:
	ldr	w0, [x20, #8]
	ldr	x2, [x28, #16]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_20:
Lloh20:
	adrp	x8, _EPERM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_21:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to acquire regmap for IP block %d\n"

	.comm	_ASPEED_IP_SCU,8,3              ; @ASPEED_IP_SCU
	.comm	_HW_STRAP1,8,3                  ; @HW_STRAP1
	.comm	_HW_STRAP2,8,3                  ; @HW_STRAP2
	.comm	_HW_REVISION_ID,4,2             ; @HW_REVISION_ID
	.comm	_EPERM,4,2                      ; @EPERM
	.no_dead_strip	_aspeed_g5_sig_expr_set
.subsections_via_symbols
