	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pirq_write                     ## -- Begin function pirq_write
	.p2align	4, 0x90
_pirq_write:                            ## @pirq_write
	.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	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	movq	_pirqs@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_nitems
	xorl	%edi, %edi
	cmpl	%ebx, %eax
	setge	%dil
	jmp	LBB0_3
LBB0_1:
	xorl	%edi, %edi
LBB0_3:
	callq	_assert
	movq	_pirqs@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	decl	%ebx
	movslq	%ebx, %rax
	leaq	(%rax,%rax,2), %r13
	leaq	(%r12,%r13,8), %rbx
	addq	$16, %rbx
	movq	%rbx, %rdi
	callq	_pthread_mutex_lock
	movl	(%r12,%r13,8), %edi
	movq	_PIRQ_DIS@GOTPCREL(%rip), %r14
	movq	_PIRQ_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%r14), %eax
	andl	%r15d, %eax
	cmpl	%eax, %edi
	je	LBB0_11
## %bb.4:
	leaq	(%r12,%r13,8), %rdx
	cmpq	$0, 8(%r12,%r13,8)
	je	LBB0_5
## %bb.6:
	leaq	(%r12,%r13,8), %r13
	addq	$8, %r13
	movq	%rdx, %r12
	callq	_pirq_valid_irq
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_PIRQ_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	(%r12), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$-1, %edx
	callq	_vm_isa_deassert_irq
LBB0_8:
	movq	_PIRQ_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%r14), %edi
	andl	%r15d, %edi
	cmpq	$0, (%r13)
	movl	%edi, (%r12)
	je	LBB0_11
## %bb.9:
	movq	%rax, %r13
	callq	_pirq_valid_irq
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	(%r13), %esi
	andl	(%r12), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$-1, %edx
	callq	_vm_isa_assert_irq
	jmp	LBB0_11
LBB0_5:
	movl	%eax, (%rdx)
LBB0_11:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pthread_mutex_unlock           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_pirqs,8,3                      ## @pirqs
	.comm	_PIRQ_DIS,4,2                   ## @PIRQ_DIS
	.comm	_PIRQ_IRQ,4,2                   ## @PIRQ_IRQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pirq_write                     ; -- Begin function pirq_write
	.p2align	2
_pirq_write:                            ; @pirq_write
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _pirqs@GOTPAGE
Lloh1:
	ldr	x22, [x22, _pirqs@GOTPAGEOFF]
	cmp	w1, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	x0, [x22]
	bl	_nitems
	cmp	w0, w21
	cset	w0, ge
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_assert
	ldr	x25, [x22]
	sxtw	x8, w21
	sub	x26, x8, #1
	mov	w8, #24
	madd	x22, x26, x8, x25
	add	x21, x22, #16
	mov	x0, x21
	bl	_pthread_mutex_lock
	ldr	w0, [x22]
Lloh2:
	adrp	x24, _PIRQ_DIS@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PIRQ_DIS@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh4:
	adrp	x23, _PIRQ_IRQ@GOTPAGE
Lloh5:
	ldr	x23, [x23, _PIRQ_IRQ@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w9, w8
	and	w8, w8, w20
	cmp	w0, w8
	b.eq	LBB0_11
; %bb.4:
	mov	w9, #24
	madd	x25, x26, x9, x25
	ldr	x9, [x25, #8]!
	cbz	x9, LBB0_10
; %bb.5:
	bl	_pirq_valid_irq
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w8, [x22]
	ldr	w9, [x23]
	and	w1, w9, w8
	mov	x0, x19
	mov	w2, #-1
	bl	_vm_isa_deassert_irq
LBB0_7:
	ldr	x8, [x25]
	ldr	w9, [x24]
	ldr	w10, [x23]
	orr	w9, w10, w9
	and	w0, w9, w20
	str	w0, [x22]
	cbz	x8, LBB0_11
; %bb.8:
	bl	_pirq_valid_irq
	cbz	x0, LBB0_11
; %bb.9:
	ldr	w8, [x22]
	ldr	w9, [x23]
	and	w1, w9, w8
	mov	x0, x19
	mov	w2, #-1
	bl	_vm_isa_assert_irq
	b	LBB0_11
LBB0_10:
	str	w8, [x22]
LBB0_11:
	mov	x0, x21
	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
	b	_pthread_mutex_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_pirqs,8,3                      ; @pirqs
	.comm	_PIRQ_DIS,4,2                   ; @PIRQ_DIS
	.comm	_PIRQ_IRQ,4,2                   ; @PIRQ_IRQ
.subsections_via_symbols
