	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_sd_direct
_add_sd_direct:                         ## @add_sd_direct
	.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	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	32(%rdx), %r12
	movq	16(%rdx), %r13
	cmpl	$0, 8(%r13)
	je	LBB0_1
LBB0_4:
	movl	4(%rbx), %eax
	movq	_I40IW_HMC_PAGED_BP_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	(%rbx), %r8d
	shll	%cl, %r8d
	movl	%r8d, (%r12)
	movslq	%eax, %r9
	shlq	$2, %r9
	addq	(%r13), %r9
	movq	%r9, 8(%r12)
	movl	(%r14), %eax
	movl	%eax, 4(%r12)
	movq	_I40IW_DEBUG_PBLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%r8d, %ecx
	callq	_i40iw_debug
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpq	$0, 8(%r15)
	je	LBB0_4
## %bb.2:
	movq	24(%rbx), %rsi
	movl	(%r15), %edi
	movl	8(%rbx), %edx
	movq	_I40IW_SD_TYPE_DIRECT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_I40IW_HMC_DIRECT_BP_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	callq	_i40iw_add_sd_table_entry
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movq	_I40IW_DMA_COHERENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_I40IW_SD_TYPE_DIRECT,4,2       ## @I40IW_SD_TYPE_DIRECT
	.comm	_I40IW_HMC_DIRECT_BP_SIZE,4,2   ## @I40IW_HMC_DIRECT_BP_SIZE
	.comm	_I40IW_DMA_COHERENT,4,2         ## @I40IW_DMA_COHERENT
	.comm	_I40IW_HMC_PAGED_BP_SHIFT,4,2   ## @I40IW_HMC_PAGED_BP_SHIFT
	.comm	_I40IW_DEBUG_PBLE,4,2           ## @I40IW_DEBUG_PBLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chunk_size[%d] = 0x%x vaddr=%p fpm_addr = %llx\n"

	.no_dead_strip	_add_sd_direct
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_sd_direct
_add_sd_direct:                         ; @add_sd_direct
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x2, #32]
	ldr	x23, [x2, #16]
	ldr	w8, [x23, #8]
	cbz	w8, LBB0_3
LBB0_1:
Lloh0:
	adrp	x8, _I40IW_HMC_PAGED_BP_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I40IW_HMC_PAGED_BP_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w10, w9, [x21]
	lsl	w9, w9, w8
	lsl	w3, w10, w8
	ldr	x8, [x23]
	add	x5, x8, w9, sxtw #2
	str	x5, [x22, #8]
	ldr	w6, [x20]
	stp	w3, w6, [x22]
Lloh3:
	adrp	x8, _I40IW_DEBUG_PBLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I40IW_DEBUG_PBLE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x4, x3
	bl	_i40iw_debug
	mov	w0, #0
LBB0_2:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_1
; %bb.4:
	ldr	x1, [x21, #24]
	ldr	w0, [x19]
	ldr	w2, [x21, #8]
Lloh8:
	adrp	x8, _I40IW_SD_TYPE_DIRECT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I40IW_SD_TYPE_DIRECT@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
Lloh11:
	adrp	x8, _I40IW_HMC_DIRECT_BP_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I40IW_HMC_DIRECT_BP_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x8]
	bl	_i40iw_add_sd_table_entry
	cbnz	w0, LBB0_2
; %bb.5:
Lloh14:
	adrp	x8, _I40IW_DMA_COHERENT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _I40IW_DMA_COHERENT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x22, #16]
	b	LBB0_1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_I40IW_SD_TYPE_DIRECT,4,2       ; @I40IW_SD_TYPE_DIRECT
	.comm	_I40IW_HMC_DIRECT_BP_SIZE,4,2   ; @I40IW_HMC_DIRECT_BP_SIZE
	.comm	_I40IW_DMA_COHERENT,4,2         ; @I40IW_DMA_COHERENT
	.comm	_I40IW_HMC_PAGED_BP_SHIFT,4,2   ; @I40IW_HMC_PAGED_BP_SHIFT
	.comm	_I40IW_DEBUG_PBLE,4,2           ; @I40IW_DEBUG_PBLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chunk_size[%d] = 0x%x vaddr=%p fpm_addr = %llx\n"

	.no_dead_strip	_add_sd_direct
.subsections_via_symbols
