	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftgpio_gpio_set_irq_type
_ftgpio_gpio_set_irq_type:              ## @ftgpio_gpio_set_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	%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, %r12d
	movq	%rdi, %r14
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %rdi
	callq	_gpiochip_get_data
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_irqd_to_hwirq
	movl	%eax, %edi
	callq	_BIT
	movl	%eax, %r13d
	movq	_GPIO_INT_TYPE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_GPIO_INT_LEVEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_GPIO_INT_BOTH_EDGE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	addl	$-128, %r12d
	cmpl	$4, %r12d
	ja	LBB0_6
## %bb.1:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%r12,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_5:
	movq	_handle_level_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_irq_set_handler_locked
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	orl	%r13d, %edi
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	orl	%r13d, %ebx
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_8
LBB0_6:
	movq	_handle_bad_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_irq_set_handler_locked
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_4:
	movq	_handle_level_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_irq_set_handler_locked
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	orl	%r13d, %edi
	notl	%r13d
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	andl	%r13d, %ebx
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_8
LBB0_2:
	movq	_handle_edge_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_irq_set_handler_locked
	notl	%r13d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	andl	%r13d, %edi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	andl	%r13d, %r12d
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	andl	%r13d, %ebx
	jmp	LBB0_8
LBB0_3:
	movq	_handle_edge_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_irq_set_handler_locked
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	orl	%r13d, %ebx
	notl	%r13d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	andl	%r13d, %edi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	andl	%r13d, %r12d
	jmp	LBB0_8
LBB0_7:
	movq	_handle_edge_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_irq_set_handler_locked
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	orl	%r13d, %r12d
	notl	%r13d
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	andl	%r13d, %edi
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
LBB0_8:
	movq	_GPIO_INT_TYPE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	callq	_writel
	movq	_GPIO_INT_LEVEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	_GPIO_INT_BOTH_EDGE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%r12d, %edi
	callq	_writel
	movq	%r14, %rdi
	callq	_ftgpio_gpio_ack_irq
	xorl	%eax, %eax
LBB0_9:
	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_5, LBB0_5-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_4
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_GPIO_INT_TYPE,8,3              ## @GPIO_INT_TYPE
	.comm	_GPIO_INT_LEVEL,8,3             ## @GPIO_INT_LEVEL
	.comm	_GPIO_INT_BOTH_EDGE,8,3         ## @GPIO_INT_BOTH_EDGE
	.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
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ftgpio_gpio_set_irq_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftgpio_gpio_set_irq_type
_ftgpio_gpio_set_irq_type:              ; @ftgpio_gpio_set_irq_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	x25, x1
	mov	x19, x0
	bl	_irq_data_get_irq_chip_data
	bl	_gpiochip_get_data
	mov	x20, x0
	mov	x0, x19
	bl	_irqd_to_hwirq
	bl	_BIT
	mov	x23, x0
	ldr	x8, [x20]
Lloh0:
	adrp	x26, _GPIO_INT_TYPE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _GPIO_INT_TYPE@GOTPAGEOFF]
	ldr	x9, [x26]
	add	x0, x9, x8
	bl	_readl
	mov	x24, x0
	ldr	x8, [x20]
Lloh2:
	adrp	x27, _GPIO_INT_LEVEL@GOTPAGE
Lloh3:
	ldr	x27, [x27, _GPIO_INT_LEVEL@GOTPAGEOFF]
	ldr	x9, [x27]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	x8, [x20]
Lloh4:
	adrp	x28, _GPIO_INT_BOTH_EDGE@GOTPAGE
Lloh5:
	ldr	x28, [x28, _GPIO_INT_BOTH_EDGE@GOTPAGEOFF]
	ldr	x9, [x28]
	add	x0, x9, x8
	bl	_readl
	sub	w8, w25, #128
	cmp	w8, #4
	b.hi	LBB0_3
; %bb.1:
	mov	x22, x0
Lloh6:
	adrp	x9, lJTI0_0@PAGE
Lloh7:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh8:
	adrp	x8, _handle_level_irq@GOTPAGE
Lloh9:
	ldr	x8, [x8, _handle_level_irq@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_irq_set_handler_locked
	orr	w0, w24, w23
	orr	w21, w21, w23
	b	LBB0_8
LBB0_3:
Lloh11:
	adrp	x8, _handle_bad_irq@GOTPAGE
Lloh12:
	ldr	x8, [x8, _handle_bad_irq@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_irq_set_handler_locked
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_4:
Lloh17:
	adrp	x8, _handle_level_irq@GOTPAGE
Lloh18:
	ldr	x8, [x8, _handle_level_irq@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_irq_set_handler_locked
	orr	w0, w24, w23
	bic	w21, w21, w23
	b	LBB0_8
LBB0_5:
Lloh20:
	adrp	x8, _handle_edge_irq@GOTPAGE
Lloh21:
	ldr	x8, [x8, _handle_edge_irq@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_irq_set_handler_locked
	bic	w0, w24, w23
	bic	w22, w22, w23
	bic	w21, w21, w23
	b	LBB0_8
LBB0_6:
Lloh23:
	adrp	x8, _handle_edge_irq@GOTPAGE
Lloh24:
	ldr	x8, [x8, _handle_edge_irq@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_irq_set_handler_locked
	bic	w0, w24, w23
	bic	w22, w22, w23
	orr	w21, w21, w23
	b	LBB0_8
LBB0_7:
Lloh26:
	adrp	x8, _handle_edge_irq@GOTPAGE
Lloh27:
	ldr	x8, [x8, _handle_edge_irq@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_irq_set_handler_locked
	bic	w0, w24, w23
	orr	w22, w22, w23
LBB0_8:
	ldr	x8, [x20]
	ldr	x9, [x26]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x20]
	ldr	x9, [x27]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	ldr	x8, [x20]
	ldr	x9, [x28]
	add	x1, x9, x8
	mov	x0, x22
	bl	_writel
	mov	x0, x19
	bl	_ftgpio_gpio_ack_irq
	mov	w0, #0
LBB0_9:
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
                                        ; -- End function
	.comm	_GPIO_INT_TYPE,8,3              ; @GPIO_INT_TYPE
	.comm	_GPIO_INT_LEVEL,8,3             ; @GPIO_INT_LEVEL
	.comm	_GPIO_INT_BOTH_EDGE,8,3         ; @GPIO_INT_BOTH_EDGE
	.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
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ftgpio_gpio_set_irq_type
.subsections_via_symbols
