	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_dma_get_resources
_xgene_dma_get_resources:               ## @xgene_dma_get_resources
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movl	(%rax), %ebx
	movq	%rax, %rdi
	callq	_resource_size
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_devm_ioremap
	movq	%rax, 40(%r14)
	testq	%rax, %rax
	je	LBB0_14
## %bb.2:
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_15
## %bb.3:
	movl	(%rax), %ebx
	movq	%rax, %rdi
	callq	_resource_size
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_devm_ioremap
	movq	%rax, 32(%r14)
	testq	%rax, %rax
	je	LBB0_16
## %bb.4:
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	$2, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_17
## %bb.5:
	movl	(%rax), %ebx
	movq	%rax, %rdi
	callq	_resource_size
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_devm_ioremap
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_18
## %bb.6:
	movq	_XGENE_DMA_RING_CMD_SM_OFFSET@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	%rax, 24(%r14)
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	$3, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_19
## %bb.7:
	movl	(%rax), %ebx
	movq	%rax, %rdi
	callq	_resource_size
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_devm_ioremap
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_22
## %bb.8:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	testl	%eax, %eax
	jle	LBB0_21
## %bb.9:
	movl	%eax, (%r14)
	movq	_XGENE_DMA_MAX_CHANNEL@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_26
## %bb.10:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	leal	1(%r13), %esi
	movq	%r15, %rdi
	callq	_platform_get_irq
	testl	%eax, %eax
	jle	LBB0_21
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	8(%r14), %rcx
	movl	%eax, (%rcx,%r13,4)
	movslq	(%r12), %rax
	incq	%r13
	cmpq	%rax, %r13
	jl	LBB0_11
	jmp	LBB0_26
LBB0_13:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_25
LBB0_14:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_23
LBB0_15:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_20
LBB0_16:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_23
LBB0_17:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_20
LBB0_18:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_23
LBB0_19:
	leaq	L_.str.6(%rip), %rsi
LBB0_20:
	movq	%r15, %rdi
	callq	_dev_err
LBB0_21:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_22:
	leaq	L_.str.7(%rip), %rsi
LBB0_23:
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_24:
	xorl	%ebx, %ebx
LBB0_25:
	subl	(%rax), %ebx
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get csr region\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"Failed to ioremap csr region"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"Failed to get ring csr region\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to ioremap ring csr region"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to get ring cmd csr region\n"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to ioremap ring cmd csr region"

	.comm	_XGENE_DMA_RING_CMD_SM_OFFSET,8,3 ## @XGENE_DMA_RING_CMD_SM_OFFSET
L_.str.6:                               ## @.str.6
	.asciz	"Failed to get efuse csr region\n"

L_.str.7:                               ## @.str.7
	.asciz	"Failed to ioremap efuse csr region"

	.comm	_XGENE_DMA_MAX_CHANNEL,4,2      ## @XGENE_DMA_MAX_CHANNEL
	.no_dead_strip	_xgene_dma_get_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_dma_get_resources
_xgene_dma_get_resources:               ; @xgene_dma_get_resources
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IORESOURCE_MEM@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_13
; %bb.1:
	ldr	w21, [x0]
	bl	_resource_size
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_devm_ioremap
	str	x0, [x20, #40]
	cbz	x0, LBB0_14
; %bb.2:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #1
	bl	_platform_get_resource
	cbz	x0, LBB0_15
; %bb.3:
	ldr	w21, [x0]
	bl	_resource_size
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_devm_ioremap
	str	x0, [x20, #32]
	cbz	x0, LBB0_16
; %bb.4:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #2
	bl	_platform_get_resource
	cbz	x0, LBB0_17
; %bb.5:
	ldr	w21, [x0]
	bl	_resource_size
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_devm_ioremap
	str	x0, [x20, #24]
	cbz	x0, LBB0_18
; %bb.6:
Lloh2:
	adrp	x8, _XGENE_DMA_RING_CMD_SM_OFFSET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _XGENE_DMA_RING_CMD_SM_OFFSET@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x8, x0, x8
	str	x8, [x20, #24]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #3
	bl	_platform_get_resource
	cbz	x0, LBB0_19
; %bb.7:
	ldr	w21, [x0]
	bl	_resource_size
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_devm_ioremap
	str	x0, [x20, #16]
	cbz	x0, LBB0_22
; %bb.8:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	cmp	w0, #0
	b.le	LBB0_21
; %bb.9:
	str	w0, [x20]
Lloh5:
	adrp	x21, _XGENE_DMA_MAX_CHANNEL@GOTPAGE
Lloh6:
	ldr	x21, [x21, _XGENE_DMA_MAX_CHANNEL@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_26
; %bb.10:
	mov	x22, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	w1, w22, #1
	mov	x0, x19
	bl	_platform_get_irq
	cmp	w0, #0
	b.le	LBB0_21
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x20, #8]
	str	w8, [x9, x22, lsl #2]
	ldrsw	x8, [x21]
	add	x22, x22, #1
	cmp	x22, x8
	b.lt	LBB0_11
	b	LBB0_25
LBB0_13:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_20
LBB0_14:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_23
LBB0_15:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_20
LBB0_16:
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_23
LBB0_17:
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_20
LBB0_18:
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_23
LBB0_19:
Lloh19:
	adrp	x1, l_.str.6@PAGE
Lloh20:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_20:
	mov	x0, x19
	bl	_dev_err
LBB0_21:
Lloh21:
	adrp	x8, _ENXIO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_24
LBB0_22:
Lloh23:
	adrp	x1, l_.str.7@PAGE
Lloh24:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_23:
	mov	x0, x19
	bl	_dev_err
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_25:
	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
LBB0_26:
	mov	w0, #0
	b	LBB0_25
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get csr region\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"Failed to ioremap csr region"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"Failed to get ring csr region\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to ioremap ring csr region"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to get ring cmd csr region\n"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to ioremap ring cmd csr region"

	.comm	_XGENE_DMA_RING_CMD_SM_OFFSET,8,3 ; @XGENE_DMA_RING_CMD_SM_OFFSET
l_.str.6:                               ; @.str.6
	.asciz	"Failed to get efuse csr region\n"

l_.str.7:                               ; @.str.7
	.asciz	"Failed to ioremap efuse csr region"

	.comm	_XGENE_DMA_MAX_CHANNEL,4,2      ; @XGENE_DMA_MAX_CHANNEL
	.no_dead_strip	_xgene_dma_get_resources
.subsections_via_symbols
