	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rc5t583_irq_set_type
_rc5t583_irq_set_type:                  ## @rc5t583_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_irq_data_get_irq_chip_data
	movl	(%r14), %ecx
	subl	(%rax), %ecx
	movq	_rc5t583_irqs@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_GPIO_INT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	testl	%esi, (%rdx,%rcx,8)
	je	LBB0_3
## %bb.1:
	movq	_IRQ_TYPE_EDGE_BOTH@GOTPCREL(%rip), %rsi
	testl	%ebx, (%rsi)
	je	LBB0_3
## %bb.2:
	movl	4(%rdx,%rcx,8), %ecx
	leal	3(%rcx), %esi
	testl	%ecx, %ecx
	cmovnsl	%ecx, %esi
	movl	%esi, %edx
	sarl	$2, %edx
	andl	$-4, %esi
	subl	%esi, %ecx
	movq	_IRQ_TYPE_EDGE_FALLING@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	movl	(%rsi), %esi
	andl	%ebx, %esi
	setne	%dil
	movq	_IRQ_TYPE_EDGE_RISING@GOTPCREL(%rip), %r8
	xorl	%esi, %esi
	andl	(%r8), %ebx
	setne	%sil
	movl	$3, %ebx
	shll	%cl, %ebx
	leal	(%rsi,%rdi,2), %esi
	notl	%ebx
	movq	8(%rax), %rax
	movslq	%edx, %rdx
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %esi
	andl	(%rax,%rdx,4), %ebx
	orl	%ebx, %esi
	movl	%esi, (%rax,%rdx,4)
	movq	%r14, %rdi
	callq	_rc5t583_irq_unmask
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rc5t583_irqs,8,3               ## @rc5t583_irqs
	.comm	_GPIO_INT,4,2                   ## @GPIO_INT
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ## @IRQ_TYPE_EDGE_BOTH
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ## @IRQ_TYPE_EDGE_FALLING
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ## @IRQ_TYPE_EDGE_RISING
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_rc5t583_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 rc5t583_irq_set_type
_rc5t583_irq_set_type:                  ; @rc5t583_irq_set_type
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_irq_data_get_irq_chip_data
	ldr	w8, [x19]
	ldr	w9, [x0]
	sub	w8, w8, w9
Lloh0:
	adrp	x9, _rc5t583_irqs@GOTPAGE
Lloh1:
	ldr	x9, [x9, _rc5t583_irqs@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	lsl	x10, x8, #3
	ldr	w10, [x9, x10]
Lloh3:
	adrp	x11, _GPIO_INT@GOTPAGE
Lloh4:
	ldr	x11, [x11, _GPIO_INT@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_3
; %bb.1:
Lloh6:
	adrp	x10, _IRQ_TYPE_EDGE_BOTH@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IRQ_TYPE_EDGE_BOTH@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w20
	b.eq	LBB0_3
; %bb.2:
	add	x8, x9, x8, lsl #3
	ldr	w8, [x8, #4]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w9, w9, w8, lt
	asr	w10, w9, #2
	and	w9, w9, #0xfffffffc
	sub	w8, w8, w9
Lloh9:
	adrp	x9, _IRQ_TYPE_EDGE_FALLING@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IRQ_TYPE_EDGE_FALLING@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w20
	cset	w9, ne
Lloh12:
	adrp	x11, _IRQ_TYPE_EDGE_RISING@GOTPAGE
Lloh13:
	ldr	x11, [x11, _IRQ_TYPE_EDGE_RISING@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	tst	w11, w20
	cset	w11, ne
	bfi	w11, w9, #1, #1
	mov	w9, #3
	ldr	x12, [x0, #8]
	sbfiz	x10, x10, #2, #32
	ldr	w13, [x12, x10]
	lsl	w9, w9, w8
	bic	w9, w13, w9
	lsl	w8, w11, w8
	orr	w8, w8, w9
	str	w8, [x12, x10]
	mov	x0, x19
	bl	_rc5t583_irq_unmask
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_rc5t583_irqs,8,3               ; @rc5t583_irqs
	.comm	_GPIO_INT,4,2                   ; @GPIO_INT
	.comm	_IRQ_TYPE_EDGE_BOTH,4,2         ; @IRQ_TYPE_EDGE_BOTH
	.comm	_IRQ_TYPE_EDGE_FALLING,4,2      ; @IRQ_TYPE_EDGE_FALLING
	.comm	_IRQ_TYPE_EDGE_RISING,4,2       ; @IRQ_TYPE_EDGE_RISING
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_rc5t583_irq_set_type
.subsections_via_symbols
