	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omni_sg_dma_init               ## -- Begin function omni_sg_dma_init
	.p2align	4, 0x90
_omni_sg_dma_init:                      ## @omni_sg_dma_init
	.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	%rdi, %r14
	movq	_CAPABILITY_REGISTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ioread32
	movq	$0, 8(%r14)
	movl	%eax, %ecx
	andl	$15, %ecx
	movl	%ecx, (%r14)
	movq	_PCI_64BIT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	sete	%dl
	movl	%edx, 4(%r14)
	andl	$15, %eax
	je	LBB0_7
## %bb.1:
	xorl	%ebx, %ebx
	movq	_DONE@GOTPCREL(%rip), %r12
	movq	_DMA_TYPE_FIFO@GOTPCREL(%rip), %r13
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	(%r14), %ebx
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_CS_REG
	movl	%eax, %edi
	callq	_ioread32
	movl	%eax, %r15d
	movl	%ebx, %edi
	callq	_CS_REG
	movl	%eax, %edi
	callq	_ioread32
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r15d, (%r13)
	jne	LBB0_6
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %r14
	movq	%r12, %r13
	movq	_ABORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%ebx, %edi
	callq	_CS_REG
	movl	%r12d, %edi
	movq	%r13, %r12
	movq	%r14, %r13
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_iowrite32
	testl	%r15d, (%r13)
	jne	LBB0_6
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	8(%r14)
	jmp	LBB0_6
LBB0_7:
	movq	%r14, %rdi
	callq	_show_dma_capability
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAPABILITY_REGISTER,4,2        ## @CAPABILITY_REGISTER
	.comm	_PCI_64BIT,4,2                  ## @PCI_64BIT
	.comm	_DONE,4,2                       ## @DONE
	.comm	_ABORT,4,2                      ## @ABORT
	.comm	_DMA_TYPE_FIFO,4,2              ## @DMA_TYPE_FIFO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omni_sg_dma_init               ; -- Begin function omni_sg_dma_init
	.p2align	2
_omni_sg_dma_init:                      ; @omni_sg_dma_init
	.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	x19, x0
Lloh0:
	adrp	x8, _CAPABILITY_REGISTER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAPABILITY_REGISTER@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ioread32
	str	xzr, [x19, #8]
	and	w8, w0, #0xf
	str	w8, [x19]
Lloh3:
	adrp	x9, _PCI_64BIT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCI_64BIT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w0
	cset	w9, eq
	str	w9, [x19, #4]
	cbz	w8, LBB0_7
; %bb.1:
	mov	w20, #0
Lloh6:
	adrp	x23, _DONE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _DONE@GOTPAGEOFF]
Lloh8:
	adrp	x24, _ABORT@GOTPAGE
Lloh9:
	ldr	x24, [x24, _ABORT@GOTPAGEOFF]
Lloh10:
	adrp	x25, _DMA_TYPE_FIFO@GOTPAGE
Lloh11:
	ldr	x25, [x25, _DMA_TYPE_FIFO@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w20, #1
	ldr	w8, [x19]
	cmp	w20, w8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_CS_REG
	bl	_ioread32
	mov	x21, x0
	mov	x0, x20
	bl	_CS_REG
	bl	_ioread32
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w22, [x24]
	mov	x0, x20
	bl	_CS_REG
	mov	x1, x0
	mov	x0, x22
	bl	_iowrite32
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x25]
	tst	w8, w21
	b.ne	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #8]
	b	LBB0_2
LBB0_7:
	mov	x0, x19
	bl	_show_dma_capability
	mov	w0, #0
	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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CAPABILITY_REGISTER,4,2        ; @CAPABILITY_REGISTER
	.comm	_PCI_64BIT,4,2                  ; @PCI_64BIT
	.comm	_DONE,4,2                       ; @DONE
	.comm	_ABORT,4,2                      ; @ABORT
	.comm	_DMA_TYPE_FIFO,4,2              ; @DMA_TYPE_FIFO
.subsections_via_symbols
