	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function piix4_master_intr
_piix4_master_intr:                     ## @piix4_master_intr
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_i8259A_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movl	$12, %edi
	movl	$32, %esi
	callq	_outb
	movl	$32, %edi
	callq	_inb
	movl	%eax, %r15d
	xorl	%edi, %edi
	testb	$-128, %r15b
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_1
LBB0_11:
	movq	_i8259A_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movq	_IRQ_NONE@GOTPCREL(%rip), %rbx
LBB0_12:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	andl	$7, %r15d
	xorl	%edi, %edi
	cmpl	$2, %r15d
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	$12, %edi
	movl	$160, %esi
	callq	_outb
	movl	$160, %edi
	callq	_inb
	movl	%eax, %r15d
	xorl	%edi, %edi
	testb	$-128, %r15b
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_11
## %bb.3:
	andl	$7, %r15d
	orl	$8, %r15d
LBB0_4:
	movl	$1, %eax
	movl	%r15d, %ecx
	shll	%cl, %eax
	movq	_cached_irq_mask@GOTPCREL(%rip), %rcx
	orl	%eax, (%rcx)
	xorl	%edi, %edi
	cmpl	$8, %r15d
	setge	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	$161, %edi
	callq	_inb
	movq	_cached_slave_mask@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$161, %esi
	callq	_outb
	movl	%r15d, %edi
	andl	$7, %edi
	orl	$96, %edi
	movl	$160, %esi
	callq	_outb
	movl	$98, %edi
	jmp	LBB0_7
LBB0_6:
	movl	$33, %edi
	callq	_inb
	movq	_cached_master_mask@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$33, %esi
	callq	_outb
	leal	96(%r15), %edi
LBB0_7:
	movl	$32, %esi
	callq	_outb
	movq	_i8259A_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movl	%r15d, %edi
	callq	_irq_to_desc
	movq	%rax, %r14
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_kstat_incr_irqs_this_cpu
	xorl	%edi, %edi
	cmpq	$0, 8(%r14)
	setne	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	8(%r14), %rsi
	movl	%r15d, %edi
	callq	_handle_IRQ_event
LBB0_9:
	movq	_IRQ_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rbx
	testl	%eax, (%r14)
	jne	LBB0_12
## %bb.10:
	movl	%r15d, %edi
	callq	_enable_8259A_irq
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_i8259A_lock,4,2                ## @i8259A_lock
	.comm	_cached_irq_mask,4,2            ## @cached_irq_mask
	.comm	_cached_slave_mask,4,2          ## @cached_slave_mask
	.comm	_cached_master_mask,4,2         ## @cached_master_mask
	.comm	_IRQ_DISABLED,4,2               ## @IRQ_DISABLED
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.no_dead_strip	_piix4_master_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function piix4_master_intr
_piix4_master_intr:                     ; @piix4_master_intr
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x0, _i8259A_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _i8259A_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	mov	w0, #12
	mov	w1, #32
	bl	_outb
	mov	w0, #32
	bl	_inb
	mov	x19, x0
	mov	w8, #1
	bic	w0, w8, w0, lsr #7
	bl	_unlikely
	cbz	x0, LBB0_2
LBB0_1:
Lloh2:
	adrp	x0, _i8259A_lock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _i8259A_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
Lloh4:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_13
LBB0_2:
	and	w19, w19, #0x7
	cmp	w19, #2
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.3:
	mov	w0, #12
	mov	w1, #160
	bl	_outb
	mov	w0, #160
	bl	_inb
	mov	x20, x0
	mov	w8, #1
	bic	w0, w8, w0, lsr #7
	bl	_unlikely
	cbnz	x0, LBB0_1
; %bb.4:
	mov	w19, #8
	bfxil	w19, w20, #0, #3
LBB0_5:
	mov	w8, #1
Lloh6:
	adrp	x9, _cached_irq_mask@GOTPAGE
Lloh7:
	ldr	x9, [x9, _cached_irq_mask@GOTPAGEOFF]
	lsl	w8, w8, w19
	ldr	w10, [x9]
	orr	w8, w10, w8
	str	w8, [x9]
	cmp	w19, #7
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_7
; %bb.6:
	mov	w0, #161
	bl	_inb
Lloh8:
	adrp	x8, _cached_slave_mask@GOTPAGE
Lloh9:
	ldr	x8, [x8, _cached_slave_mask@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	w1, #161
	bl	_outb
	mov	w0, #96
	bfxil	w0, w19, #0, #3
	mov	w1, #160
	bl	_outb
	mov	w0, #98
	b	LBB0_8
LBB0_7:
	mov	w0, #33
	bl	_inb
Lloh11:
	adrp	x8, _cached_master_mask@GOTPAGE
Lloh12:
	ldr	x8, [x8, _cached_master_mask@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	w1, #33
	bl	_outb
	orr	w0, w19, #0x60
LBB0_8:
	mov	w1, #32
	bl	_outb
Lloh14:
	adrp	x0, _i8259A_lock@GOTPAGE
Lloh15:
	ldr	x0, [x0, _i8259A_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_irq_to_desc
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_kstat_incr_irqs_this_cpu
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w0, ne
	bl	_likely
	cbz	x0, LBB0_10
; %bb.9:
	ldr	x1, [x20, #8]
	mov	x0, x19
	bl	_handle_IRQ_event
LBB0_10:
	ldr	w8, [x20]
Lloh16:
	adrp	x9, _IRQ_DISABLED@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IRQ_DISABLED@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_enable_8259A_irq
LBB0_12:
Lloh19:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_i8259A_lock,4,2                ; @i8259A_lock
	.comm	_cached_irq_mask,4,2            ; @cached_irq_mask
	.comm	_cached_slave_mask,4,2          ; @cached_slave_mask
	.comm	_cached_master_mask,4,2         ; @cached_master_mask
	.comm	_IRQ_DISABLED,4,2               ; @IRQ_DISABLED
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.no_dead_strip	_piix4_master_intr
.subsections_via_symbols
