	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_gpio_irq_type_setup
_meson_gpio_irq_type_setup:             ## @meson_gpio_irq_type_setup
	.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	%esi, %ebx
	movq	%rdi, %r12
	movq	%rdx, %rsi
	callq	_meson_gpio_irq_get_channel_idx
	movq	_IRQ_TYPE_SENSE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	movl	%eax, %r14d
	movq	_IRQ_TYPE_EDGE_BOTH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_4
## %bb.1:
	movq	8(%r12), %rax
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.3:
	movl	%r14d, %edi
	callq	_REG_BOTH_EDGE
	movl	%eax, %r15d
	jmp	LBB0_9
LBB0_4:
	movq	_IRQ_TYPE_EDGE_RISING@GOTPCREL(%rip), %rcx
	movq	_IRQ_TYPE_EDGE_FALLING@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	testl	%ebx, %ecx
	je	LBB0_5
## %bb.6:
	movl	%r14d, %edi
	callq	_REG_EDGE_POL_EDGE
	movl	%eax, %r15d
	movl	(%r13), %eax
	jmp	LBB0_7
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_5:
	xorl	%r15d, %r15d
LBB0_7:
	movq	_IRQ_TYPE_LEVEL_LOW@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	testl	%ebx, %eax
	je	LBB0_9
## %bb.8:
	movl	%r14d, %edi
	callq	_REG_EDGE_POL_LOW
	orl	%eax, %r15d
LBB0_9:
	movq	%r12, %rdi
	callq	_spin_lock
	movq	_REG_EDGE_POL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r14d, %edi
	callq	_REG_EDGE_POL_MASK
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	movl	%r15d, %ecx
	callq	_meson_gpio_irq_update_bits
	movq	%r12, %rdi
	callq	_spin_unlock
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ## @IRQ_TYPE_SENSE_MASK
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ## @IRQ_TYPE_EDGE_BOTH
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ## @IRQ_TYPE_EDGE_RISING
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ## @IRQ_TYPE_EDGE_FALLING
	.comm	_IRQ_TYPE_LEVEL_LOW,4,2         ## @IRQ_TYPE_LEVEL_LOW
	.comm	_REG_EDGE_POL,4,2               ## @REG_EDGE_POL
	.no_dead_strip	_meson_gpio_irq_type_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meson_gpio_irq_type_setup
_meson_gpio_irq_type_setup:             ; @meson_gpio_irq_type_setup
	.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	x21, x1
	mov	x19, x0
	mov	x1, x2
	bl	_meson_gpio_irq_get_channel_idx
	mov	x20, x0
Lloh0:
	adrp	x8, _IRQ_TYPE_SENSE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_TYPE_SENSE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w22, w8, w21
Lloh3:
	adrp	x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_BOTH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x0, x20
	bl	_REG_BOTH_EDGE
	mov	x21, x0
	b	LBB0_9
LBB0_3:
Lloh6:
	adrp	x8, _IRQ_TYPE_EDGE_RISING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_RISING@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x8]
Lloh9:
	adrp	x23, _IRQ_TYPE_EDGE_FALLING@GOTPAGE
Lloh10:
	ldr	x23, [x23, _IRQ_TYPE_EDGE_FALLING@GOTPAGEOFF]
	ldr	w8, [x23]
	orr	w9, w8, w9
	tst	w9, w22
	b.eq	LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_REG_EDGE_POL_EDGE
	mov	x21, x0
	ldr	w8, [x23]
	b	LBB0_7
LBB0_5:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_6:
	mov	w21, #0
LBB0_7:
Lloh14:
	adrp	x9, _IRQ_TYPE_LEVEL_LOW@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IRQ_TYPE_LEVEL_LOW@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w22
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_REG_EDGE_POL_LOW
	orr	w21, w0, w21
LBB0_9:
	mov	x0, x19
	bl	_spin_lock
Lloh17:
	adrp	x8, _REG_EDGE_POL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _REG_EDGE_POL@GOTPAGEOFF]
Lloh19:
	ldr	w22, [x8]
	mov	x0, x20
	bl	_REG_EDGE_POL_MASK
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	mov	x3, x21
	bl	_meson_gpio_irq_update_bits
	mov	x0, x19
	bl	_spin_unlock
	mov	w0, #0
LBB0_10:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ; @IRQ_TYPE_SENSE_MASK
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ; @IRQ_TYPE_EDGE_BOTH
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ; @IRQ_TYPE_EDGE_RISING
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ; @IRQ_TYPE_EDGE_FALLING
	.comm	_IRQ_TYPE_LEVEL_LOW,4,2         ; @IRQ_TYPE_LEVEL_LOW
	.comm	_REG_EDGE_POL,4,2               ; @REG_EDGE_POL
	.no_dead_strip	_meson_gpio_irq_type_setup
.subsections_via_symbols
