	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sprd_pmic_eic_toggle_trigger
_sprd_pmic_eic_toggle_trigger:          ## @sprd_pmic_eic_toggle_trigger
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rdi, %r15
	movl	%esi, %edi
	callq	_irq_get_trigger_type
	movq	_IRQ_TYPE_EDGE_BOTH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.1:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_sprd_pmic_eic_get
	movl	%eax, %r12d
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	movq	_SPRD_PMIC_EIC_IEV@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_sprd_pmic_eic_update
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_sprd_pmic_eic_get
	cmpl	%eax, %r12d
	je	LBB0_4
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	%r12, %rsi
	callq	_dev_warn
	xorl	%ecx, %ecx
	testl	%ebx, %ebx
	sete	%cl
	movl	(%r13), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_sprd_pmic_eic_update
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_sprd_pmic_eic_get
	cmpl	%eax, %ebx
	movl	%eax, %ebx
	jne	LBB0_3
LBB0_4:
	movq	_SPRD_PMIC_EIC_IE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	$1, %ecx
	callq	_sprd_pmic_eic_update
	movq	_SPRD_PMIC_EIC_TRIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	$1, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sprd_pmic_eic_update           ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ## @IRQ_TYPE_EDGE_BOTH
	.comm	_SPRD_PMIC_EIC_IEV,4,2          ## @SPRD_PMIC_EIC_IEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PMIC EIC level was changed.\n"

	.comm	_SPRD_PMIC_EIC_IE,4,2           ## @SPRD_PMIC_EIC_IE
	.comm	_SPRD_PMIC_EIC_TRIG,4,2         ## @SPRD_PMIC_EIC_TRIG
	.no_dead_strip	_sprd_pmic_eic_toggle_trigger
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sprd_pmic_eic_toggle_trigger
_sprd_pmic_eic_toggle_trigger:          ; @sprd_pmic_eic_toggle_trigger
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x0
	mov	x0, x1
	bl	_irq_get_trigger_type
Lloh0:
	adrp	x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_sprd_pmic_eic_get
	mov	x22, x0
	cmp	w0, #0
	cset	w3, eq
Lloh3:
	adrp	x23, _SPRD_PMIC_EIC_IEV@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SPRD_PMIC_EIC_IEV@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x19
	bl	_sprd_pmic_eic_update
	mov	x0, x20
	mov	x1, x19
	bl	_sprd_pmic_eic_get
	cmp	w22, w0
	b.eq	LBB0_4
; %bb.2:
	mov	x21, x0
Lloh5:
	adrp	x22, l_.str@PAGE
Lloh6:
	add	x22, x22, l_.str@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	mov	x1, x22
	bl	_dev_warn
	cmp	w21, #0
	cset	w3, eq
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x19
	bl	_sprd_pmic_eic_update
	mov	x0, x20
	mov	x1, x19
	bl	_sprd_pmic_eic_get
	cmp	w21, w0
	mov	x21, x0
	b.ne	LBB0_3
LBB0_4:
Lloh7:
	adrp	x8, _SPRD_PMIC_EIC_IE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SPRD_PMIC_EIC_IE@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w3, #1
	bl	_sprd_pmic_eic_update
Lloh10:
	adrp	x8, _SPRD_PMIC_EIC_TRIG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SPRD_PMIC_EIC_TRIG@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	mov	w3, #1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_sprd_pmic_eic_update
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ; @IRQ_TYPE_EDGE_BOTH
	.comm	_SPRD_PMIC_EIC_IEV,4,2          ; @SPRD_PMIC_EIC_IEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PMIC EIC level was changed.\n"

	.comm	_SPRD_PMIC_EIC_IE,4,2           ; @SPRD_PMIC_EIC_IE
	.comm	_SPRD_PMIC_EIC_TRIG,4,2         ; @SPRD_PMIC_EIC_TRIG
	.no_dead_strip	_sprd_pmic_eic_toggle_trigger
.subsections_via_symbols
