	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ingenic_gpio_irq_set_type
_ingenic_gpio_irq_set_type:             ## @ingenic_gpio_irq_set_type
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %rdi
	callq	_gpiochip_get_data
	movq	%rax, %r15
	leal	-130(%rbx), %eax
	cmpl	$3, %eax
	jae	LBB0_2
## %bb.1:
	movq	_handle_edge_irq@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	leal	-128(%rbx), %eax
	cmpl	$1, %eax
	ja	LBB0_4
## %bb.3:
	movq	_handle_level_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_irq_set_handler_locked
	jmp	LBB0_7
LBB0_4:
	movq	_handle_bad_irq@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_irq_set_handler_locked
	cmpl	$132, %ebx
	jne	LBB0_7
## %bb.6:
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_ingenic_gpio_get_value
	cmpl	$1, %eax
	movl	$131, %ebx
	sbbl	$0, %ebx
LBB0_7:
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_irq_set_type
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_handle_edge_irq,4,2            ## @handle_edge_irq
	.comm	_handle_level_irq,4,2           ## @handle_level_irq
	.comm	_handle_bad_irq,4,2             ## @handle_bad_irq
	.no_dead_strip	_ingenic_gpio_irq_set_type
.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_set_type
_ingenic_gpio_irq_set_type:             ; @ingenic_gpio_irq_set_type
	.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	x20, x1
	mov	x19, x0
	bl	_irq_data_get_irq_chip_data
	bl	_gpiochip_get_data
	mov	x21, x0
	sub	w8, w20, #130
	cmp	w8, #3
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _handle_edge_irq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _handle_edge_irq@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	sub	w8, w20, #128
	cmp	w8, #1
	b.hi	LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _handle_level_irq@GOTPAGE
Lloh3:
	ldr	x8, [x8, _handle_level_irq@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_irq_set_handler_locked
	b	LBB0_7
LBB0_4:
Lloh5:
	adrp	x8, _handle_bad_irq@GOTPAGE
Lloh6:
	ldr	x8, [x8, _handle_bad_irq@GOTPAGEOFF]
LBB0_5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_irq_set_handler_locked
	cmp	w20, #132
	b.ne	LBB0_7
; %bb.6:
	ldr	w1, [x19]
	mov	x0, x21
	bl	_ingenic_gpio_get_value
	cmp	w0, #0
	mov	w8, #130
	cinc	w20, w8, ne
LBB0_7:
	ldr	w1, [x19]
	mov	x0, x21
	mov	x2, x20
	bl	_irq_set_type
	mov	w0, #0
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_handle_edge_irq,4,2            ; @handle_edge_irq
	.comm	_handle_level_irq,4,2           ; @handle_level_irq
	.comm	_handle_bad_irq,4,2             ; @handle_bad_irq
	.no_dead_strip	_ingenic_gpio_irq_set_type
.subsections_via_symbols
