	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_g6_sig_expr_set
_aspeed_g6_sig_expr_set:                ## @aspeed_g6_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rsi)
	jle	LBB0_10
## %bb.1:
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rsi), %r15
	leaq	(%r15,%r13), %r12
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	leaq	4(%r15,%r13), %rax
	cmovneq	%r12, %rax
	movl	(%rax), %ebx
	movl	8(%r15,%r13), %edi
	callq	___ffs
	movl	%eax, %ecx
	shll	%cl, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	16(%r15,%r13), %rax
	cmpl	$0, (%rcx,%rax,4)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edi, %edi
	movq	_ASPEED_IP_SCU@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_WARN_ON
	movq	24(%r15,%r13), %rsi
	movq	_SCU500@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SCU510@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %ecx
	notl	%ecx
	movl	8(%r12), %edx
	andl	%edx, %ecx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	$4, %esi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	16(%r15,%r13), %rdi
	movl	(%rax,%rdi,4), %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_regmap_update_bits
	movq	24(%r15,%r13), %rsi
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	16(%r15,%r13), %rcx
	movl	(%rax,%rcx,4), %edi
	movl	8(%r15,%r13), %edx
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%ebx, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	jne	LBB0_15
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movslq	(%rsi), %rax
	addq	$32, %r13
	cmpq	%rax, %r14
	jl	LBB0_3
LBB0_10:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_aspeed_sig_expr_eval
	movl	%eax, %ecx
	testl	%eax, %eax
	js	LBB0_11
## %bb.12:
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_15
## %bb.13:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_14:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
LBB0_11:
	movl	%ecx, %eax
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ASPEED_IP_SCU,8,3              ## @ASPEED_IP_SCU
	.comm	_SCU500,8,3                     ## @SCU500
	.comm	_SCU510,8,3                     ## @SCU510
	.comm	_EPERM,4,2                      ## @EPERM
	.no_dead_strip	_aspeed_g6_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_g6_sig_expr_set
_aspeed_g6_sig_expr_set:                ; @aspeed_g6_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	x20, x1
	mov	x21, x0
	ldr	w8, [x1]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x23, #0
	mov	x24, #0
Lloh0:
	adrp	x25, _ASPEED_IP_SCU@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ASPEED_IP_SCU@GOTPAGEOFF]
Lloh2:
	adrp	x26, _SCU500@GOTPAGE
Lloh3:
	ldr	x26, [x26, _SCU500@GOTPAGEOFF]
Lloh4:
	adrp	x27, _SCU510@GOTPAGE
Lloh5:
	ldr	x27, [x27, _SCU510@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x28, x8, x23
	add	x8, x28, #4
	cmp	w19, #0
	csel	x8, x8, x28, eq
	ldr	w22, [x8]
	ldr	w0, [x28, #8]
	bl	___ffs
	ldr	x9, [x21]
	ldr	x8, [x28, #16]
	ldr	w9, [x9, x8, lsl #2]
	cbz	w9, LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	lsl	w22, w22, w0
	ldr	x9, [x25]
	cmp	x8, x9
	cset	w0, ne
	bl	_WARN_ON
	ldr	x1, [x28, #24]
	ldr	x8, [x26]
	ldr	x9, [x27]
	cmp	x1, x8
	ccmp	x1, x9, #4, ne
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w2, [x28, #8]
	bics	w3, w2, w22
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w1, w1, #4
	ldr	x8, [x21]
	ldr	x9, [x28, #16]
	ldr	w0, [x8, x9, lsl #2]
	bl	_regmap_update_bits
	ldr	x1, [x28, #24]
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x28, #16]
	ldr	w0, [x8, x9, lsl #2]
	ldr	w2, [x28, #8]
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x3, x22
	bl	_regmap_update_bits
	cbnz	w0, LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x20]
	add	x23, x23, #32
	cmp	x24, x8
	b.lt	LBB0_2
LBB0_8:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_aspeed_sig_expr_eval
	tbnz	w0, #31, LBB0_14
; %bb.9:
	cbz	w0, LBB0_12
; %bb.10:
	mov	w0, #0
	b	LBB0_14
LBB0_11:
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh8:
	adrp	x8, _EPERM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ASPEED_IP_SCU,8,3              ; @ASPEED_IP_SCU
	.comm	_SCU500,8,3                     ; @SCU500
	.comm	_SCU510,8,3                     ; @SCU510
	.comm	_EPERM,4,2                      ; @EPERM
	.no_dead_strip	_aspeed_g6_sig_expr_set
.subsections_via_symbols
