	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stmpe_gpio_irq_set_type
_stmpe_gpio_irq_set_type:               ## @stmpe_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, %r15d
	movq	%rdi, %rbx
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %rdi
	callq	_gpiochip_get_data
	movq	%rax, %r14
	movl	(%rbx), %edi
	leal	7(%rdi), %ebx
	testl	%edi, %edi
	cmovnsl	%edi, %ebx
	movl	%ebx, %eax
	andl	$-8, %eax
	subl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_BIT
	movl	%eax, %ecx
	movq	_IRQ_TYPE_LEVEL_LOW@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_IRQ_TYPE_LEVEL_HIGH@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	8(%r14), %rax
	movq	(%rax), %rdx
	movq	_STMPE801@GOTPCREL(%rip), %rsi
	xorl	%eax, %eax
	cmpq	(%rsi), %rdx
	je	LBB0_11
## %bb.4:
	movq	_STMPE1600@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	je	LBB0_11
## %bb.5:
	sarl	$3, %ebx
	movq	_IRQ_TYPE_EDGE_RISING@GOTPCREL(%rip), %rsi
	movslq	%ebx, %rdx
	testl	%r15d, (%rsi)
	je	LBB0_7
## %bb.6:
	movq	(%r14), %rsi
	movq	_REG_RE@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movq	(%rsi,%rdi,8), %rdi
	orl	%ecx, (%rdi,%rdx,4)
	jmp	LBB0_8
LBB0_7:
	movl	%ecx, %edi
	notl	%edi
	movq	(%r14), %rsi
	movq	_REG_RE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	movq	(%rsi,%rbx,8), %rbx
	andl	%edi, (%rbx,%rdx,4)
LBB0_8:
	movq	_IRQ_TYPE_EDGE_FALLING@GOTPCREL(%rip), %rdi
	testl	%r15d, (%rdi)
	je	LBB0_10
## %bb.9:
	movq	_REG_FE@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movq	(%rsi,%rdi,8), %rsi
	orl	%ecx, (%rsi,%rdx,4)
	jmp	LBB0_11
LBB0_10:
	notl	%ecx
	movq	_REG_FE@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movq	(%rsi,%rdi,8), %rsi
	andl	%ecx, (%rsi,%rdx,4)
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_TYPE_LEVEL_LOW,4,2         ## @IRQ_TYPE_LEVEL_LOW
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ## @IRQ_TYPE_LEVEL_HIGH
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_STMPE801,8,3                   ## @STMPE801
	.comm	_STMPE1600,8,3                  ## @STMPE1600
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ## @IRQ_TYPE_EDGE_RISING
	.comm	_REG_RE,8,3                     ## @REG_RE
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ## @IRQ_TYPE_EDGE_FALLING
	.comm	_REG_FE,8,3                     ## @REG_FE
	.no_dead_strip	_stmpe_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 stmpe_gpio_irq_set_type
_stmpe_gpio_irq_set_type:               ; @stmpe_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	x19, x1
	mov	x21, x0
	bl	_irq_data_get_irq_chip_data
	bl	_gpiochip_get_data
	mov	x20, x0
	ldr	w8, [x21]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w21, w9, w8, lt
	and	w9, w21, #0xfffffff8
	sub	w0, w8, w9
	bl	_BIT
Lloh0:
	adrp	x8, _IRQ_TYPE_LEVEL_LOW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_TYPE_LEVEL_LOW@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _IRQ_TYPE_LEVEL_HIGH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IRQ_TYPE_LEVEL_HIGH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w8, w8
LBB0_3:
	mov	x0, x8
	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
LBB0_4:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _STMPE801@GOTPAGE
Lloh10:
	ldr	x9, [x9, _STMPE801@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _STMPE1600@GOTPAGE
Lloh13:
	ldr	x10, [x10, _STMPE1600@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.5:
	mov	w8, #0
	b	LBB0_3
LBB0_6:
	asr	w9, w21, #3
Lloh15:
	adrp	x8, _IRQ_TYPE_EDGE_RISING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_RISING@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_8
; %bb.7:
	ldr	x10, [x20]
Lloh18:
	adrp	x8, _REG_RE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _REG_RE@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	ldr	x8, [x10, x8, lsl #3]
	sbfiz	x11, x9, #2, #32
	ldr	w12, [x8, x11]
	orr	w12, w12, w0
	b	LBB0_9
LBB0_8:
	ldr	x10, [x20]
Lloh21:
	adrp	x8, _REG_RE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _REG_RE@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	ldr	x8, [x10, x8, lsl #3]
	mov	x11, x9
	sbfiz	x11, x11, #2, #32
	ldr	w12, [x8, x11]
	bic	w12, w12, w0
LBB0_9:
	str	w12, [x8, x11]
Lloh24:
	adrp	x8, _IRQ_TYPE_EDGE_FALLING@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IRQ_TYPE_EDGE_FALLING@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_11
; %bb.10:
	mov	w8, #0
Lloh27:
	adrp	x11, _REG_FE@GOTPAGE
Lloh28:
	ldr	x11, [x11, _REG_FE@GOTPAGEOFF]
Lloh29:
	ldr	x11, [x11]
	ldr	x10, [x10, x11, lsl #3]
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	sbfiz	x9, x9, #2, #32
	ldr	w11, [x10, x9]
	orr	w11, w11, w0
	b	LBB0_12
LBB0_11:
	mov	w8, #0
Lloh30:
	adrp	x11, _REG_FE@GOTPAGE
Lloh31:
	ldr	x11, [x11, _REG_FE@GOTPAGEOFF]
Lloh32:
	ldr	x11, [x11]
	ldr	x10, [x10, x11, lsl #3]
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	sbfiz	x9, x9, #2, #32
	ldr	w11, [x10, x9]
	bic	w11, w11, w0
LBB0_12:
	str	w11, [x10, x9]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_TYPE_LEVEL_LOW,4,2         ; @IRQ_TYPE_LEVEL_LOW
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ; @IRQ_TYPE_LEVEL_HIGH
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_STMPE801,8,3                   ; @STMPE801
	.comm	_STMPE1600,8,3                  ; @STMPE1600
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ; @IRQ_TYPE_EDGE_RISING
	.comm	_REG_RE,8,3                     ; @REG_RE
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ; @IRQ_TYPE_EDGE_FALLING
	.comm	_REG_FE,8,3                     ; @REG_FE
	.no_dead_strip	_stmpe_gpio_irq_set_type
.subsections_via_symbols
