	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eisa_irq
_eisa_irq:                              ## @eisa_irq
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-66981888, %edi                ## imm = 0xFC01F000
	callq	_gsc_readb
	movl	%eax, %r14d
	movq	_eisa_irq_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movl	$10, %edi
	movl	$32, %esi
	callq	_eisa_out8
	movl	$10, %edi
	movl	$160, %esi
	callq	_eisa_out8
	movl	$32, %edi
	callq	_eisa_in8
	movl	%eax, %ebx
	movl	$160, %edi
	callq	_eisa_in8
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_EISA_DBG
	movl	$10, %edi
	movl	$32, %esi
	callq	_eisa_out8
	movl	$10, %edi
	movl	$160, %esi
	callq	_eisa_out8
	movl	$32, %edi
	callq	_eisa_in8
	movl	%eax, %r15d
	movl	$33, %edi
	callq	_eisa_in8
	movl	%eax, %r12d
	movl	$160, %edi
	callq	_eisa_in8
	movl	%eax, %ebx
	movl	$161, %edi
	callq	_eisa_in8
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_EISA_DBG
	movl	%r14d, %r15d
	andl	$15, %r15d
	movl	%r14d, %ebx
	andl	$7, %ebx
	movl	$1, %r12d
	movl	%ebx, %ecx
	shll	%cl, %r12d
	testb	$8, %r14b
	jne	LBB0_1
## %bb.2:
	movq	_master_mask@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	%r12d, %edi
	movl	%edi, (%rax)
	movl	$33, %esi
	callq	_eisa_out8
	leal	96(%r15), %edi
	jmp	LBB0_3
LBB0_1:
	movq	_slave_mask@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	%r12d, %edi
	movl	%edi, (%rax)
	movl	$161, %esi
	callq	_eisa_out8
	orl	$96, %ebx
	movl	%ebx, %edi
	movl	$160, %esi
	callq	_eisa_out8
	movl	$98, %edi
LBB0_3:
	movl	$32, %esi
	callq	_eisa_out8
	movq	_eisa_irq_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movl	%r15d, %edi
	callq	_generic_handle_irq
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	notl	%r12d
	testb	$8, %r14b
	jne	LBB0_4
## %bb.5:
	movq	_master_mask@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movl	%r12d, (%rax)
	movl	%r12d, %edi
	movl	$33, %esi
	jmp	LBB0_6
LBB0_4:
	movq	_slave_mask@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movl	%r12d, (%rax)
	movl	%r12d, %edi
	movl	$161, %esi
LBB0_6:
	callq	_eisa_out8
	movq	_eisa_irq_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_eisa_irq_lock,4,2              ## @eisa_irq_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"irq IAR %02x 8259-1 irr %02x 8259-2 irr %02x\n"

L_.str.1:                               ## @.str.1
	.asciz	"irq 8259-1 isr %02x imr %02x 8259-2 isr %02x imr %02x\n"

	.comm	_slave_mask,4,2                 ## @slave_mask
	.comm	_master_mask,4,2                ## @master_mask
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_eisa_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eisa_irq
_eisa_irq:                              ; @eisa_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	w0, #61440
	movk	w0, #64513, lsl #16
	bl	_gsc_readb
	mov	x19, x0
Lloh0:
	adrp	x0, _eisa_irq_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _eisa_irq_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	mov	w0, #10
	mov	w1, #32
	bl	_eisa_out8
	mov	w0, #10
	mov	w1, #160
	bl	_eisa_out8
	mov	w0, #32
	bl	_eisa_in8
	mov	x20, x0
	mov	w0, #160
	bl	_eisa_in8
	mov	x3, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_EISA_DBG
	mov	w0, #10
	mov	w1, #32
	bl	_eisa_out8
	mov	w0, #10
	mov	w1, #160
	bl	_eisa_out8
	mov	w0, #32
	bl	_eisa_in8
	mov	x20, x0
	mov	w0, #33
	bl	_eisa_in8
	mov	x21, x0
	mov	w0, #160
	bl	_eisa_in8
	mov	x22, x0
	mov	w0, #161
	bl	_eisa_in8
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	_EISA_DBG
	and	w20, w19, #0xf
	and	w21, w19, #0x7
	mov	w8, #1
	lsl	w24, w8, w21
Lloh6:
	adrp	x22, _slave_mask@GOTPAGE
Lloh7:
	ldr	x22, [x22, _slave_mask@GOTPAGEOFF]
Lloh8:
	adrp	x23, _master_mask@GOTPAGE
Lloh9:
	ldr	x23, [x23, _master_mask@GOTPAGEOFF]
	tbnz	w19, #3, LBB0_2
; %bb.1:
	ldr	w8, [x23]
	orr	w0, w8, w24
	str	w0, [x23]
	mov	w1, #33
	bl	_eisa_out8
	orr	w0, w20, #0x60
	b	LBB0_3
LBB0_2:
	ldr	w8, [x22]
	orr	w0, w8, w24
	str	w0, [x22]
	mov	w1, #161
	bl	_eisa_out8
	orr	w0, w21, #0x60
	mov	w1, #160
	bl	_eisa_out8
	mov	w0, #98
LBB0_3:
	mov	w1, #32
	bl	_eisa_out8
Lloh10:
	adrp	x21, _eisa_irq_lock@GOTPAGE
Lloh11:
	ldr	x21, [x21, _eisa_irq_lock@GOTPAGEOFF]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	bl	_generic_handle_irq
	mov	x0, x21
	bl	_spin_lock_irqsave
	mvn	w8, w24
	tbnz	w19, #3, LBB0_5
; %bb.4:
	ldr	w9, [x23]
	and	w0, w9, w8
	str	w0, [x23]
	mov	w1, #33
	b	LBB0_6
LBB0_5:
	ldr	w9, [x22]
	and	w0, w9, w8
	str	w0, [x22]
	mov	w1, #161
LBB0_6:
	bl	_eisa_out8
Lloh12:
	adrp	x0, _eisa_irq_lock@GOTPAGE
Lloh13:
	ldr	x0, [x0, _eisa_irq_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
Lloh14:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_eisa_irq_lock,4,2              ; @eisa_irq_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"irq IAR %02x 8259-1 irr %02x 8259-2 irr %02x\n"

l_.str.1:                               ; @.str.1
	.asciz	"irq 8259-1 isr %02x imr %02x 8259-2 isr %02x imr %02x\n"

	.comm	_slave_mask,4,2                 ; @slave_mask
	.comm	_master_mask,4,2                ; @master_mask
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_eisa_irq
.subsections_via_symbols
