	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isa_dmacascade                 ## -- Begin function isa_dmacascade
	.p2align	4, 0x90
_isa_dmacascade:                        ## @isa_dmacascade
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edi, %ebx
	movq	_isa_dma_lock@GOTPCREL(%rip), %rdi
	callq	_mtx_lock
	testb	$4, %bl
	jne	LBB0_2
## %bb.1:
	movq	_DMA1_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DMA37MD_CASCADE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%ebx, %esi
	callq	_outb
	movq	_DMA1_SMSK@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_DMA2_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DMA37MD_CASCADE@GOTPCREL(%rip), %rax
	andl	$3, %ebx
	movl	(%rax), %esi
	orl	%ebx, %esi
	callq	_outb
	movq	_DMA2_SMSK@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_outb
	movq	_isa_dma_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mtx_unlock                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_isa_dma_lock,4,2               ## @isa_dma_lock
	.comm	_DMA1_MODE,4,2                  ## @DMA1_MODE
	.comm	_DMA37MD_CASCADE,4,2            ## @DMA37MD_CASCADE
	.comm	_DMA1_SMSK,4,2                  ## @DMA1_SMSK
	.comm	_DMA2_MODE,4,2                  ## @DMA2_MODE
	.comm	_DMA2_SMSK,4,2                  ## @DMA2_SMSK
	.comm	_VALID_DMA_MASK,4,2             ## @VALID_DMA_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_isa_dmacascade                 ; -- Begin function isa_dmacascade
	.p2align	2
_isa_dmacascade:                        ; @isa_dmacascade
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, _isa_dma_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _isa_dma_lock@GOTPAGEOFF]
	bl	_mtx_lock
	tbnz	w19, #2, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _DMA1_MODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA1_MODE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _DMA37MD_CASCADE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMA37MD_CASCADE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w1, w8, w19
	bl	_outb
Lloh8:
	adrp	x8, _DMA1_SMSK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMA1_SMSK@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh10:
	adrp	x8, _DMA2_MODE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DMA2_MODE@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _DMA37MD_CASCADE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DMA37MD_CASCADE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	and	w19, w19, #0x3
	orr	w1, w8, w19
	bl	_outb
Lloh16:
	adrp	x8, _DMA2_SMSK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DMA2_SMSK@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_outb
Lloh18:
	adrp	x0, _isa_dma_lock@GOTPAGE
Lloh19:
	ldr	x0, [x0, _isa_dma_lock@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mtx_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_isa_dma_lock,4,2               ; @isa_dma_lock
	.comm	_DMA1_MODE,4,2                  ; @DMA1_MODE
	.comm	_DMA37MD_CASCADE,4,2            ; @DMA37MD_CASCADE
	.comm	_DMA1_SMSK,4,2                  ; @DMA1_SMSK
	.comm	_DMA2_MODE,4,2                  ; @DMA2_MODE
	.comm	_DMA2_SMSK,4,2                  ; @DMA2_SMSK
	.comm	_VALID_DMA_MASK,4,2             ; @VALID_DMA_MASK
.subsections_via_symbols
