	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdma_init                      ## -- Begin function sdma_init
	.p2align	4, 0x90
_sdma_init:                             ## @sdma_init
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r13
	movslq	%esi, %rax
	shlq	$2, %rax
	addq	96(%rdi), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	_sdma_idle_cnt@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	callq	_chip_sdma_engines
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_SDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HFI1_CAP_IS_KSET
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	_mod_num_sdma@GOTPCREL(%rip), %r14
	movq	(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.4:
	movq	%r13, %rdi
	callq	_chip_sdma_engines
	movq	(%r14), %rdx
	cmpq	%rax, %rbx
	ja	LBB0_6
## %bb.5:
	movq	_num_vls@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmovaeq	%rdx, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
LBB0_1:
	movq	_SDMA_AHG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HFI1_CAP_CLEAR
	jmp	LBB0_40
LBB0_3:
	xorl	%edx, %edx
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dd_dev_info
	movq	%r13, %rdi
	callq	_chip_sdma_engines
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_dd_dev_info
	movq	%r13, %rdi
	callq	_chip_sdma_mem_size
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_dd_dev_info
	movq	%r13, %rdi
	callq	_chip_sdma_mem_size
	movq	_SDMA_BLOCK_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	imulq	-48(%rbp), %rcx                 ## 8-byte Folded Reload
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_7
## %bb.8:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_9
LBB0_7:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_9:
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	92(%r13), %rdi
	callq	_init_waitqueue_head
	leaq	88(%r13), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	xorl	%eax, %eax
	callq	_sdma_get_descq_cnt
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dd_dev_info
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	80(%r13), %ecx
	movq	%rbx, %rdi
	movl	$176, %esi
	callq	_kcalloc_node
	movq	%rax, 48(%r13)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ns_to_cclock
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	jne	LBB0_12
## %bb.13:
	movq	_SDMA_DESC1_INT_REQ_FLAG@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_10:
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_40
LBB0_12:
	movq	_SDMA_DESC1_HEAD_TO_HOST_FLAG@GOTPCREL(%rip), %rax
LBB0_14:
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	movl	(%rax), %eax
	movl	%eax, 84(%r13)
	movq	_sdma_desct_intr@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.16:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_17
	jmp	LBB0_23
LBB0_15:
	movq	_SDMA_DESC_INTR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_23
LBB0_17:
	movl	%r15d, %eax
	shll	$3, %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %r14
	movq	48(%r13), %r13
	imulq	$176, %r12, %rbx
	leaq	(%rbx,%r13), %rdi
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, 168(%r13,%rbx)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 160(%r13,%rbx)
	movl	%r12d, (%r13,%rbx)
	movl	%r15d, 4(%r13,%rbx)
	callq	_sdma_descq_freecnt
	movl	%eax, 152(%r13,%rbx)
	movl	%r15d, %edi
	callq	_ilog2
	movl	%eax, 8(%r13,%rbx)
	movl	$-1, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	notl	%edx
	movl	$1, %eax
	movl	%r12d, %ecx
	shll	%cl, %eax
	movl	%edx, 12(%r13,%rbx)
	movl	%eax, 16(%r13,%rbx)
	movq	_TXE_NUM_SDMA_ENGINES@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ecx
	addl	%r12d, %ecx
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	%eax, 20(%r13,%rbx)
	movl	(%rdx), %ecx
	leal	(%r12,%rcx,2), %ecx
	movl	$1, %edx
	shll	%cl, %edx
	movl	%edx, 24(%r13,%rbx)
	btsl	%r12d, %eax
	btsl	%ecx, %eax
	movl	%eax, 28(%r13,%rbx)
	leaq	(%rbx,%r13), %rdi
	addq	$148, %rdi
	callq	_spin_lock_init
	leaq	(%rbx,%r13), %rdi
	addq	$144, %rdi
	callq	_seqlock_init
	leaq	(%rbx,%r13), %rdi
	addq	$140, %rdi
	callq	_spin_lock_init
	leaq	(%rbx,%r13), %rdi
	addq	$136, %rdi
	callq	_spin_lock_init
	leaq	(%rbx,%r13), %rdi
	addq	$132, %rdi
	callq	_seqlock_init
	movl	$0, 32(%r13,%rbx)
	movq	_sdma_state_s00_hw_down@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_sdma_set_state
	leaq	(%rbx,%r13), %r15
	addq	$124, %r15
	leaq	(%rbx,%r13), %rdi
	addq	$128, %rdi
	callq	_kref_init
	movq	%r15, %rdi
	callq	_init_completion
	leaq	(%rbx,%r13), %rdi
	addq	$120, %rdi
	callq	_INIT_LIST_HEAD
	leaq	(%rbx,%r13), %rdi
	addq	$116, %rdi
	callq	_INIT_LIST_HEAD
	movq	_TAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SD
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_get_kctxt_csr_addr
	movl	%eax, 112(%r13,%rbx)
	leaq	(%rbx,%r13), %rdi
	addq	$108, %rdi
	movq	_sdma_hw_clean_up_task@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_tasklet_init
	leaq	(%rbx,%r13), %rdi
	addq	$104, %rdi
	movq	_sdma_sw_clean_up_task@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_tasklet_init
	leaq	(%rbx,%r13), %rdi
	addq	$100, %rdi
	movq	_sdma_err_halt_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	(%rbx,%r13), %rdi
	addq	$96, %rdi
	movq	_sdma_field_flush@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	$0, 88(%r13,%rbx)
	leaq	(%rbx,%r13), %rdi
	addq	$80, %rdi
	movq	_sdma_err_progress_check@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
	movq	72(%r14), %rdi
	leaq	(%rbx,%r13), %rdx
	addq	$72, %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	callq	_dma_alloc_coherent
	movq	%rax, 64(%r13,%rbx)
	testq	%rax, %rax
	je	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	$8, %esi
	callq	_array_size
	movl	(%r15), %esi
	movq	%r14, %r15
	movl	80(%r14), %edx
	movl	%eax, %edi
	callq	_kvzalloc_node
	movl	%eax, 56(%r13,%rbx)
	testl	%eax, %eax
	je	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_19 Depth=1
	incl	%r12d
	cmpq	%r12, -48(%rbp)                 ## 8-byte Folded Reload
	movq	%r15, %r13
	movl	-56(%rbp), %r15d                ## 4-byte Reload
	ja	LBB0_19
LBB0_23:
	movq	_L1_CACHE_BYTES@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	imulq	-48(%rbp), %rsi                 ## 8-byte Folded Reload
	movq	%rsi, (%r13)
	movq	72(%r13), %rdi
	leaq	32(%r13), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_dma_alloc_coherent
	movq	%rax, 40(%r13)
	testq	%rax, %rax
	je	LBB0_24
## %bb.25:
	movq	72(%r13), %rdi
	movq	_SDMA_PAD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	64(%r13), %rdx
	movl	(%rbx), %ecx
	callq	_dma_alloc_coherent
	movq	%rax, 56(%r13)
	testq	%rax, %rax
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	je	LBB0_26
## %bb.27:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_31
## %bb.28:
	movq	40(%r13), %rax
	xorl	%ebx, %ebx
	movq	%rax, %r15
	.p2align	4, 0x90
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movq	48(%r13), %rcx
	imulq	$176, %rbx, %rdx
	leaq	(%rcx,%rdx), %rdi
	movq	%r15, 48(%rcx,%rdx)
	movq	(%r14), %r12
	movq	%r15, %rsi
	subq	%rax, %rsi
	addq	32(%r13), %rsi
	movq	%rsi, 40(%rcx,%rdx)
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_init_sdma_regs
	incl	%ebx
	cmpq	%rbx, -48(%rbp)                 ## 8-byte Folded Reload
	jbe	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	addq	%r12, %r15
	movq	40(%r13), %rax
	jmp	LBB0_29
LBB0_31:
	movq	_HFI1_HAS_SEND_DMA@GOTPCREL(%rip), %rcx
	movl	24(%r13), %eax
	orl	(%rcx), %eax
	movl	$0, %ecx
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_33
## %bb.32:
	movq	_HFI1_HAS_SDMA_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_33:
	orl	%eax, %ecx
	movl	%ecx, 24(%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r13)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	xorl	%ecx, %ecx
	callq	_sdma_map_init
	testl	%eax, %eax
	movq	_ENOMEM@GOTPCREL(%rip), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	js	LBB0_34
## %bb.35:
	movl	(%rcx), %esi
	movl	$4, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_36
## %bb.37:
	movq	%rax, %r14
	movq	_sdma_rht_params@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	callq	_rhashtable_init
	testl	%eax, %eax
	js	LBB0_38
## %bb.41:
	movq	%r14, 16(%r13)
	movq	8(%r13), %rdx
	leaq	L_.str.6(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dd_dev_info
	jmp	LBB0_40
LBB0_20:
	movq	%r14, %r13
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_39
LBB0_24:
	leaq	L_.str.4(%rip), %rsi
	movq	%r13, %rdi
	callq	_dd_dev_err
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_39
LBB0_22:
	movq	%r15, %r13
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_39
LBB0_26:
	leaq	L_.str.5(%rip), %rsi
	movq	%r13, %rdi
	callq	_dd_dev_err
	jmp	LBB0_39
LBB0_34:
	movl	%eax, %ebx
	jmp	LBB0_39
LBB0_36:
	xorl	%eax, %eax
	subl	(%rbx), %eax
	movl	%eax, %ebx
	jmp	LBB0_39
LBB0_38:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_kfree
LBB0_39:
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_sdma_clean
	movl	%ebx, %r14d
LBB0_40:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sdma_idle_cnt,8,3              ## @sdma_idle_cnt
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SDMA,4,2                       ## @SDMA
	.comm	_SDMA_AHG,4,2                   ## @SDMA_AHG
	.comm	_mod_num_sdma,8,3               ## @mod_num_sdma
	.comm	_num_vls,8,3                    ## @num_vls
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SDMA mod_num_sdma: %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"SDMA chip_sdma_engines: %u\n"

L_.str.2:                               ## @.str.2
	.asciz	"SDMA chip_sdma_mem_size: %u\n"

	.comm	_SDMA_BLOCK_SIZE,8,3            ## @SDMA_BLOCK_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"SDMA engines %zu descq_cnt %u\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_SDMA_DESC1_HEAD_TO_HOST_FLAG,4,2 ## @SDMA_DESC1_HEAD_TO_HOST_FLAG
	.comm	_SDMA_DESC1_INT_REQ_FLAG,4,2    ## @SDMA_DESC1_INT_REQ_FLAG
	.comm	_sdma_desct_intr,8,3            ## @sdma_desct_intr
	.comm	_SDMA_DESC_INTR,8,3             ## @SDMA_DESC_INTR
	.comm	_TXE_NUM_SDMA_ENGINES,4,2       ## @TXE_NUM_SDMA_ENGINES
	.comm	_sdma_state_s00_hw_down,4,2     ## @sdma_state_s00_hw_down
	.comm	_TAIL,4,2                       ## @TAIL
	.comm	_sdma_hw_clean_up_task,4,2      ## @sdma_hw_clean_up_task
	.comm	_sdma_sw_clean_up_task,4,2      ## @sdma_sw_clean_up_task
	.comm	_sdma_err_halt_wait,4,2         ## @sdma_err_halt_wait
	.comm	_sdma_field_flush,4,2           ## @sdma_field_flush
	.comm	_sdma_err_progress_check,4,2    ## @sdma_err_progress_check
	.comm	_L1_CACHE_BYTES,8,3             ## @L1_CACHE_BYTES
L_.str.4:                               ## @.str.4
	.asciz	"failed to allocate SendDMA head memory\n"

	.comm	_SDMA_PAD,4,2                   ## @SDMA_PAD
L_.str.5:                               ## @.str.5
	.asciz	"failed to allocate SendDMA pad memory\n"

	.comm	_HFI1_HAS_SEND_DMA,4,2          ## @HFI1_HAS_SEND_DMA
	.comm	_HFI1_HAS_SDMA_TIMEOUT,4,2      ## @HFI1_HAS_SDMA_TIMEOUT
	.comm	_sdma_rht_params,4,2            ## @sdma_rht_params
L_.str.6:                               ## @.str.6
	.asciz	"SDMA num_sdma: %u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdma_init                      ; -- Begin function sdma_init
	.p2align	2
_sdma_init:                             ; @sdma_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x26, x1
	mov	x19, x0
	ldr	x21, [x0, #96]
Lloh0:
	adrp	x8, _sdma_idle_cnt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sdma_idle_cnt@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
	bl	_chip_sdma_engines
	mov	x20, x0
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
Lloh6:
	adrp	x8, _SDMA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDMA@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_HFI1_CAP_IS_KSET
	cbz	w0, LBB0_4
; %bb.1:
	neg	w27, w22
Lloh9:
	adrp	x24, _mod_num_sdma@GOTPAGE
Lloh10:
	ldr	x24, [x24, _mod_num_sdma@GOTPAGEOFF]
	ldr	x22, [x24]
	cbz	x22, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_chip_sdma_engines
	ldr	x2, [x24]
	cmp	x22, x0
	b.hi	LBB0_6
; %bb.3:
Lloh11:
	adrp	x8, _num_vls@GOTPAGE
Lloh12:
	ldr	x8, [x8, _num_vls@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x2, x8
	csel	x20, x20, x2, lo
	b	LBB0_6
LBB0_4:
Lloh14:
	adrp	x8, _SDMA_AHG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SDMA_AHG@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_HFI1_CAP_CLEAR
	mov	w27, #0
	b	LBB0_29
LBB0_5:
	mov	x2, #0
LBB0_6:
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dd_dev_info
	mov	x0, x19
	bl	_chip_sdma_engines
	mov	x2, x0
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dd_dev_info
	mov	x0, x19
	bl	_chip_sdma_mem_size
	mov	x2, x0
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dd_dev_info
	mov	x0, x19
	bl	_chip_sdma_mem_size
	mov	x22, x0
Lloh23:
	adrp	x8, _SDMA_BLOCK_SIZE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SDMA_BLOCK_SIZE@GOTPAGEOFF]
Lloh25:
	ldr	x24, [x8]
	add	x0, x19, #92
	bl	_init_waitqueue_head
	add	x0, x19, #88
	mov	w1, #0
	bl	_atomic_set
	bl	_sdma_get_descq_cnt
	mov	x25, x0
	str	x25, [sp]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dd_dev_info
Lloh28:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	ldr	w3, [x19, #80]
	mov	x0, x20
	mov	w1, #176
	bl	_kcalloc_node
	str	x0, [x19, #48]
	cbz	x0, LBB0_29
; %bb.7:
	stp	x24, x22, [sp, #8]              ; 16-byte Folded Spill
	stp	w26, w27, [sp, #32]             ; 8-byte Folded Spill
	add	x8, x21, w26, sxtw #2
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
	mov	x0, x19
	mov	x1, x23
	bl	_ns_to_cclock
Lloh31:
	adrp	x8, _SDMA_DESC1_INT_REQ_FLAG@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SDMA_DESC1_INT_REQ_FLAG@GOTPAGEOFF]
Lloh33:
	adrp	x9, _SDMA_DESC1_HEAD_TO_HOST_FLAG@GOTPAGE
Lloh34:
	ldr	x9, [x9, _SDMA_DESC1_HEAD_TO_HOST_FLAG@GOTPAGEOFF]
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x19, #84]
Lloh35:
	adrp	x8, _sdma_desct_intr@GOTPAGE
Lloh36:
	ldr	x8, [x8, _sdma_desct_intr@GOTPAGEOFF]
	ldr	x9, [x8]
	cbnz	x9, LBB0_9
; %bb.8:
Lloh37:
	adrp	x9, _SDMA_DESC_INTR@GOTPAGE
Lloh38:
	ldr	x9, [x9, _SDMA_DESC_INTR@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	str	x9, [x8]
LBB0_9:
Lloh40:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh41:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	cbz	x20, LBB0_14
; %bb.10:
	mov	x26, #0
	lsl	w27, w25, #3
	mov	w8, #176
	mov	w24, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x19, #48]
	madd	x28, x26, x8, x22
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	stp	x8, x19, [x28, #160]
	stp	w26, w25, [x28]
	mov	x0, x28
	mov	w21, #176
	bl	_sdma_descq_freecnt
	str	w0, [x28, #152]
	mov	x0, x25
	bl	_ilog2
	mov	w8, #-1
	lsl	w8, w8, w0
	mvn	w8, w8
	stp	w0, w8, [x28, #8]
	lsl	w8, w24, w26
	str	w8, [x28, #16]
Lloh42:
	adrp	x10, _TXE_NUM_SDMA_ENGINES@GOTPAGE
Lloh43:
	ldr	x10, [x10, _TXE_NUM_SDMA_ENGINES@GOTPAGEOFF]
	ldr	w9, [x10]
	add	w9, w9, w26
	lsl	w9, w24, w9
	str	w9, [x28, #20]
	ldr	w10, [x10]
	add	w10, w26, w10, lsl #1
	lsl	w10, w24, w10
	orr	w8, w9, w8
	orr	w8, w8, w10
	stp	w10, w8, [x28, #24]
	add	x0, x28, #148
	bl	_spin_lock_init
	add	x0, x28, #144
	bl	_seqlock_init
	add	x0, x28, #140
	bl	_spin_lock_init
	add	x0, x28, #136
	bl	_spin_lock_init
	add	x0, x28, #132
	bl	_seqlock_init
	str	wzr, [x28, #32]
Lloh44:
	adrp	x8, _sdma_state_s00_hw_down@GOTPAGE
Lloh45:
	ldr	x8, [x8, _sdma_state_s00_hw_down@GOTPAGEOFF]
Lloh46:
	ldr	w1, [x8]
	mov	x0, x28
	bl	_sdma_set_state
	add	x23, x28, #124
	add	x0, x28, #128
	bl	_kref_init
	mov	x0, x23
Lloh47:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh48:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	bl	_init_completion
	add	x0, x28, #120
	bl	_INIT_LIST_HEAD
	add	x0, x28, #116
	bl	_INIT_LIST_HEAD
Lloh49:
	adrp	x8, _TAIL@GOTPAGE
Lloh50:
	ldr	x8, [x8, _TAIL@GOTPAGEOFF]
Lloh51:
	ldr	w0, [x8]
	bl	_SD
	mov	x2, x0
	mov	x0, x19
	mov	x1, x26
	bl	_get_kctxt_csr_addr
	str	w0, [x28, #112]
	add	x0, x28, #108
Lloh52:
	adrp	x8, _sdma_hw_clean_up_task@GOTPAGE
Lloh53:
	ldr	x8, [x8, _sdma_hw_clean_up_task@GOTPAGEOFF]
Lloh54:
	ldr	w1, [x8]
	mov	x2, x28
	bl	_tasklet_init
	add	x0, x28, #104
Lloh55:
	adrp	x8, _sdma_sw_clean_up_task@GOTPAGE
Lloh56:
	ldr	x8, [x8, _sdma_sw_clean_up_task@GOTPAGEOFF]
Lloh57:
	ldr	w1, [x8]
	mov	x2, x28
	bl	_tasklet_init
	add	x0, x28, #100
Lloh58:
	adrp	x8, _sdma_err_halt_wait@GOTPAGE
Lloh59:
	ldr	x8, [x8, _sdma_err_halt_wait@GOTPAGEOFF]
Lloh60:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x28, #96
Lloh61:
	adrp	x8, _sdma_field_flush@GOTPAGE
Lloh62:
	ldr	x8, [x8, _sdma_field_flush@GOTPAGEOFF]
Lloh63:
	ldr	w1, [x8]
	bl	_INIT_WORK
	str	xzr, [x28, #88]
	add	x0, x28, #80
Lloh64:
	adrp	x8, _sdma_err_progress_check@GOTPAGE
Lloh65:
	ldr	x8, [x8, _sdma_err_progress_check@GOTPAGEOFF]
Lloh66:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
	ldr	x0, [x19, #72]
	add	x2, x28, #72
	ldr	w3, [x23]
	mov	x1, x27
	bl	_dma_alloc_coherent
	str	x0, [x28, #64]
	cbz	x0, LBB0_20
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x25
	mov	w1, #8
	bl	_array_size
	ldr	w1, [x23]
	ldr	w2, [x19, #80]
	bl	_kvzalloc_node
	madd	x8, x26, x21, x22
	str	w0, [x8, #56]
	mov	w8, #176
	cbz	w0, LBB0_20
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	add	w26, w26, #1
	cmp	x20, x26
	b.hi	LBB0_11
LBB0_14:
Lloh67:
	adrp	x21, _L1_CACHE_BYTES@GOTPAGE
Lloh68:
	ldr	x21, [x21, _L1_CACHE_BYTES@GOTPAGEOFF]
	ldr	x8, [x21]
	mul	x1, x8, x20
	str	x1, [x19]
	ldr	x0, [x19, #72]
	add	x2, x19, #32
	ldr	w3, [x23]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_dma_alloc_coherent
	str	x0, [x19, #40]
	ldr	w27, [sp, #36]                  ; 4-byte Folded Reload
	cbz	x0, LBB0_25
; %bb.15:
	ldr	x0, [x19, #72]
Lloh69:
	adrp	x8, _SDMA_PAD@GOTPAGE
Lloh70:
	ldr	x8, [x8, _SDMA_PAD@GOTPAGEOFF]
Lloh71:
	ldr	w1, [x8]
	add	x2, x19, #64
	ldr	w3, [x23]
	bl	_dma_alloc_coherent
	str	x0, [x19, #56]
	cbz	x0, LBB0_26
; %bb.16:
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
	cbz	x20, LBB0_21
; %bb.17:
	mov	x23, #0
	ldp	x8, x10, [sp, #8]               ; 16-byte Folded Reload
	mul	x9, x8, x20
	ldr	x8, [x19, #40]
	mov	w24, #176
	mov	x25, x8
	udiv	x22, x10, x9
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #48]
	madd	x0, x23, x24, x9
	ldr	x26, [x21]
	ldr	x9, [x19, #32]
	sub	x8, x25, x8
	add	x8, x8, x9
	stp	x8, x25, [x0, #40]
	mov	x1, x22
	mov	x2, x27
	bl	_init_sdma_regs
	add	w23, w23, #1
	cmp	x20, x23
	b.ls	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	add	x25, x25, x26
	ldr	x8, [x19, #40]
	b	LBB0_18
LBB0_20:
	ldr	w27, [sp, #36]                  ; 4-byte Folded Reload
	b	LBB0_28
LBB0_21:
Lloh72:
	adrp	x8, _HFI1_HAS_SEND_DMA@GOTPAGE
Lloh73:
	ldr	x8, [x8, _HFI1_HAS_SEND_DMA@GOTPAGEOFF]
Lloh74:
	ldr	w8, [x8]
	ldr	w9, [x19, #24]
	orr	w8, w9, w8
Lloh75:
	adrp	x9, _HFI1_HAS_SDMA_TIMEOUT@GOTPAGE
Lloh76:
	ldr	x9, [x9, _HFI1_HAS_SDMA_TIMEOUT@GOTPAGEOFF]
Lloh77:
	ldr	w9, [x9]
	cmp	x27, #0
	csel	w9, wzr, w9, eq
	orr	w8, w9, w8
	str	w8, [x19, #24]
	str	x20, [x19, #8]
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	ldr	w2, [x8]
	mov	x0, x19
	ldr	w1, [sp, #32]                   ; 4-byte Folded Reload
	mov	x3, #0
	bl	_sdma_map_init
	tbnz	w0, #31, LBB0_30
; %bb.22:
Lloh78:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh79:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh80:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	cbz	x0, LBB0_31
; %bb.23:
	mov	x21, x0
Lloh81:
	adrp	x1, _sdma_rht_params@GOTPAGE
Lloh82:
	ldr	x1, [x1, _sdma_rht_params@GOTPAGEOFF]
	bl	_rhashtable_init
	tbnz	w0, #31, LBB0_32
; %bb.24:
	str	x21, [x19, #16]
	ldr	x2, [x19, #8]
Lloh83:
	adrp	x1, l_.str.6@PAGE
Lloh84:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dd_dev_info
	mov	w27, #0
	b	LBB0_29
LBB0_25:
Lloh85:
	adrp	x1, l_.str.4@PAGE
Lloh86:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_27
LBB0_26:
Lloh87:
	adrp	x1, l_.str.5@PAGE
Lloh88:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_27:
	mov	x0, x19
	bl	_dd_dev_err
LBB0_28:
	mov	x0, x19
	mov	x1, x20
	bl	_sdma_clean
LBB0_29:
	mov	x0, x27
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_30:
	mov	x27, x0
	b	LBB0_28
LBB0_31:
Lloh89:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh90:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh91:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_28
LBB0_32:
	mov	x27, x0
	mov	x0, x21
	bl	_kfree
	b	LBB0_28
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGot	Lloh81, Lloh82
	.loh AdrpAdd	Lloh83, Lloh84
	.loh AdrpAdd	Lloh85, Lloh86
	.loh AdrpAdd	Lloh87, Lloh88
	.loh AdrpLdrGotLdr	Lloh89, Lloh90, Lloh91
	.cfi_endproc
                                        ; -- End function
	.comm	_sdma_idle_cnt,8,3              ; @sdma_idle_cnt
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SDMA,4,2                       ; @SDMA
	.comm	_SDMA_AHG,4,2                   ; @SDMA_AHG
	.comm	_mod_num_sdma,8,3               ; @mod_num_sdma
	.comm	_num_vls,8,3                    ; @num_vls
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SDMA mod_num_sdma: %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"SDMA chip_sdma_engines: %u\n"

l_.str.2:                               ; @.str.2
	.asciz	"SDMA chip_sdma_mem_size: %u\n"

	.comm	_SDMA_BLOCK_SIZE,8,3            ; @SDMA_BLOCK_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"SDMA engines %zu descq_cnt %u\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_SDMA_DESC1_HEAD_TO_HOST_FLAG,4,2 ; @SDMA_DESC1_HEAD_TO_HOST_FLAG
	.comm	_SDMA_DESC1_INT_REQ_FLAG,4,2    ; @SDMA_DESC1_INT_REQ_FLAG
	.comm	_sdma_desct_intr,8,3            ; @sdma_desct_intr
	.comm	_SDMA_DESC_INTR,8,3             ; @SDMA_DESC_INTR
	.comm	_TXE_NUM_SDMA_ENGINES,4,2       ; @TXE_NUM_SDMA_ENGINES
	.comm	_sdma_state_s00_hw_down,4,2     ; @sdma_state_s00_hw_down
	.comm	_TAIL,4,2                       ; @TAIL
	.comm	_sdma_hw_clean_up_task,4,2      ; @sdma_hw_clean_up_task
	.comm	_sdma_sw_clean_up_task,4,2      ; @sdma_sw_clean_up_task
	.comm	_sdma_err_halt_wait,4,2         ; @sdma_err_halt_wait
	.comm	_sdma_field_flush,4,2           ; @sdma_field_flush
	.comm	_sdma_err_progress_check,4,2    ; @sdma_err_progress_check
	.comm	_L1_CACHE_BYTES,8,3             ; @L1_CACHE_BYTES
l_.str.4:                               ; @.str.4
	.asciz	"failed to allocate SendDMA head memory\n"

	.comm	_SDMA_PAD,4,2                   ; @SDMA_PAD
l_.str.5:                               ; @.str.5
	.asciz	"failed to allocate SendDMA pad memory\n"

	.comm	_HFI1_HAS_SEND_DMA,4,2          ; @HFI1_HAS_SEND_DMA
	.comm	_HFI1_HAS_SDMA_TIMEOUT,4,2      ; @HFI1_HAS_SDMA_TIMEOUT
	.comm	_sdma_rht_params,4,2            ; @sdma_rht_params
l_.str.6:                               ; @.str.6
	.asciz	"SDMA num_sdma: %u\n"

.subsections_via_symbols
