	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nmk_gpio_irq_maskunmask
_nmk_gpio_irq_maskunmask:               ## @nmk_gpio_irq_maskunmask
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_irq_data_get_irq_chip_data
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	4(%rax), %edi
	callq	_clk_enable
	movq	_nmk_gpio_slpm_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_spin_lock
	movl	(%r15), %esi
	movq	_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %ecx
	callq	___nmk_gpio_irq_modify
	movl	(%rbx), %r13d
	movl	(%r15), %edi
	callq	_BIT
	testl	%r13d, %eax
	jne	LBB0_4
## %bb.3:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	___nmk_gpio_set_wake
LBB0_4:
	movq	%r12, %rdi
	callq	_spin_unlock
	movq	_nmk_gpio_slpm_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movl	4(%rbx), %edi
	callq	_clk_disable
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_nmk_gpio_slpm_lock,4,2         ## @nmk_gpio_slpm_lock
	.comm	_NORMAL,4,2                     ## @NORMAL
	.no_dead_strip	_nmk_gpio_irq_maskunmask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nmk_gpio_irq_maskunmask
_nmk_gpio_irq_maskunmask:               ; @nmk_gpio_irq_maskunmask
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x21, x0
	bl	_irq_data_get_irq_chip_data
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_clk_enable
Lloh0:
	adrp	x0, _nmk_gpio_slpm_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _nmk_gpio_slpm_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	add	x22, x19, #8
	mov	x0, x22
	bl	_spin_lock
	ldr	w1, [x21]
Lloh2:
	adrp	x8, _NORMAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NORMAL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x20
	bl	___nmk_gpio_irq_modify
	ldr	w23, [x19]
	ldr	w0, [x21]
	bl	_BIT
	tst	w0, w23
	b.ne	LBB0_3
; %bb.2:
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	___nmk_gpio_set_wake
LBB0_3:
	mov	x0, x22
	bl	_spin_unlock
Lloh5:
	adrp	x0, _nmk_gpio_slpm_lock@GOTPAGE
Lloh6:
	ldr	x0, [x0, _nmk_gpio_slpm_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #4]
	bl	_clk_disable
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_nmk_gpio_slpm_lock,4,2         ; @nmk_gpio_slpm_lock
	.comm	_NORMAL,4,2                     ; @NORMAL
	.no_dead_strip	_nmk_gpio_irq_maskunmask
.subsections_via_symbols
