	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_g4_sig_expr_set
_aspeed_g4_sig_expr_set:                ## @aspeed_g4_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_13
## %bb.1:
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r12,%r14), %rsi
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %edi
	movl	8(%r12,%r14), %edx
	movl	%ebx, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	jne	LBB0_18
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	movq	%r13, %rsi
	movslq	(%r13), %rax
	addq	$32, %r14
	cmpq	%rax, %r15
	jge	LBB0_13
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsi, %r13
	movq	8(%rsi), %r12
	leaq	(%r12,%r14), %rax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	leaq	4(%r12,%r14), %rcx
	cmovneq	%rax, %rcx
	movl	(%rcx), %ebx
	movl	8(%r12,%r14), %edi
	callq	___ffs
	movl	%eax, %ecx
	shll	%cl, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rcx
	movq	16(%r12,%r14), %rax
	cmpl	$0, (%rcx,%rax,4)
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ASPEED_IP_SCU@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r12,%r14), %rcx
	movq	_HW_STRAP1@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r12,%r14), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	$21, %edi
	callq	_BIT
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	$22, %edi
	callq	_BIT
	orl	-60(%rbp), %eax                 ## 4-byte Folded Reload
	testl	%eax, -64(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r12,%r14), %rax
	movq	_ASPEED_IP_SCU@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rcx, %rax
	jne	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r12,%r14), %rsi
	movq	_HW_STRAP2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	jne	LBB0_11
	jmp	LBB0_12
LBB0_13:
	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_14
## %bb.15:
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_18
## %bb.16:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
LBB0_17:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_18
LBB0_14:
	movl	%ecx, %eax
LBB0_18:
	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	_HW_STRAP1,8,3                  ## @HW_STRAP1
	.comm	_HW_STRAP2,8,3                  ## @HW_STRAP2
	.comm	_EPERM,4,2                      ## @EPERM
	.no_dead_strip	_aspeed_g4_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_g4_sig_expr_set
_aspeed_g4_sig_expr_set:                ; @aspeed_g4_sig_expr_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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_12
; %bb.1:
	mov	x24, #0
	mov	x25, #0
Lloh0:
	adrp	x23, _ASPEED_IP_SCU@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ASPEED_IP_SCU@GOTPAGEOFF]
	str	x21, [sp, #8]                   ; 8-byte Folded Spill
	str	w19, [sp, #4]                   ; 4-byte Folded Spill
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x26, x24
	ldr	x1, [x9, #24]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	lsl	w3, w28, w22
	ldr	x9, [x21]
	ldr	w0, [x9, x8, lsl #2]
	ldr	w2, [x27, #8]
	bl	_regmap_update_bits
	cbnz	w0, LBB0_18
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, #1
	ldrsw	x8, [x20]
	add	x24, x24, #32
	cmp	x25, x8
	b.ge	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x20, #8]
	add	x27, x26, x24
	add	x8, x27, #4
	cmp	w19, #0
	csel	x8, x8, x27, eq
	ldr	w28, [x8]
	ldr	w0, [x27, #8]
	bl	___ffs
	ldr	x9, [x21]
	ldr	x8, [x27, #16]
	ldr	w9, [x9, x8, lsl #2]
	cbz	w9, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, x0
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x26, x24
	ldr	x9, [x9, #24]
Lloh2:
	adrp	x10, _HW_STRAP1@GOTPAGE
Lloh3:
	ldr	x10, [x10, _HW_STRAP1@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w19, [x27, #8]
	mov	w0, #21
	bl	_BIT
	mov	x21, x23
	mov	x23, x0
	mov	w0, #22
	bl	_BIT
	orr	w8, w0, w23
	mov	x23, x21
	tst	w8, w19
	ldr	w19, [sp, #4]                   ; 4-byte Folded Reload
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	b.eq	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x27, #16]
	ldr	x9, [x23]
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x26, x24
	ldr	x1, [x9, #24]
Lloh5:
	adrp	x9, _HW_STRAP2@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HW_STRAP2@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x1, x9
	b.ne	LBB0_3
	b	LBB0_4
LBB0_12:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_aspeed_sig_expr_eval
	tbnz	w0, #31, LBB0_18
; %bb.13:
	cbz	w0, LBB0_16
; %bb.14:
	mov	w0, #0
	b	LBB0_18
LBB0_15:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
Lloh10:
	adrp	x8, _EPERM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ASPEED_IP_SCU,8,3              ; @ASPEED_IP_SCU
	.comm	_HW_STRAP1,8,3                  ; @HW_STRAP1
	.comm	_HW_STRAP2,8,3                  ; @HW_STRAP2
	.comm	_EPERM,4,2                      ; @EPERM
	.no_dead_strip	_aspeed_g4_sig_expr_set
.subsections_via_symbols
