	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32_fmc2_dma_setup
_stm32_fmc2_dma_setup:                  ## @stm32_fmc2_dma_setup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	16(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dma_request_slave_channel
	movq	%rax, 40(%rbx)
	movl	16(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dma_request_slave_channel
	movq	%rax, 32(%rbx)
	movl	16(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dma_request_slave_channel
	movq	%rax, 24(%rbx)
	cmpq	$0, 40(%rbx)
	je	LBB0_3
## %bb.1:
	cmpq	$0, 32(%rbx)
	je	LBB0_3
## %bb.2:
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	leaq	20(%rbx), %rdi
	movq	_FMC2_MAX_SG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	callq	_sg_alloc_table
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movl	16(%rbx), %edi
	movq	_FMC2_MAX_ECC_BUF_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	callq	_devm_kzalloc
	movl	%eax, 12(%rbx)
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	leaq	8(%rbx), %rdi
	movl	(%r14), %esi
	movl	(%r15), %edx
	callq	_sg_alloc_table
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	leaq	4(%rbx), %rdi
	callq	_init_completion
	movq	%rbx, %rdi
	callq	_init_completion
	jmp	LBB0_9
LBB0_3:
	movl	16(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_warn
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx"

L_.str.1:                               ## @.str.1
	.asciz	"rx"

L_.str.2:                               ## @.str.2
	.asciz	"ecc"

L_.str.3:                               ## @.str.3
	.asciz	"DMAs not defined in the device tree, polling mode is used\n"

	.comm	_FMC2_MAX_SG,4,2                ## @FMC2_MAX_SG
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_FMC2_MAX_ECC_BUF_LEN,4,2       ## @FMC2_MAX_ECC_BUF_LEN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_stm32_fmc2_dma_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32_fmc2_dma_setup
_stm32_fmc2_dma_setup:                  ; @stm32_fmc2_dma_setup
	.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, x0
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dma_request_slave_channel
	str	x0, [x19, #40]
	ldr	w0, [x19, #16]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dma_request_slave_channel
	str	x0, [x19, #32]
	ldr	w0, [x19, #16]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dma_request_slave_channel
	str	x0, [x19, #24]
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_7
; %bb.2:
	cbz	x0, LBB0_7
; %bb.3:
	add	x0, x19, #20
Lloh6:
	adrp	x20, _FMC2_MAX_SG@GOTPAGE
Lloh7:
	ldr	x20, [x20, _FMC2_MAX_SG@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh8:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x21]
	bl	_sg_alloc_table
	cbnz	w0, LBB0_9
; %bb.4:
	ldr	w0, [x19, #16]
Lloh10:
	adrp	x8, _FMC2_MAX_ECC_BUF_LEN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FMC2_MAX_ECC_BUF_LEN@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w2, [x21]
	bl	_devm_kzalloc
	str	w0, [x19, #12]
	cbz	w0, LBB0_10
; %bb.5:
	add	x0, x19, #8
	ldr	w1, [x20]
	ldr	w2, [x21]
	bl	_sg_alloc_table
	cbnz	w0, LBB0_9
; %bb.6:
	add	x0, x19, #4
	bl	_init_completion
	mov	x0, x19
	bl	_init_completion
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19, #16]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_warn
LBB0_8:
	mov	w0, #0
LBB0_9:
	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_10:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx"

l_.str.1:                               ; @.str.1
	.asciz	"rx"

l_.str.2:                               ; @.str.2
	.asciz	"ecc"

l_.str.3:                               ; @.str.3
	.asciz	"DMAs not defined in the device tree, polling mode is used\n"

	.comm	_FMC2_MAX_SG,4,2                ; @FMC2_MAX_SG
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_FMC2_MAX_ECC_BUF_LEN,4,2       ; @FMC2_MAX_ECC_BUF_LEN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_stm32_fmc2_dma_setup
.subsections_via_symbols
