	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d40_log_lli_to_lcxa
_d40_log_lli_to_lcxa:                   ## @d40_log_lli_to_lcxa
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rcx
	movslq	(%rsi), %r15
	testq	%r15, %r15
	sete	%al
	movl	4(%rsi), %r14d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	8(%rsi), %edx
	movq	_EINVAL@GOTPCREL(%rip), %rsi
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	xorl	%r9d, %r9d
	subl	(%rsi), %r9d
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	8(%rcx), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -72(%rbp)                 ## 4-byte Spill
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	setne	%cl
	andb	%al, %cl
	movb	%cl, -41(%rbp)                  ## 1-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_2
## %bb.1:
	movl	%r14d, %eax
	subl	%r15d, %eax
	cmpl	$2, %eax
	jl	LBB0_5
LBB0_2:
	movq	16(%rdi), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_4
## %bb.3:
	movq	24(%rdi), %rax
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rcx
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	cmpq	(%rcx), %rax
	je	LBB0_5
LBB0_4:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_d40_lcla_alloc_one
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %r9d
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
LBB0_5:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	cmpb	$0, -41(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_7
## %bb.6:
	cmpl	%eax, %r9d
	jne	LBB0_10
LBB0_7:
	xorl	%r8d, %r8d
	cmpl	%eax, %r9d
	jne	LBB0_9
## %bb.8:
	movq	_LLI_TERM_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
LBB0_9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	movq	%r15, %rdx
	shlq	$2, %rdx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rsi
	addq	%rdx, %rsi
	addq	16(%rax), %rdx
	movl	%r9d, %ecx
	movl	%r9d, %ebx
	callq	_d40_log_lli_lcpa_write
	movl	%ebx, %r9d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leal	1(%r15), %r13d
LBB0_10:
	testl	%r9d, %r9d
	js	LBB0_27
## %bb.11:
	cmpl	%r14d, %r13d
	jge	LBB0_27
## %bb.12:
	movslq	%r14d, %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movslq	%r13d, %r13
	leaq	(,%r13,4), %r12
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	movl	%r14d, %eax
	negl	%eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	incq	%r13
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%rdi), %rax
	movl	(%rax), %eax
	shll	$10, %eax
	movl	%r9d, %r14d
	shll	$4, %r14d
	addl	%eax, %r14d
	leaq	(,%r14,4), %r15
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	addq	24(%rax), %r15
	cmpq	-112(%rbp), %r13                ## 8-byte Folded Reload
	jge	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%r9d, %ebx
	callq	_d40_lcla_alloc_one
	movl	%ebx, %r9d
	movl	%eax, %ebx
	cmpl	$0, -76(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_18
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	xorl	%ebx, %ebx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	cmpb	$0, -41(%rbp)                   ## 1-byte Folded Reload
	cmovnel	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	cmpl	$0, -76(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_18
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	xorl	%r8d, %r8d
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_19
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	_LLI_TERM_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	cmpl	-48(%rbp), %r9d                 ## 4-byte Folded Reload
	sete	%al
	andb	-41(%rbp), %al                  ## 1-byte Folded Reload
	cmpb	$1, %al
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rsi
	addq	%r12, %rsi
	movq	16(%rax), %rdx
	addq	%r12, %rdx
	movl	%ebx, %ecx
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	movl	%r8d, %r13d
	callq	_d40_log_lli_lcpa_write
	movl	%r13d, %r8d
	movq	-96(%rbp), %r13                 ## 8-byte Reload
LBB0_21:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rsi
	addq	%r12, %rsi
	movq	16(%rax), %rdx
	addq	%r12, %rdx
	movq	%r15, %rdi
	movl	%ebx, %ecx
	callq	_d40_log_lli_lcla_write
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r14d, %edx
	movl	$8, %ecx
	callq	_dma_sync_single_range_for_device
LBB0_23:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	-48(%rbp), %ebx                 ## 4-byte Folded Reload
	je	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_13 Depth=1
	incq	%r13
	addq	$4, %r12
	movq	-104(%rbp), %rax                ## 8-byte Reload
	addl	%r13d, %eax
	movl	%ebx, %r9d
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.26:
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r13d
LBB0_27:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, (%rax)
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DMA_DEV_TO_MEM,8,3             ## @DMA_DEV_TO_MEM
	.comm	_LLI_TERM_INT,4,2               ## @LLI_TERM_INT
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.no_dead_strip	_d40_log_lli_to_lcxa
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d40_log_lli_to_lcxa
_d40_log_lli_to_lcxa:                   ; @d40_log_lli_to_lcxa
	.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	x19, x1
	mov	x24, x0
	ldr	x9, [x0]
	ldp	w23, w21, [x1]
                                        ; kill: def $w23 killed $w23 def $x23
	sxtw	x23, w23
	ldr	w10, [x1, #8]
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	str	x9, [sp, #24]                   ; 8-byte Folded Spill
	ldr	x8, [x9, #8]
	ldr	w8, [x8]
	stp	w8, w10, [sp, #16]              ; 8-byte Folded Spill
	cmp	w10, #0
	ccmp	x23, #0, #0, ne
	cset	w8, eq
	str	w8, [sp, #40]                   ; 4-byte Folded Spill
	b.eq	LBB0_3
; %bb.1:
	sub	w8, w21, w23
	cmp	w8, #2
	b.ge	LBB0_3
; %bb.2:
	str	wzr, [sp, #44]                  ; 4-byte Folded Spill
	b	LBB0_6
LBB0_3:
	ldr	x8, [x24, #16]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x24, #24]
Lloh3:
	adrp	x9, _DMA_DEV_TO_MEM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	str	w22, [sp, #44]                  ; 4-byte Folded Spill
	cmp	x8, x9
	b.eq	LBB0_6
LBB0_5:
	mov	x0, x24
	mov	x1, x19
	bl	_d40_lcla_alloc_one
	mov	x22, x0
	str	w0, [sp, #44]                   ; 4-byte Folded Spill
LBB0_6:
	mov	w26, #0
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w8, w8
	ldr	w9, [sp, #40]                   ; 4-byte Folded Reload
	cmp	w9, #0
	ccmp	w22, w8, #4, ne
	b.ne	LBB0_8
; %bb.7:
Lloh9:
	adrp	x9, _LLI_TERM_INT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LLI_TERM_INT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w22, w8
	csel	w4, w9, wzr, eq
	ldr	w0, [x24, #8]
	lsl	x8, x23, #2
	ldp	x10, x9, [x19, #16]
	add	x1, x9, x8
	add	x2, x10, x8
	mov	x3, x22
	bl	_d40_log_lli_lcpa_write
	add	w26, w23, #1
LBB0_8:
	tbnz	w22, #31, LBB0_24
; %bb.9:
	cmp	w26, w21
	b.ge	LBB0_24
; %bb.10:
	sxtw	x8, w21
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	sxtw	x8, w26
	sbfiz	x25, x26, #2, #32
	add	x27, x8, #1
	str	x24, [sp, #32]                  ; 8-byte Folded Spill
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #16]
	ldr	w20, [x8]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	x28, [x8, #24]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cmp	x27, x8
	b.ge	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x24
	mov	x1, x19
	bl	_d40_lcla_alloc_one
	mov	x23, x0
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_15
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=1
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [sp, #40]                   ; 4-byte Folded Reload
	cmp	w9, #0
	ldr	w9, [sp, #44]                   ; 4-byte Folded Reload
	csneg	w23, w9, w8, ne
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmn	w23, w8
	b.ne	LBB0_22
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
Lloh18:
	adrp	x8, _LLI_TERM_INT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LLI_TERM_INT@GOTPAGEOFF]
Lloh20:
	ldr	w24, [x8]
LBB0_16:                                ;   in Loop: Header=BB0_11 Depth=1
	ldp	w9, w8, [sp, #40]               ; 8-byte Folded Reload
	cmp	w22, w8
	cset	w8, eq
	and	w8, w9, w8
	cmp	w8, #1
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldr	w0, [x8, #8]
	ldp	x9, x8, [x19, #16]
	add	x1, x8, x25
	add	x2, x9, x25
	mov	x3, x23
	mov	x4, x24
	bl	_d40_log_lli_lcpa_write
LBB0_18:                                ;   in Loop: Header=BB0_11 Depth=1
	lsl	w8, w20, #10
	add	w22, w8, w22, lsl #4
	add	x0, x28, w22, uxtw #2
	ldp	x9, x8, [x19, #16]
	add	x1, x8, x25
	add	x2, x9, x25
	mov	x3, x23
	mov	x4, x24
	bl	_d40_log_lli_lcla_write
	ldr	x24, [sp, #32]                  ; 8-byte Folded Reload
	ldr	w8, [sp, #16]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x24]
	ldr	w0, [x8]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w1, [x8, #16]
Lloh21:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh23:
	ldr	w4, [x8]
	mov	x2, x22
	mov	w3, #8
	bl	_dma_sync_single_range_for_device
LBB0_20:                                ;   in Loop: Header=BB0_11 Depth=1
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmn	w23, w8
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	add	w26, w26, #1
	ccmp	w23, w8, #4, ne
	b.eq	LBB0_24
; %bb.21:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x25, x25, #4
	add	x27, x27, #1
	mov	x22, x23
	cmp	w21, w26
	b.ne	LBB0_11
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	w24, #0
	b	LBB0_16
LBB0_23:
	mov	x26, x21
LBB0_24:
	str	w26, [x19]
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DMA_DEV_TO_MEM,8,3             ; @DMA_DEV_TO_MEM
	.comm	_LLI_TERM_INT,4,2               ; @LLI_TERM_INT
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_d40_log_lli_to_lcxa
.subsections_via_symbols
