	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mediatek_gpio_irq_type
_mediatek_gpio_irq_type:                ## @mediatek_gpio_irq_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, %r15d
	movq	%rdi, %rbx
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %rdi
	callq	_to_mediatek_gpio
	movq	%rax, %r14
	movl	(%rbx), %edi
	callq	_BIT
	movq	_IRQ_TYPE_PROBE@GOTPCREL(%rip), %rcx
	movq	(%r14), %xmm0                   ## xmm0 = mem[0],zero
	cmpl	%r15d, (%rcx)
	jne	LBB0_1
## %bb.2:
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	por	%xmm0, %xmm1
	movd	%xmm1, %esi
	movl	8(%r14), %ecx
	movl	12(%r14), %edx
	movl	%ecx, %edi
	orl	%edx, %edi
	orl	%esi, %edi
	testl	%eax, %edi
	jne	LBB0_11
## %bb.3:
	movl	$131, %r15d
	jmp	LBB0_4
LBB0_1:
	movl	8(%r14), %ecx
	movl	12(%r14), %edx
LBB0_4:
	movl	%eax, %esi
	movdqa	%xmm0, %xmm1
	pinsrd	$2, %ecx, %xmm1
	notl	%esi
	pinsrd	$3, %edx, %xmm1
	movd	%esi, %xmm2
	pshufd	$0, %xmm2, %xmm2                ## xmm2 = xmm2[0,0,0,0]
	pand	%xmm1, %xmm2
	movdqu	%xmm2, (%r14)
	movq	_IRQ_TYPE_SENSE_MASK@GOTPCREL(%rip), %rsi
	andl	(%rsi), %r15d
	addl	$-128, %r15d
	cmpl	$4, %r15d
	ja	LBB0_11
## %bb.5:
	leaq	4(%r14), %r8
	movd	%xmm0, %esi
	leaq	LJTI0_0(%rip), %rbx
	movslq	(%rbx,%r15,4), %rdi
	addq	%rbx, %rdi
	jmpq	*%rdi
LBB0_9:
	addq	$12, %r14
	movl	%edx, %esi
	jmp	LBB0_10
LBB0_8:
	addq	$8, %r14
	movl	%ecx, %esi
	jmp	LBB0_10
LBB0_6:
	orl	%eax, %esi
	movl	%esi, (%r14)
LBB0_7:
	pextrd	$1, %xmm0, %esi
	movq	%r8, %r14
LBB0_10:
	orl	%eax, %esi
	movl	%esi, (%r14)
LBB0_11:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_10
	.long	L0_0_set_7
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.comm	_IRQ_TYPE_PROBE,4,2             ## @IRQ_TYPE_PROBE
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ## @IRQ_TYPE_SENSE_MASK
	.no_dead_strip	_mediatek_gpio_irq_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mediatek_gpio_irq_type
_mediatek_gpio_irq_type:                ; @mediatek_gpio_irq_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	x21, x0
	bl	_irq_data_get_irq_chip_data
	bl	_to_mediatek_gpio
	mov	x19, x0
	ldr	w0, [x21]
	bl	_BIT
Lloh0:
	adrp	x8, _IRQ_TYPE_PROBE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_TYPE_PROBE@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x8]
	ldr	w8, [x19]
	mov	x9, x19
	ldr	w10, [x9, #4]!
	cmp	w11, w20
	b.ne	LBB0_3
; %bb.1:
	orr	w13, w10, w8
	ldp	w11, w12, [x19, #8]
	orr	w13, w13, w11
	orr	w13, w13, w12
	tst	w13, w0
	b.ne	LBB0_11
; %bb.2:
	mov	w20, #131
	b	LBB0_4
LBB0_3:
	ldp	w11, w12, [x19, #8]
LBB0_4:
	bic	w13, w8, w0
	bic	w14, w10, w0
	stp	w13, w14, [x19]
	bic	w14, w11, w0
	mov	x13, x19
	str	w14, [x13, #8]!
	bic	w15, w12, w0
	mov	x14, x19
	str	w15, [x14, #12]!
Lloh3:
	adrp	x15, _IRQ_TYPE_SENSE_MASK@GOTPAGE
Lloh4:
	ldr	x15, [x15, _IRQ_TYPE_SENSE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w15, [x15]
	and	w15, w15, w20
	sub	w15, w15, #128
	cmp	w15, #4
	b.hi	LBB0_11
; %bb.5:
Lloh6:
	adrp	x16, lJTI0_0@PAGE
Lloh7:
	add	x16, x16, lJTI0_0@PAGEOFF
	adr	x17, LBB0_6
	ldrb	w1, [x16, x15]
	add	x17, x17, x1, lsl #2
	br	x17
LBB0_6:
	mov	x8, x12
	mov	x19, x14
	b	LBB0_10
LBB0_7:
	mov	x8, x11
	mov	x19, x13
	b	LBB0_10
LBB0_8:
	orr	w8, w8, w0
	str	w8, [x19]
LBB0_9:
	mov	x8, x10
	mov	x19, x9
LBB0_10:
	orr	w8, w8, w0
	str	w8, [x19]
LBB0_11:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_9-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
                                        ; -- End function
	.comm	_IRQ_TYPE_PROBE,4,2             ; @IRQ_TYPE_PROBE
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ; @IRQ_TYPE_SENSE_MASK
	.no_dead_strip	_mediatek_gpio_irq_type
.subsections_via_symbols
