	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function armada_37xx_irq_set_type
_armada_37xx_irq_set_type:              ## @armada_37xx_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, %ebx
	movq	%rdi, %r13
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %rdi
	callq	_gpiochip_get_data
	movq	%rax, %r15
	movq	_IRQ_POL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	leaq	-44(%rbp), %rdi
	movq	%r13, %rsi
	callq	_armada_37xx_irq_update_reg
	movl	-44(%rbp), %edi
	addl	(%r15), %edi
	callq	_readl
	movl	%eax, %r12d
	cmpl	$130, %ebx
	je	LBB0_4
## %bb.1:
	cmpl	$129, %ebx
	je	LBB0_6
## %bb.2:
	cmpl	$128, %ebx
	jne	LBB0_5
## %bb.3:
	movl	(%r13), %eax
	movq	_GPIO_PER_REG@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%edx, %edi
	callq	_BIT
	notl	%eax
	andl	%eax, %r12d
	jmp	LBB0_7
LBB0_4:
	movq	_INPUT_VAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	leaq	-48(%rbp), %rdi
	movq	%r13, %rsi
	callq	_armada_37xx_irq_update_reg
	movl	8(%r15), %edi
	movl	-48(%rbp), %esi
	leaq	-52(%rbp), %rdx
	callq	_regmap_read
	movl	4(%r13), %eax
	movl	-52(%rbp), %ecx
	andl	%eax, %ecx
	movl	%eax, %edx
	orl	%r12d, %edx
	notl	%eax
	andl	%r12d, %eax
	testl	%ecx, %ecx
	cmovnel	%edx, %eax
	movl	%eax, %r12d
	jmp	LBB0_7
LBB0_6:
	movl	(%r13), %eax
	movq	_GPIO_PER_REG@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%edx, %edi
	callq	_BIT
	orl	%eax, %r12d
LBB0_7:
	movl	-44(%rbp), %esi
	addl	(%r15), %esi
	movl	%r12d, %edi
	callq	_writel
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_5:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_POL,4,2                    ## @IRQ_POL
	.comm	_GPIO_PER_REG,4,2               ## @GPIO_PER_REG
	.comm	_INPUT_VAL,4,2                  ## @INPUT_VAL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_armada_37xx_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 armada_37xx_irq_set_type
_armada_37xx_irq_set_type:              ; @armada_37xx_irq_set_type
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x23, x1
	mov	x21, x0
	bl	_irq_data_get_irq_chip_data
	bl	_gpiochip_get_data
	mov	x20, x0
Lloh0:
	adrp	x8, _IRQ_POL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_POL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #12]
	add	x19, x0, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	add	x0, sp, #12
	mov	x1, x21
	bl	_armada_37xx_irq_update_reg
	ldr	w8, [x20]
	ldr	w9, [sp, #12]
	add	w0, w9, w8
	bl	_readl
	mov	x22, x0
	cmp	w23, #130
	b.eq	LBB0_4
; %bb.1:
	cmp	w23, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w23, #128
	b.ne	LBB0_7
; %bb.3:
	ldr	w8, [x21]
Lloh3:
	adrp	x9, _GPIO_PER_REG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GPIO_PER_REG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w0, w10, w9, w8
	bl	_BIT
	bic	w0, w22, w0
	b	LBB0_6
LBB0_4:
Lloh6:
	adrp	x8, _INPUT_VAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INPUT_VAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #4]
	add	x0, sp, #4
	mov	x1, x21
	bl	_armada_37xx_irq_update_reg
	ldr	w0, [x20, #8]
	ldr	w1, [sp, #4]
	add	x2, sp, #8
	bl	_regmap_read
	ldr	w8, [sp, #8]
	ldr	w9, [x21, #4]
	orr	w10, w9, w22
	bic	w11, w22, w9
	tst	w9, w8
	csel	w0, w11, w10, eq
	b	LBB0_6
LBB0_5:
	ldr	w8, [x21]
Lloh9:
	adrp	x9, _GPIO_PER_REG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _GPIO_PER_REG@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w0, w10, w9, w8
	bl	_BIT
	orr	w0, w0, w22
LBB0_6:
	ldr	w8, [x20]
	ldr	w9, [sp, #12]
	add	w1, w9, w8
	bl	_writel
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_POL,4,2                    ; @IRQ_POL
	.comm	_GPIO_PER_REG,4,2               ; @GPIO_PER_REG
	.comm	_INPUT_VAL,4,2                  ; @INPUT_VAL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_armada_37xx_irq_set_type
.subsections_via_symbols
