	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function openpic_cpcht_unmask
_openpic_cpcht_unmask:                  ## @openpic_cpcht_unmask
	.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
	movq	%rdx, %r14
	movl	%esi, %ebx
	movl	%edi, %r15d
	callq	_openpic_unmask
	movl	%r15d, %edi
	callq	_device_get_softc
	cmpl	$127, %ebx
	jg	LBB0_4
## %bb.1:
	movq	%rax, %r12
	movq	_cpcht_irqmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movslq	%ebx, %r13
	shlq	$4, %r13
	cmpq	$0, (%rax,%r13)
	jle	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_mtx_lock_spin
	movq	_cpcht_irqmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PCIR_HT_COMMAND@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	(%rax,%r13), %rdi
	movl	8(%rax,%r13), %eax
	leal	(%rax,%rax), %esi
	addl	$16, %esi
	callq	_out8rb
	movq	_cpcht_irqmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r13), %rdi
	addq	$4, %rdi
	callq	_in32rb
	movq	_HTAPIC_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	_cpcht_irqmap@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r13), %rdi
	addq	$4, %rdi
	callq	_out32rb
	movq	%r12, %rdi
	callq	_mtx_unlock_spin
LBB0_4:
	movl	%r15d, %edi
	movl	%ebx, %esi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_openpic_cpcht_eoi              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cpcht_irqmap,8,3               ## @cpcht_irqmap
	.comm	_PCIR_HT_COMMAND,8,3            ## @PCIR_HT_COMMAND
	.comm	_HTAPIC_MASK,4,2                ## @HTAPIC_MASK
	.no_dead_strip	_openpic_cpcht_unmask
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function openpic_cpcht_unmask
_openpic_cpcht_unmask:                  ; @openpic_cpcht_unmask
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_openpic_unmask
	mov	x0, x21
	bl	_device_get_softc
	cmp	w20, #127
	b.gt	LBB0_4
; %bb.1:
Lloh0:
	adrp	x23, _cpcht_irqmap@GOTPAGE
Lloh1:
	ldr	x23, [x23, _cpcht_irqmap@GOTPAGEOFF]
	ldr	x8, [x23]
	cbz	x8, LBB0_4
; %bb.2:
	sbfiz	x9, x20, #4, #32
	ldr	x8, [x8, x9]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.3:
	mov	x22, x0
	sxtw	x24, w20
	bl	_mtx_lock_spin
	ldr	x8, [x23]
	lsl	x24, x24, #4
	add	x8, x8, x24
Lloh2:
	adrp	x9, _PCIR_HT_COMMAND@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PCIR_HT_COMMAND@GOTPAGEOFF]
	ldr	x10, [x8]
Lloh4:
	ldr	x9, [x9]
	add	x0, x9, x10
	ldr	w8, [x8, #8]
	lsl	w8, w8, #1
	add	w1, w8, #16
	bl	_out8rb
	ldr	x8, [x23]
	ldr	x8, [x8, x24]
	add	x0, x8, #4
	bl	_in32rb
Lloh5:
	adrp	x8, _HTAPIC_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HTAPIC_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	x8, [x23]
	ldr	x8, [x8, x24]
	add	x0, x8, #4
	bl	_out32rb
	mov	x0, x22
	bl	_mtx_unlock_spin
LBB0_4:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	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
	b	_openpic_cpcht_eoi
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_cpcht_irqmap,8,3               ; @cpcht_irqmap
	.comm	_PCIR_HT_COMMAND,8,3            ; @PCIR_HT_COMMAND
	.comm	_HTAPIC_MASK,4,2                ; @HTAPIC_MASK
	.no_dead_strip	_openpic_cpcht_unmask
.subsections_via_symbols
