	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nsp_gpio_irq_set_type
_nsp_gpio_irq_set_type:                 ## @nsp_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %rbx
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %r15
	movl	(%rbx), %r14d
	leaq	4(%rax), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_raw_spin_lock_irqsave
	movq	_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_NSP_GPIO_EVENT_INT_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	callq	_nsp_get_bit
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %esi
	movq	_NSP_GPIO_INT_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	callq	_nsp_get_bit
	movl	%eax, %r12d
	movq	_IRQ_TYPE_SENSE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r13d, %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_4
## %bb.1:
	xorl	%r13d, %r13d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	movl	$1, %r12d
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_6
LBB0_4:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_dev_err
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_raw_spin_unlock_irqrestore
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_2:
	xorl	%r12d, %r12d
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_6
LBB0_5:
	movl	$1, %r13d
LBB0_6:
	movq	_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_NSP_GPIO_EVENT_INT_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	movl	%r13d, %r8d
	callq	_nsp_set_bit
	movl	(%rbx), %esi
	movq	_NSP_GPIO_INT_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	%r14d, %ecx
	movl	%r12d, %r8d
	callq	_nsp_set_bit
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_raw_spin_unlock_irqrestore
	testl	%r12d, %r12d
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %r8
	movq	%r8, %rcx
	cmoveq	%rax, %rcx
	movl	(%r15), %edi
	testl	%r13d, %r13d
	cmoveq	%rax, %r8
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_dbg
	xorl	%eax, %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_6
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_REG,4,2                        ## @REG
	.comm	_NSP_GPIO_EVENT_INT_POLARITY,4,2 ## @NSP_GPIO_EVENT_INT_POLARITY
	.comm	_NSP_GPIO_INT_POLARITY,4,2      ## @NSP_GPIO_INT_POLARITY
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ## @IRQ_TYPE_SENSE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid GPIO IRQ type 0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"gpio:%u level_low:%s falling:%s\n"

L_.str.2:                               ## @.str.2
	.asciz	"true"

L_.str.3:                               ## @.str.3
	.asciz	"false"

	.no_dead_strip	_nsp_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 nsp_gpio_irq_set_type
_nsp_gpio_irq_set_type:                 ; @nsp_gpio_irq_set_type
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x1
	mov	x19, x0
	bl	_irq_data_get_irq_chip_data
	mov	x21, x0
	ldr	w19, [x19]
	add	x20, x0, #4
	mov	x0, x20
	bl	_raw_spin_lock_irqsave
Lloh0:
	adrp	x25, _REG@GOTPAGE
Lloh1:
	ldr	x25, [x25, _REG@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh2:
	adrp	x26, _NSP_GPIO_EVENT_INT_POLARITY@GOTPAGE
Lloh3:
	ldr	x26, [x26, _NSP_GPIO_EVENT_INT_POLARITY@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x21
	mov	x3, x19
	bl	_nsp_get_bit
	mov	x24, x0
	ldr	w1, [x25]
Lloh4:
	adrp	x27, _NSP_GPIO_INT_POLARITY@GOTPAGE
Lloh5:
	ldr	x27, [x27, _NSP_GPIO_INT_POLARITY@GOTPAGEOFF]
	ldr	w2, [x27]
	mov	x0, x21
	mov	x3, x19
	bl	_nsp_get_bit
Lloh6:
	adrp	x8, _IRQ_TYPE_SENSE_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQ_TYPE_SENSE_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w23
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_3
; %bb.1:
	mov	x22, x0
	mov	w23, #0
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	w22, #1
	mov	x23, x24
	b	LBB0_6
LBB0_3:
	ldr	w0, [x21]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_dev_err
	mov	x0, x20
	bl	_raw_spin_unlock_irqrestore
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_4:
	mov	w22, #0
	mov	x23, x24
	b	LBB0_6
LBB0_5:
	mov	w23, #1
LBB0_6:
	ldr	w1, [x25]
	ldr	w2, [x26]
	mov	x0, x21
	mov	x3, x19
	mov	x4, x23
	bl	_nsp_set_bit
	ldr	w1, [x25]
	ldr	w2, [x27]
	mov	x0, x21
	mov	x3, x19
	mov	x4, x22
	bl	_nsp_set_bit
	mov	x0, x20
	bl	_raw_spin_unlock_irqrestore
	ldr	w0, [x21]
Lloh16:
	adrp	x8, l_.str.2@PAGE
Lloh17:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh18:
	adrp	x9, l_.str.3@PAGE
Lloh19:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w22, #0
	csel	x3, x9, x8, eq
	cmp	w23, #0
	csel	x4, x9, x8, eq
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_dev_dbg
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
                                        ; -- End function
	.comm	_REG,4,2                        ; @REG
	.comm	_NSP_GPIO_EVENT_INT_POLARITY,4,2 ; @NSP_GPIO_EVENT_INT_POLARITY
	.comm	_NSP_GPIO_INT_POLARITY,4,2      ; @NSP_GPIO_INT_POLARITY
	.comm	_IRQ_TYPE_SENSE_MASK,4,2        ; @IRQ_TYPE_SENSE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid GPIO IRQ type 0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"gpio:%u level_low:%s falling:%s\n"

l_.str.2:                               ; @.str.2
	.asciz	"true"

l_.str.3:                               ; @.str.3
	.asciz	"false"

	.no_dead_strip	_nsp_gpio_irq_set_type
.subsections_via_symbols
