	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtsx_pci_dma_map_sg            ## -- Begin function rtsx_pci_dma_map_sg
	.p2align	4, 0x90
_rtsx_pci_dma_map_sg:                   ## @rtsx_pci_dma_map_sg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testl	%ecx, %ecx
	jne	LBB0_1
## %bb.2:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	cmpq	$0, 8(%rdi)
	jne	LBB0_6
	jmp	LBB0_4
LBB0_1:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	cmpq	$0, 8(%rdi)
	jne	LBB0_6
LBB0_4:
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.5:
	testl	%edx, %edx
	jle	LBB0_6
## %bb.7:
	movl	(%rax), %ecx
	movq	(%rdi), %rdi
	popq	%rbp
	jmp	_dma_map_sg                     ## TAILCALL
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rtsx_pci_dma_map_sg            ; -- Begin function rtsx_pci_dma_map_sg
	.p2align	2
_rtsx_pci_dma_map_sg:                   ; @rtsx_pci_dma_map_sg
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh2:
	adrp	x9, _DMA_TO_DEVICE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DMA_TO_DEVICE@GOTPAGEOFF]
	cmp	w3, #0
	csel	x8, x9, x8, eq
	ldr	x9, [x0, #8]
	cbz	x9, LBB0_2
LBB0_1:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_2:
	cbz	x1, LBB0_1
; %bb.3:
	cmp	w2, #0
	b.le	LBB0_1
; %bb.4:
	ldr	w3, [x8]
	ldr	x0, [x0]
	b	_dma_map_sg
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
