	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ingenic_gpio_irq_ack
_ingenic_gpio_irq_ack:                  ## @ingenic_gpio_irq_ack
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %rdi
	callq	_gpiochip_get_data
	movq	%rax, %r15
	movl	(%rbx), %r14d
	movq	%rbx, %rdi
	callq	_irqd_get_trigger_type
	movq	_IRQ_TYPE_EDGE_BOTH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_ingenic_gpio_get_value
	testl	%eax, %eax
	jne	LBB0_2
## %bb.3:
	movq	_IRQ_TYPE_EDGE_RISING@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_IRQ_TYPE_EDGE_FALLING@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_irq_set_type
LBB0_5:
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	_ID_JZ4760@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	setl	%cl
	jge	LBB0_6
## %bb.7:
	movq	_JZ4740_GPIO_DATA@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_JZ4760_GPIO_FLAG@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ingenic_gpio_set_bit           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_TYPE_EDGE_BOTH,8,3         ## @IRQ_TYPE_EDGE_BOTH
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ## @IRQ_TYPE_EDGE_FALLING
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ## @IRQ_TYPE_EDGE_RISING
	.comm	_ID_JZ4760,8,3                  ## @ID_JZ4760
	.comm	_JZ4760_GPIO_FLAG,4,2           ## @JZ4760_GPIO_FLAG
	.comm	_JZ4740_GPIO_DATA,4,2           ## @JZ4740_GPIO_DATA
	.no_dead_strip	_ingenic_gpio_irq_ack
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ingenic_gpio_irq_ack
_ingenic_gpio_irq_ack:                  ; @ingenic_gpio_irq_ack
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x0
	bl	_irq_data_get_irq_chip_data
	bl	_gpiochip_get_data
	mov	x19, x0
	ldr	w20, [x21]
	mov	x0, x21
	bl	_irqd_get_trigger_type
Lloh0:
	adrp	x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	bl	_ingenic_gpio_get_value
Lloh3:
	adrp	x8, _IRQ_TYPE_EDGE_RISING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_RISING@GOTPAGEOFF]
Lloh5:
	adrp	x9, _IRQ_TYPE_EDGE_FALLING@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IRQ_TYPE_EDGE_FALLING@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x8, x9, eq
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_irq_set_type
LBB0_2:
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _ID_JZ4760@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ID_JZ4760@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
Lloh10:
	adrp	x10, _JZ4740_GPIO_DATA@GOTPAGE
Lloh11:
	ldr	x10, [x10, _JZ4740_GPIO_DATA@GOTPAGEOFF]
Lloh12:
	adrp	x11, _JZ4760_GPIO_FLAG@GOTPAGE
Lloh13:
	ldr	x11, [x11, _JZ4760_GPIO_FLAG@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, lt
	cset	w3, lt
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ingenic_gpio_set_bit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_TYPE_EDGE_BOTH,8,3         ; @IRQ_TYPE_EDGE_BOTH
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ; @IRQ_TYPE_EDGE_FALLING
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ; @IRQ_TYPE_EDGE_RISING
	.comm	_ID_JZ4760,8,3                  ; @ID_JZ4760
	.comm	_JZ4760_GPIO_FLAG,4,2           ; @JZ4760_GPIO_FLAG
	.comm	_JZ4740_GPIO_DATA,4,2           ; @JZ4740_GPIO_DATA
	.no_dead_strip	_ingenic_gpio_irq_ack
.subsections_via_symbols
