	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function armada_37xx_irq_set_wake
_armada_37xx_irq_set_wake:              ## @armada_37xx_irq_set_wake
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_irq_data_get_irq_chip_data
	movq	%rax, %rdi
	callq	_gpiochip_get_data
	movq	%rax, %r15
	movq	_IRQ_WKUP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	-40(%rbp), %rdi
	movq	%r12, %rsi
	callq	_armada_37xx_irq_update_reg
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	-40(%rbp), %rdi
	addq	8(%r15), %rdi
	callq	_readl
	movq	%rax, %rbx
	movl	(%r12), %eax
	movq	_GPIO_PER_REG@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%edx, %edi
	callq	_BIT
	movq	%rax, %rcx
	orq	%rbx, %rcx
	notq	%rax
	andq	%rax, %rbx
	testl	%r14d, %r14d
	cmovneq	%rcx, %rbx
	movq	-40(%rbp), %rsi
	addq	8(%r15), %rsi
	movq	%rbx, %rdi
	callq	_writel
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_WKUP,8,3                   ## @IRQ_WKUP
	.comm	_GPIO_PER_REG,4,2               ## @GPIO_PER_REG
	.no_dead_strip	_armada_37xx_irq_set_wake
.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_wake
_armada_37xx_irq_set_wake:              ; @armada_37xx_irq_set_wake
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	bl	_irq_data_get_irq_chip_data
	bl	_gpiochip_get_data
	mov	x21, x0
Lloh0:
	adrp	x8, _IRQ_WKUP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_WKUP@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	add	x0, sp, #8
	mov	x1, x20
	bl	_armada_37xx_irq_update_reg
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x21, #8]
	ldr	x9, [sp, #8]
	add	x0, x9, x8
	bl	_readl
	mov	x22, x0
	ldr	w8, [x20]
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
	orr	x8, x0, x22
	bic	x9, x22, x0
	cmp	w19, #0
	csel	x0, x9, x8, eq
	ldr	x8, [x21, #8]
	ldr	x9, [sp, #8]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_WKUP,8,3                   ; @IRQ_WKUP
	.comm	_GPIO_PER_REG,4,2               ; @GPIO_PER_REG
	.no_dead_strip	_armada_37xx_irq_set_wake
.subsections_via_symbols
