	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ab8500_irq_unmask
_ab8500_irq_unmask:                     ## @ab8500_irq_unmask
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_irqd_get_trigger_type
	movl	(%rbx), %edi
	leal	7(%rdi), %edx
	testl	%edi, %edi
	cmovnsl	%edi, %edx
	movl	%edi, %ecx
	andb	$7, %cl
	movl	$1, %esi
	shll	%cl, %esi
	sarl	$3, %edx
	movq	_IRQ_TYPE_EDGE_RISING@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movl	%esi, %ecx
	notl	%ecx
	movq	(%r14), %r8
	movslq	%edx, %rbx
	andl	%ecx, (%r8,%rbx,4)
LBB0_2:
	movq	_IRQ_TYPE_EDGE_FALLING@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.3:
	movq	_AB8500_INT_GPIO6R@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jl	LBB0_6
## %bb.4:
	movq	_AB8500_INT_GPIO41R@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jg	LBB0_6
## %bb.5:
	addl	$2, %edx
	jmp	LBB0_10
LBB0_6:
	movq	_AB9540_INT_GPIO50R@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jl	LBB0_9
## %bb.7:
	movq	_AB9540_INT_GPIO54R@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jg	LBB0_9
## %bb.8:
	incl	%edx
	jmp	LBB0_10
LBB0_9:
	movq	_AB8540_INT_GPIO43R@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	sete	%al
	movq	_AB8540_INT_GPIO44R@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edi
	sete	%cl
	orb	%al, %cl
	shll	%cl, %esi
LBB0_10:
	notl	%esi
	movq	(%r14), %rax
	movslq	%edx, %rcx
	andl	%esi, (%rax,%rcx,4)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ## @IRQ_TYPE_EDGE_RISING
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ## @IRQ_TYPE_EDGE_FALLING
	.comm	_AB8500_INT_GPIO6R,4,2          ## @AB8500_INT_GPIO6R
	.comm	_AB8500_INT_GPIO41R,4,2         ## @AB8500_INT_GPIO41R
	.comm	_AB9540_INT_GPIO50R,4,2         ## @AB9540_INT_GPIO50R
	.comm	_AB9540_INT_GPIO54R,4,2         ## @AB9540_INT_GPIO54R
	.comm	_AB8540_INT_GPIO43R,4,2         ## @AB8540_INT_GPIO43R
	.comm	_AB8540_INT_GPIO44R,4,2         ## @AB8540_INT_GPIO44R
	.no_dead_strip	_ab8500_irq_unmask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ab8500_irq_unmask
_ab8500_irq_unmask:                     ; @ab8500_irq_unmask
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_irq_data_get_irq_chip_data
	mov	x19, x0
	mov	x0, x20
	bl	_irqd_get_trigger_type
	ldr	w10, [x20]
	add	w8, w10, #7
	cmp	w10, #0
	csel	w8, w8, w10, lt
	asr	w8, w8, #3
	and	x9, x10, #0x7
	mov	w11, #1
	lsl	w9, w11, w9
Lloh0:
	adrp	x11, _IRQ_TYPE_EDGE_RISING@GOTPAGE
Lloh1:
	ldr	x11, [x11, _IRQ_TYPE_EDGE_RISING@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
	tst	w11, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	x11, [x19]
	mov	x12, x8
	sbfiz	x12, x12, #2, #32
	ldr	w13, [x11, x12]
	bic	w13, w13, w9
	str	w13, [x11, x12]
LBB0_2:
Lloh3:
	adrp	x11, _IRQ_TYPE_EDGE_FALLING@GOTPAGE
Lloh4:
	ldr	x11, [x11, _IRQ_TYPE_EDGE_FALLING@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	tst	w11, w0
	b.eq	LBB0_8
; %bb.3:
Lloh6:
	adrp	x11, _AB8500_INT_GPIO6R@GOTPAGE
Lloh7:
	ldr	x11, [x11, _AB8500_INT_GPIO6R@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
Lloh9:
	adrp	x12, _AB8500_INT_GPIO41R@GOTPAGE
Lloh10:
	ldr	x12, [x12, _AB8500_INT_GPIO41R@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	cmp	w10, w11
	ccmp	w10, w12, #0, ge
	b.le	LBB0_6
; %bb.4:
Lloh12:
	adrp	x11, _AB9540_INT_GPIO50R@GOTPAGE
Lloh13:
	ldr	x11, [x11, _AB9540_INT_GPIO50R@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
Lloh15:
	adrp	x12, _AB9540_INT_GPIO54R@GOTPAGE
Lloh16:
	ldr	x12, [x12, _AB9540_INT_GPIO54R@GOTPAGEOFF]
Lloh17:
	ldr	w12, [x12]
	cmp	w10, w11
	ccmp	w10, w12, #0, ge
	b.le	LBB0_7
; %bb.5:
Lloh18:
	adrp	x11, _AB8540_INT_GPIO43R@GOTPAGE
Lloh19:
	ldr	x11, [x11, _AB8540_INT_GPIO43R@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	cmp	w10, w11
Lloh21:
	adrp	x11, _AB8540_INT_GPIO44R@GOTPAGE
Lloh22:
	ldr	x11, [x11, _AB8540_INT_GPIO44R@GOTPAGEOFF]
Lloh23:
	ldr	w11, [x11]
	ccmp	w10, w11, #4, ne
	cset	w10, eq
	lsl	w9, w9, w10
	b	LBB0_8
LBB0_6:
	add	w8, w8, #2
	b	LBB0_8
LBB0_7:
	add	w8, w8, #1
LBB0_8:
	ldr	x10, [x19]
	sbfiz	x8, x8, #2, #32
	ldr	w11, [x10, x8]
	bic	w9, w11, w9
	str	w9, [x10, x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ; @IRQ_TYPE_EDGE_RISING
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ; @IRQ_TYPE_EDGE_FALLING
	.comm	_AB8500_INT_GPIO6R,4,2          ; @AB8500_INT_GPIO6R
	.comm	_AB8500_INT_GPIO41R,4,2         ; @AB8500_INT_GPIO41R
	.comm	_AB9540_INT_GPIO50R,4,2         ; @AB9540_INT_GPIO50R
	.comm	_AB9540_INT_GPIO54R,4,2         ; @AB9540_INT_GPIO54R
	.comm	_AB8540_INT_GPIO43R,4,2         ; @AB8540_INT_GPIO43R
	.comm	_AB8540_INT_GPIO44R,4,2         ; @AB8540_INT_GPIO44R
	.no_dead_strip	_ab8500_irq_unmask
.subsections_via_symbols
