	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function g2d_init_cmdlist
_g2d_init_cmdlist:                      ## @g2d_init_cmdlist
	.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, %r15
	movq	32(%rdi), %r12
	movq	_DMA_ATTR_WRITE_COMBINE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdi)
	movl	24(%rdi), %edi
	callq	_to_dma_dev
	movq	_G2D_CMDLIST_POOL_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	8(%r15), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movl	(%r15), %r8d
	movl	%eax, %edi
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	callq	_dma_alloc_attrs
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_G2D_CMDLIST_NUM@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	(%rbx), %edx
	movl	$32, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:
	cmpl	$0, (%r12)
	jle	LBB0_9
## %bb.4:
	movq	%rax, %r13
	addq	$28, %r15
	xorl	%ebx, %ebx
	movq	_MAX_REG_TYPE_NR@GOTPCREL(%rip), %r12
	movq	_REG_TYPE_NONE@GOTPCREL(%rip), %r14
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	addq	%r13, %rdi
	movq	%r15, %rsi
	callq	_list_add_tail
	incq	%rbx
	movq	_G2D_CMDLIST_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jge	LBB0_9
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	_G2D_CMDLIST_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movslq	%ebx, %rcx
	imulq	%rax, %rcx
	movq	%rbx, %rdi
	shlq	$5, %rdi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movdqu	(%rax), %xmm0
	movq	%rcx, %xmm1
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	paddq	%xmm0, %xmm1
	movdqu	%xmm1, 16(%r13,%rdi)
	cmpl	$0, (%r12)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r13,%rdi), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r14), %edx
	movl	%edx, (%rax,%rcx,4)
	incq	%rcx
	movl	(%r12), %edx
	cmpq	%rdx, %rcx
	jb	LBB0_7
	jmp	LBB0_8
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movl	24(%r15), %edi
	callq	_to_dma_dev
	movl	(%r14), %esi
	movq	16(%r15), %rdx
	movq	8(%r15), %rcx
	movl	(%r15), %r8d
	movl	%eax, %edi
	callq	_dma_free_attrs
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_ATTR_WRITE_COMBINE,4,2     ## @DMA_ATTR_WRITE_COMBINE
	.comm	_G2D_CMDLIST_POOL_SIZE,4,2      ## @G2D_CMDLIST_POOL_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate dma memory\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_G2D_CMDLIST_NUM,4,2            ## @G2D_CMDLIST_NUM
	.comm	_G2D_CMDLIST_SIZE,4,2           ## @G2D_CMDLIST_SIZE
	.comm	_MAX_REG_TYPE_NR,4,2            ## @MAX_REG_TYPE_NR
	.comm	_REG_TYPE_NONE,4,2              ## @REG_TYPE_NONE
	.no_dead_strip	_g2d_init_cmdlist
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function g2d_init_cmdlist
_g2d_init_cmdlist:                      ; @g2d_init_cmdlist
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	ldr	x21, [x0, #32]
Lloh0:
	adrp	x8, _DMA_ATTR_WRITE_COMBINE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_ATTR_WRITE_COMBINE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0]
	ldr	w0, [x0, #24]
	bl	_to_dma_dev
Lloh3:
	adrp	x23, _G2D_CMDLIST_POOL_SIZE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _G2D_CMDLIST_POOL_SIZE@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x19, x20, #8
Lloh5:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x24]
	ldr	w4, [x20]
	mov	x2, x19
	bl	_dma_alloc_attrs
	str	x0, [x20, #16]
	cbz	x0, LBB0_9
; %bb.1:
Lloh7:
	adrp	x22, _G2D_CMDLIST_NUM@GOTPAGE
Lloh8:
	ldr	x22, [x22, _G2D_CMDLIST_NUM@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w2, [x24]
	mov	w1, #32
	bl	_kcalloc
	cbz	x0, LBB0_10
; %bb.2:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x21, x0
	mov	x23, #0
	add	x20, x20, #28
Lloh9:
	adrp	x24, _G2D_CMDLIST_SIZE@GOTPAGE
Lloh10:
	ldr	x24, [x24, _G2D_CMDLIST_SIZE@GOTPAGEOFF]
Lloh11:
	adrp	x25, _MAX_REG_TYPE_NR@GOTPAGE
Lloh12:
	ldr	x25, [x25, _MAX_REG_TYPE_NR@GOTPAGEOFF]
Lloh13:
	adrp	x26, _REG_TYPE_NONE@GOTPAGE
Lloh14:
	ldr	x26, [x26, _REG_TYPE_NONE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x20
	bl	_list_add_tail
	add	x23, x23, #1
	ldrsw	x8, [x22]
	cmp	x23, x8
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldrsw	x8, [x24]
	sxtw	x9, w23
	mul	x8, x8, x9
	add	x0, x21, x23, lsl #5
	ldr	q0, [x19]
	dup.2d	v1, x8
	add.2d	v0, v0, v1
	str	q0, [x0, #16]
	ldr	w8, [x25]
	cbz	w8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, #0
	ldr	x9, [x0, #8]
LBB0_7:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w10, [x26]
	str	w10, [x9, x8, lsl #2]
	add	x8, x8, #1
	ldr	w10, [x25]
	cmp	x8, x10
	b.lo	LBB0_7
	b	LBB0_4
LBB0_8:
	mov	w19, #0
	b	LBB0_11
LBB0_9:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_11
LBB0_10:
Lloh20:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w19, w8
	ldr	w0, [x20, #24]
	bl	_to_dma_dev
	ldr	w1, [x23]
	ldp	x3, x2, [x20, #8]
	ldr	w4, [x20]
	bl	_dma_free_attrs
LBB0_11:
	mov	x0, 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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_ATTR_WRITE_COMBINE,4,2     ; @DMA_ATTR_WRITE_COMBINE
	.comm	_G2D_CMDLIST_POOL_SIZE,4,2      ; @G2D_CMDLIST_POOL_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate dma memory\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_G2D_CMDLIST_NUM,4,2            ; @G2D_CMDLIST_NUM
	.comm	_G2D_CMDLIST_SIZE,4,2           ; @G2D_CMDLIST_SIZE
	.comm	_MAX_REG_TYPE_NR,4,2            ; @MAX_REG_TYPE_NR
	.comm	_REG_TYPE_NONE,4,2              ; @REG_TYPE_NONE
	.no_dead_strip	_g2d_init_cmdlist
.subsections_via_symbols
