	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_pinctrl_irq_set_type
_sunxi_pinctrl_irq_set_type:            ## @sunxi_pinctrl_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, %r12d
	movq	%rdi, %rbx
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %r13
	movl	8(%rax), %edi
	movl	(%rbx), %esi
	callq	_sunxi_irq_cfg_reg
	movl	%eax, %r14d
	movl	(%rbx), %edi
	callq	_sunxi_irq_cfg_offset
	leal	-128(%r12), %ecx
	cmpl	$5, %ecx
	jae	LBB0_1
## %bb.2:
	movslq	%ecx, %rdx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	l_switch.table.sunxi_pinctrl_irq_set_type(%rip), %rcx
	movq	(%rcx,%rdx,8), %rax
	movl	(%rax), %r15d
	movq	%r13, %rdi
	addq	$4, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_raw_spin_lock_irqsave
	movq	_IRQ_TYPE_LEVEL_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movq	_sunxi_pinctrl_level_irq_chip@GOTPCREL(%rip), %rsi
	cmoveq	_sunxi_pinctrl_edge_irq_chip@GOTPCREL(%rip), %rsi
	movq	_handle_fasteoi_irq@GOTPCREL(%rip), %rax
	cmoveq	_handle_edge_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_irq_set_chip_handler_name_locked
	movl	(%r13), %edi
	addl	%r14d, %edi
	callq	_readl
	movq	_IRQ_CFG_IRQ_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	shll	%cl, %edx
	notl	%edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r15d
	andl	%eax, %edx
	orl	%edx, %r15d
	addl	(%r13), %r14d
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_writel
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_raw_spin_unlock_irqrestore
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_3:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_EDGE_RISING,4,2            ## @IRQ_EDGE_RISING
	.comm	_IRQ_EDGE_FALLING,4,2           ## @IRQ_EDGE_FALLING
	.comm	_IRQ_EDGE_BOTH,4,2              ## @IRQ_EDGE_BOTH
	.comm	_IRQ_LEVEL_HIGH,4,2             ## @IRQ_LEVEL_HIGH
	.comm	_IRQ_LEVEL_LOW,4,2              ## @IRQ_LEVEL_LOW
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IRQ_TYPE_LEVEL_MASK,4,2        ## @IRQ_TYPE_LEVEL_MASK
	.comm	_sunxi_pinctrl_level_irq_chip,4,2 ## @sunxi_pinctrl_level_irq_chip
	.comm	_handle_fasteoi_irq,4,2         ## @handle_fasteoi_irq
	.comm	_sunxi_pinctrl_edge_irq_chip,4,2 ## @sunxi_pinctrl_edge_irq_chip
	.comm	_handle_edge_irq,4,2            ## @handle_edge_irq
	.comm	_IRQ_CFG_IRQ_MASK,4,2           ## @IRQ_CFG_IRQ_MASK
	.no_dead_strip	_sunxi_pinctrl_irq_set_type
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.sunxi_pinctrl_irq_set_type
l_switch.table.sunxi_pinctrl_irq_set_type:
	.quad	_IRQ_LEVEL_LOW
	.quad	_IRQ_LEVEL_HIGH
	.quad	_IRQ_EDGE_RISING
	.quad	_IRQ_EDGE_FALLING
	.quad	_IRQ_EDGE_BOTH

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_pinctrl_irq_set_type
_sunxi_pinctrl_irq_set_type:            ; @sunxi_pinctrl_irq_set_type
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x23, x1
	mov	x21, x0
	bl	_irq_data_get_irq_chip_data
	mov	x19, x0
	ldr	w0, [x0, #8]
	ldr	w1, [x21]
	bl	_sunxi_irq_cfg_reg
	mov	x20, x0
	ldr	w0, [x21]
	bl	_sunxi_irq_cfg_offset
	sub	w8, w23, #128
	cmp	w8, #5
	b.hs	LBB0_2
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x9, l_switch.table.sunxi_pinctrl_irq_set_type@PAGE
Lloh1:
	add	x9, x9, l_switch.table.sunxi_pinctrl_irq_set_type@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w25, [x8]
	add	x24, x19, #4
	mov	x0, x24
	bl	_raw_spin_lock_irqsave
Lloh2:
	adrp	x8, _IRQ_TYPE_LEVEL_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IRQ_TYPE_LEVEL_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _sunxi_pinctrl_level_irq_chip@GOTPAGE
Lloh6:
	ldr	x9, [x9, _sunxi_pinctrl_level_irq_chip@GOTPAGEOFF]
Lloh7:
	adrp	x10, _sunxi_pinctrl_edge_irq_chip@GOTPAGE
Lloh8:
	ldr	x10, [x10, _sunxi_pinctrl_edge_irq_chip@GOTPAGEOFF]
	tst	w8, w23
	csel	x1, x10, x9, eq
Lloh9:
	adrp	x8, _handle_edge_irq@GOTPAGE
Lloh10:
	ldr	x8, [x8, _handle_edge_irq@GOTPAGEOFF]
Lloh11:
	adrp	x9, _handle_fasteoi_irq@GOTPAGE
Lloh12:
	ldr	x9, [x9, _handle_fasteoi_irq@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w2, [x8]
	mov	x0, x21
	mov	x3, #0
	bl	_irq_set_chip_handler_name_locked
	ldr	w8, [x19]
	add	w0, w8, w20
	bl	_readl
Lloh13:
	adrp	x8, _IRQ_CFG_IRQ_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IRQ_CFG_IRQ_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	lsl	w8, w8, w22
	bic	w8, w0, w8
	lsl	w9, w25, w22
	orr	w0, w8, w9
	ldr	w8, [x19]
	add	w1, w8, w20
	bl	_writel
	mov	x0, x24
	bl	_raw_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_EDGE_RISING,4,2            ; @IRQ_EDGE_RISING
	.comm	_IRQ_EDGE_FALLING,4,2           ; @IRQ_EDGE_FALLING
	.comm	_IRQ_EDGE_BOTH,4,2              ; @IRQ_EDGE_BOTH
	.comm	_IRQ_LEVEL_HIGH,4,2             ; @IRQ_LEVEL_HIGH
	.comm	_IRQ_LEVEL_LOW,4,2              ; @IRQ_LEVEL_LOW
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IRQ_TYPE_LEVEL_MASK,4,2        ; @IRQ_TYPE_LEVEL_MASK
	.comm	_sunxi_pinctrl_level_irq_chip,4,2 ; @sunxi_pinctrl_level_irq_chip
	.comm	_handle_fasteoi_irq,4,2         ; @handle_fasteoi_irq
	.comm	_sunxi_pinctrl_edge_irq_chip,4,2 ; @sunxi_pinctrl_edge_irq_chip
	.comm	_handle_edge_irq,4,2            ; @handle_edge_irq
	.comm	_IRQ_CFG_IRQ_MASK,4,2           ; @IRQ_CFG_IRQ_MASK
	.no_dead_strip	_sunxi_pinctrl_irq_set_type
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.sunxi_pinctrl_irq_set_type
l_switch.table.sunxi_pinctrl_irq_set_type:
	.quad	_IRQ_LEVEL_LOW
	.quad	_IRQ_LEVEL_HIGH
	.quad	_IRQ_EDGE_RISING
	.quad	_IRQ_EDGE_FALLING
	.quad	_IRQ_EDGE_BOTH

.subsections_via_symbols
