	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_dma_set_caps
_xgene_dma_set_caps:                    ## @xgene_dma_set_caps
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	20(%rsi), %edi
	callq	_dma_cap_zero
	movq	(%r14), %rax
	movq	_XGENE_DMA_PQ_CHANNEL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movl	12(%r14), %edi
	callq	_is_pq_enabled
	testq	%rax, %rax
	je	LBB0_2
## %bb.11:
	movq	_DMA_PQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%rbx), %esi
	callq	_dma_cap_set
	jmp	LBB0_5
LBB0_2:
	movq	(%r14), %rax
LBB0_3:
	movq	_XGENE_DMA_XOR_CHANNEL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	movl	12(%r14), %edi
	callq	_is_pq_enabled
	testq	%rax, %rax
	jne	LBB0_6
LBB0_5:
	movq	_DMA_XOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%rbx), %esi
	callq	_dma_cap_set
LBB0_6:
	movl	8(%r14), %eax
	movl	%eax, 60(%rbx)
	movq	_xgene_dma_alloc_chan_resources@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movq	_xgene_dma_free_chan_resources@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movq	_xgene_dma_issue_pending@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_xgene_dma_tx_status@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_DMA_XOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%rbx), %esi
	callq	_dma_has_cap
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_xgene_dma_prep_xor@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	_XGENE_DMA_MAX_XOR_SRC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	_DMAENGINE_ALIGN_64_BYTES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
LBB0_8:
	movq	_DMA_PQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%rbx), %esi
	callq	_dma_has_cap
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_xgene_dma_prep_pq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_XGENE_DMA_MAX_XOR_SRC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	_DMAENGINE_ALIGN_64_BYTES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XGENE_DMA_PQ_CHANNEL,8,3       ## @XGENE_DMA_PQ_CHANNEL
	.comm	_DMA_PQ,4,2                     ## @DMA_PQ
	.comm	_DMA_XOR,4,2                    ## @DMA_XOR
	.comm	_XGENE_DMA_XOR_CHANNEL,8,3      ## @XGENE_DMA_XOR_CHANNEL
	.comm	_xgene_dma_alloc_chan_resources,4,2 ## @xgene_dma_alloc_chan_resources
	.comm	_xgene_dma_free_chan_resources,4,2 ## @xgene_dma_free_chan_resources
	.comm	_xgene_dma_issue_pending,4,2    ## @xgene_dma_issue_pending
	.comm	_xgene_dma_tx_status,4,2        ## @xgene_dma_tx_status
	.comm	_xgene_dma_prep_xor,4,2         ## @xgene_dma_prep_xor
	.comm	_XGENE_DMA_MAX_XOR_SRC,8,3      ## @XGENE_DMA_MAX_XOR_SRC
	.comm	_DMAENGINE_ALIGN_64_BYTES,8,3   ## @DMAENGINE_ALIGN_64_BYTES
	.comm	_xgene_dma_prep_pq,4,2          ## @xgene_dma_prep_pq
	.no_dead_strip	_xgene_dma_set_caps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_dma_set_caps
_xgene_dma_set_caps:                    ; @xgene_dma_set_caps
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x1, #20]
	bl	_dma_cap_zero
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _XGENE_DMA_PQ_CHANNEL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XGENE_DMA_PQ_CHANNEL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x22, _DMA_XOR@GOTPAGE
Lloh4:
	ldr	x22, [x22, _DMA_XOR@GOTPAGEOFF]
Lloh5:
	adrp	x21, _DMA_PQ@GOTPAGE
Lloh6:
	ldr	x21, [x21, _DMA_PQ@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	w0, [x20, #12]
	bl	_is_pq_enabled
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x21]
	ldr	w1, [x19, #20]
	bl	_dma_cap_set
	b	LBB0_6
LBB0_3:
	ldr	x8, [x20]
LBB0_4:
Lloh7:
	adrp	x9, _XGENE_DMA_XOR_CHANNEL@GOTPAGE
Lloh8:
	ldr	x9, [x9, _XGENE_DMA_XOR_CHANNEL@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	ldr	w0, [x20, #12]
	bl	_is_pq_enabled
	cbnz	x0, LBB0_7
LBB0_6:
	ldr	w0, [x22]
	ldr	w1, [x19, #20]
	bl	_dma_cap_set
LBB0_7:
	ldr	w8, [x20, #8]
	str	w8, [x19, #60]
Lloh10:
	adrp	x8, _xgene_dma_alloc_chan_resources@GOTPAGE
Lloh11:
	ldr	x8, [x8, _xgene_dma_alloc_chan_resources@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _xgene_dma_free_chan_resources@GOTPAGE
Lloh14:
	ldr	x9, [x9, _xgene_dma_free_chan_resources@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #52]
Lloh16:
	adrp	x8, _xgene_dma_issue_pending@GOTPAGE
Lloh17:
	ldr	x8, [x8, _xgene_dma_issue_pending@GOTPAGEOFF]
Lloh18:
	adrp	x9, _xgene_dma_tx_status@GOTPAGE
Lloh19:
	ldr	x9, [x9, _xgene_dma_tx_status@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #44]
	ldr	w0, [x22]
	ldr	w1, [x19, #20]
	bl	_dma_has_cap
Lloh22:
	adrp	x22, _XGENE_DMA_MAX_XOR_SRC@GOTPAGE
Lloh23:
	ldr	x22, [x22, _XGENE_DMA_MAX_XOR_SRC@GOTPAGEOFF]
Lloh24:
	adrp	x20, _DMAENGINE_ALIGN_64_BYTES@GOTPAGE
Lloh25:
	ldr	x20, [x20, _DMAENGINE_ALIGN_64_BYTES@GOTPAGEOFF]
	cbz	x0, LBB0_9
; %bb.8:
Lloh26:
	adrp	x8, _xgene_dma_prep_xor@GOTPAGE
Lloh27:
	ldr	x8, [x8, _xgene_dma_prep_xor@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	ldr	x8, [x22]
	ldr	x9, [x20]
	stp	x9, x8, [x19, #24]
LBB0_9:
	ldr	w0, [x21]
	ldr	w1, [x19, #20]
	bl	_dma_has_cap
	cbz	x0, LBB0_11
; %bb.10:
Lloh29:
	adrp	x8, _xgene_dma_prep_pq@GOTPAGE
Lloh30:
	ldr	x8, [x8, _xgene_dma_prep_pq@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	x8, [x22]
	ldr	x9, [x20]
	stp	x9, x8, [x19]
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_XGENE_DMA_PQ_CHANNEL,8,3       ; @XGENE_DMA_PQ_CHANNEL
	.comm	_DMA_PQ,4,2                     ; @DMA_PQ
	.comm	_DMA_XOR,4,2                    ; @DMA_XOR
	.comm	_XGENE_DMA_XOR_CHANNEL,8,3      ; @XGENE_DMA_XOR_CHANNEL
	.comm	_xgene_dma_alloc_chan_resources,4,2 ; @xgene_dma_alloc_chan_resources
	.comm	_xgene_dma_free_chan_resources,4,2 ; @xgene_dma_free_chan_resources
	.comm	_xgene_dma_issue_pending,4,2    ; @xgene_dma_issue_pending
	.comm	_xgene_dma_tx_status,4,2        ; @xgene_dma_tx_status
	.comm	_xgene_dma_prep_xor,4,2         ; @xgene_dma_prep_xor
	.comm	_XGENE_DMA_MAX_XOR_SRC,8,3      ; @XGENE_DMA_MAX_XOR_SRC
	.comm	_DMAENGINE_ALIGN_64_BYTES,8,3   ; @DMAENGINE_ALIGN_64_BYTES
	.comm	_xgene_dma_prep_pq,4,2          ; @xgene_dma_prep_pq
	.no_dead_strip	_xgene_dma_set_caps
.subsections_via_symbols
