	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_dma_probe
_xgene_dma_probe:                       ## @xgene_dma_probe
	.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, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rbx, 16(%rax)
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_xgene_dma_get_resources
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_21
## %bb.3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movl	%eax, (%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_ACPI_COMPANION
	testl	%eax, %eax
	je	LBB0_22
LBB0_5:
	movl	(%r14), %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
LBB0_8:
	movq	%r14, %rdi
	callq	_xgene_dma_init_mem
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.9:
	movl	$42, %edi
	callq	_DMA_BIT_MASK
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_dma_set_mask_and_coherent
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %r15d
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_19
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_21:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r14), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_21
LBB0_22:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_11:
	movq	%r14, %rdi
	callq	_xgene_dma_init_channels
	movq	%r14, %rdi
	callq	_xgene_dma_init_rings
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.12:
	movq	%r14, %rdi
	callq	_xgene_dma_request_irqs
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.13:
	movq	%r14, %rdi
	callq	_xgene_dma_init_hw
	movq	%r14, %rdi
	callq	_xgene_dma_init_async
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_xgene_dma_free_irqs
LBB0_16:
	movq	_XGENE_DMA_MAX_CHANNEL@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_19
## %bb.17:
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rdi
	addq	%r13, %rdi
	callq	_xgene_dma_delete_chan_rings
	incq	%rbx
	movslq	(%r12), %rax
	addq	$4, %r13
	cmpq	%rax, %rbx
	jl	LBB0_18
LBB0_19:
	movl	(%r14), %edi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_21
## %bb.20:
	movl	(%r14), %edi
	callq	_clk_disable_unprepare
	jmp	LBB0_21
LBB0_14:
	xorl	%r15d, %r15d
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get clk\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to enable clk %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"No usable DMA configuration\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_dma_probe
_xgene_dma_probe:                       ; @xgene_dma_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	str	x21, [x0, #16]
	mov	x0, x21
	mov	x1, x19
	bl	_platform_set_drvdata
	mov	x0, x21
	mov	x1, x19
	bl	_xgene_dma_get_resources
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.2:
	mov	x0, x21
	mov	x1, #0
	bl	_devm_clk_get
	str	w0, [x19]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_ACPI_COMPANION
	cbz	w0, LBB0_12
LBB0_4:
	ldr	w0, [x19]
	bl	_IS_ERR
	cbz	x0, LBB0_10
LBB0_5:
	mov	x0, x19
	bl	_xgene_dma_init_mem
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.6:
	mov	w0, #42
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x21
	bl	_dma_set_mask_and_coherent
	cbz	w0, LBB0_13
; %bb.7:
	mov	x20, x0
Lloh3:
	adrp	x1, l_.str.2@PAGE
Lloh4:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_20
LBB0_8:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_9:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_10:
	ldr	w0, [x19]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_5
; %bb.11:
	mov	x20, x0
	str	x20, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_9
LBB0_12:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	ldr	w0, [x19]
	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
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_13:
	mov	x0, x19
	bl	_xgene_dma_init_channels
	mov	x0, x19
	bl	_xgene_dma_init_rings
	mov	x20, x0
	cbnz	w0, LBB0_20
; %bb.14:
	mov	x0, x19
	bl	_xgene_dma_request_irqs
	mov	x20, x0
	cbnz	w0, LBB0_17
; %bb.15:
	mov	x0, x19
	bl	_xgene_dma_init_hw
	mov	x0, x19
	bl	_xgene_dma_init_async
	mov	x20, x0
	cbz	w0, LBB0_9
; %bb.16:
	mov	x0, x19
	bl	_xgene_dma_free_irqs
LBB0_17:
Lloh12:
	adrp	x21, _XGENE_DMA_MAX_CHANNEL@GOTPAGE
Lloh13:
	ldr	x21, [x21, _XGENE_DMA_MAX_CHANNEL@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.18:
	mov	x22, #0
	mov	x23, #0
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x22
	bl	_xgene_dma_delete_chan_rings
	add	x23, x23, #1
	ldrsw	x8, [x21]
	add	x22, x22, #4
	cmp	x23, x8
	b.lt	LBB0_19
LBB0_20:
	ldr	w0, [x19]
	bl	_IS_ERR
	cbnz	x0, LBB0_9
; %bb.21:
	ldr	w0, [x19]
	bl	_clk_disable_unprepare
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get clk\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to enable clk %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"No usable DMA configuration\n"

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