	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_addbufs_fb
_drm_addbufs_fb:                        ## @drm_addbufs_fb
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	32(%rdi), %r15
	movq	_DRIVER_FB_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_drm_core_check_feature
	testl	%eax, %eax
	je	LBB0_17
## %bb.1:
	testq	%r15, %r15
	je	LBB0_17
## %bb.2:
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	(%r14), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	4(%r14), %edi
	callq	_drm_order
	movl	%eax, %r15d
	movl	$1, %ebx
	movl	%r15d, %ecx
	shll	%cl, %ebx
	movq	__DRM_PAGE_ALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ebx, %r13d
	movq	%r14, -128(%rbp)                ## 8-byte Spill
	testl	%eax, 8(%r14)
	je	LBB0_5
## %bb.4:
	movl	%ebx, %edi
	callq	_PAGE_ALIGN
	movl	%eax, %r13d
LBB0_5:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movl	%r15d, %r12d
	subl	(%rax), %r12d
	movl	%r15d, %r14d
	xorl	%r15d, %r15d
	testl	%r12d, %r12d
	cmovlel	%r15d, %r12d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r12d, %ecx
	shll	%cl, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movq	16(%rax), %rax
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	movq	-136(%rbp), %rbx                ## 8-byte Reload
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	leaq	L_.str.4(%rip), %rdi
	movl	%r13d, -64(%rbp)                ## 4-byte Spill
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	leaq	L_.str.5(%rip), %rdi
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	leaq	L_.str.6(%rip), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	_DRM_MIN_ORDER@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jl	LBB0_10
## %bb.6:
	movq	_DRM_MAX_ORDER@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jg	LBB0_10
## %bb.7:
	movl	%r14d, %r12d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	leaq	16(%r14), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock
	cmpq	$0, 24(%r14)
	je	LBB0_11
## %bb.8:
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_9:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_11:
	movq	%r14, %rdi
	callq	_atomic_inc
	movq	%rbx, %rdi
	callq	_spin_unlock
	leaq	4(%r14), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	-104(%rbp), %r13                ## 8-byte Reload
	movq	40(%r13), %rdx
	movl	%r12d, %eax
	movslq	%r12d, %rsi
	shlq	$5, %rsi
	cmpl	$0, (%rdx,%rsi)
	je	LBB0_15
## %bb.12:
	movq	%rbx, %rdi
LBB0_13:
	callq	_mutex_unlock
	movq	%r14, %rdi
LBB0_14:
	callq	_atomic_dec
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_15:
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	$4097, %ecx                     ## imm = 0x1001
	jb	LBB0_21
## %bb.16:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_atomic_dec
LBB0_17:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_18:
	xorl	%r15d, %r15d
LBB0_19:
	subl	(%rax), %r15d
LBB0_20:
	movl	%r15d, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	%ecx, %eax
	shll	$5, %eax
	leal	(%rax,%rax,2), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	%ecx, %ebx
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	movl	(%rax), %esi
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	callq	_kzalloc
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, 24(%rcx,%rdx)
	testq	%rax, %rax
	je	LBB0_27
## %bb.22:
	movq	%rax, %r15
	leaq	(%rcx,%rdx), %rsi
	leaq	(%rcx,%rdx), %rax
	addq	$24, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%rcx,%rdx)
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%rcx,%rdx)
	movl	(%rsi), %eax
	movl	%ebx, %ecx
	xorl	%ebx, %ebx
	cmpl	%ecx, %eax
	jge	LBB0_30
## %bb.23:
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	movslq	%esi, %rcx
	movq	%rcx, -144(%rbp)                ## 8-byte Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r14d, %r14d
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	cltq
	movl	(%r13), %ecx
	addl	%eax, %ecx
	leaq	(%rax,%rax,2), %rbx
	shlq	$5, %rbx
	movl	%ecx, (%r15,%rbx)
	movl	%esi, 4(%r15,%rbx)
	movl	%r12d, 8(%r15,%rbx)
	movq	$0, 88(%r15,%rbx)
	movq	16(%r13), %rax
	addq	%r14, %rax
	movq	%rax, 80(%r15,%rbx)
	movq	-136(%rbp), %rax                ## 8-byte Reload
	addq	%r14, %rax
	movq	%rax, 16(%r15,%rbx)
	movq	%rax, 32(%r15,%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%r15,%rbx)
	movups	%xmm0, 64(%r15,%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax), %edi
	movl	%edi, 24(%r15,%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, 40(%r15,%rbx)
	testq	%rax, %rax
	je	LBB0_28
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	leaq	(%r15,%rbx), %rax
	addq	$32, %rax
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %esi
	movq	(%rax), %rdx
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movl	(%rbx), %eax
	incl	%eax
	movl	%eax, (%rbx)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	addl	%edx, %ebx
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_29
## %bb.26:                              ##   in Loop: Header=BB0_24 Depth=1
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	addq	-144(%rbp), %r14                ## 8-byte Folded Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %r15
	movq	-104(%rbp), %r13                ## 8-byte Reload
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_24
LBB0_27:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_28:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, (%rsi)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_drm_cleanup_buf_error
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	%rbx, %rdi
	jmp	LBB0_14
LBB0_29:
	movq	-104(%rbp), %r13                ## 8-byte Reload
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
LBB0_30:
	leaq	L_.str.8(%rip), %rdi
	xorl	%r15d, %r15d
	movq	%rsi, %r12
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	32(%r13), %rdi
	movl	(%r12), %esi
	addl	(%r13), %esi
	shll	$3, %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_krealloc
	testq	%rax, %rax
	je	LBB0_40
## %bb.31:
	movq	%rax, 32(%r13)
	movl	(%r12), %r9d
	movslq	(%r13), %rsi
	testl	%r9d, %r9d
	movq	-128(%rbp), %r14                ## 8-byte Reload
	jle	LBB0_39
## %bb.32:
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdx
	movq	%rdx, (%rax,%rsi,8)
	cmpl	$1, %r9d
	je	LBB0_39
## %bb.33:
	leaq	-1(%r9), %r8
	movl	$1, %eax
	cmpl	$2, %r9d
	je	LBB0_37
## %bb.34:
	movl	%ebx, %r15d
	movq	%r8, %r10
	andq	$-2, %r10
	movq	$-1, %rax
	movq	%r13, %r11
	movl	$192, %ebx
	movq	%rsi, %rdx
	movq	-88(%rbp), %r13                 ## 8-byte Reload
LBB0_35:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r11), %rcx
	movq	(%r13), %rdi
	addq	%rbx, %rdi
	addq	$-96, %rdi
	movq	%rdi, 8(%rcx,%rdx,8)
	movq	32(%r11), %rcx
	movq	(%r13), %rdi
	addq	%rbx, %rdi
	movq	%rdi, 16(%rcx,%rdx,8)
	addq	$2, %rdx
	addq	$192, %rbx
	leaq	(%r10,%rax), %rcx
	addq	$-2, %rcx
	addq	$-2, %rax
	cmpq	$-1, %rcx
	jne	LBB0_35
## %bb.36:
	negq	%rax
	movq	%r11, %r13
	movl	%r15d, %ebx
LBB0_37:
	testb	$1, %r8b
	je	LBB0_39
## %bb.38:
	movq	32(%r13), %rcx
	leaq	(%rax,%rax,2), %rdx
	shlq	$5, %rdx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	addq	(%rdi), %rdx
	addq	%rsi, %rax
	movq	%rdx, (%rcx,%rax,8)
LBB0_39:
	addl	%r9d, %esi
	movl	%esi, (%r13)
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movl	16(%rax,%rcx), %eax
	addl	%eax, 24(%r13)
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movslq	%ebx, %rax
	sarl	%cl, %ebx
	addl	%ebx, 4(%r13)
	addq	%rax, 16(%r13)
	leaq	L_.str.9(%rip), %rdi
	xorl	%r15d, %r15d
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movl	(%r12), %esi
	leaq	L_.str.10(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	(%r12), %eax
	movl	%eax, (%r14)
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r14)
	movq	__DRM_DMA_USE_FB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_dec
	jmp	LBB0_20
LBB0_40:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_drm_cleanup_buf_error
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_atomic_dec
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_DRIVER_FB_DMA,4,2              ## @DRIVER_FB_DMA
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	__DRM_PAGE_ALIGN,4,2            ## @_DRM_PAGE_ALIGN
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"count:      %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"order:      %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"size:       %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"agp_offset: %lu\n"

L_.str.4:                               ## @.str.4
	.asciz	"alignment:  %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"page_order: %d\n"

L_.str.6:                               ## @.str.6
	.asciz	"total:      %d\n"

	.comm	_DRM_MIN_ORDER,4,2              ## @DRM_MIN_ORDER
	.comm	_DRM_MAX_ORDER,4,2              ## @DRM_MAX_ORDER
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.7:                               ## @.str.7
	.asciz	"buffer %d @ %p\n"

L_.str.8:                               ## @.str.8
	.asciz	"byte_count: %d\n"

L_.str.9:                               ## @.str.9
	.asciz	"dma->buf_count : %d\n"

L_.str.10:                              ## @.str.10
	.asciz	"entry->buf_count : %d\n"

	.comm	__DRM_DMA_USE_FB,4,2            ## @_DRM_DMA_USE_FB
	.no_dead_strip	_drm_addbufs_fb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_addbufs_fb
_drm_addbufs_fb:                        ; @drm_addbufs_fb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x20, x1
	mov	x19, x0
	ldr	x23, [x0, #32]
Lloh0:
	adrp	x8, _DRIVER_FB_DMA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRIVER_FB_DMA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_drm_core_check_feature
	cbz	w0, LBB0_15
; %bb.1:
	cbz	x23, LBB0_15
; %bb.2:
Lloh3:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_9
; %bb.3:
	ldp	w8, w0, [x20]
	str	w8, [sp, #76]                   ; 4-byte Folded Spill
	bl	_drm_order
	mov	x25, x0
	mov	w8, #1
	lsl	w21, w8, w0
	ldr	w8, [x20, #8]
Lloh6:
	adrp	x9, __DRM_PAGE_ALIGN@GOTPAGE
Lloh7:
	ldr	x9, [x9, __DRM_PAGE_ALIGN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	mov	x26, x21
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_PAGE_ALIGN
	mov	x26, x0
LBB0_5:
Lloh9:
	adrp	x24, _PAGE_SHIFT@GOTPAGE
Lloh10:
	ldr	x24, [x24, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w8, [x24]
	sub	w8, w25, w8
	cmp	w8, #0
	csel	w27, w8, wzr, gt
Lloh11:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	lsl	w22, w8, w27
	ldr	x28, [x20, #16]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	ldr	w1, [sp, #76]                   ; 4-byte Folded Reload
	bl	_DRM_DEBUG
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x25
	bl	_DRM_DEBUG
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_DRM_DEBUG
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x28
	bl	_DRM_DEBUG
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x26
	bl	_DRM_DEBUG
Lloh24:
	adrp	x0, l_.str.5@PAGE
Lloh25:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x27
	bl	_DRM_DEBUG
Lloh26:
	adrp	x0, l_.str.6@PAGE
Lloh27:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x1, x22
	bl	_DRM_DEBUG
Lloh28:
	adrp	x8, _DRM_MIN_ORDER@GOTPAGE
Lloh29:
	ldr	x8, [x8, _DRM_MIN_ORDER@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	w25, w8
	b.lt	LBB0_15
; %bb.6:
Lloh31:
	adrp	x8, _DRM_MAX_ORDER@GOTPAGE
Lloh32:
	ldr	x8, [x8, _DRM_MAX_ORDER@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	cmp	w25, w8
	b.gt	LBB0_15
; %bb.7:
	add	x22, x19, #16
	mov	x0, x22
	bl	_spin_lock
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.8:
	mov	x0, x22
	bl	_spin_unlock
Lloh34:
	adrp	x8, _EBUSY@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_16
LBB0_9:
Lloh36:
	adrp	x8, _EPERM@GOTPAGE
Lloh37:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_16
LBB0_10:
	mov	x0, x19
	bl	_atomic_inc
	mov	x0, x22
	bl	_spin_unlock
	add	x22, x19, #4
	mov	x0, x22
	bl	_mutex_lock
	ldr	x10, [x23, #40]
	sxtw	x11, w25
	add	x9, x10, x11, lsl #5
	ldr	w8, [x9]
	cbz	w8, LBB0_13
LBB0_11:
	mov	x0, x22
LBB0_12:
	bl	_mutex_unlock
	mov	x0, x19
	bl	_atomic_dec
Lloh38:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
	str	x9, [sp, #64]                   ; 8-byte Folded Spill
	ldr	w9, [sp, #76]                   ; 4-byte Folded Reload
	cmp	w9, #1, lsl #12                 ; =4096
	b.ls	LBB0_18
; %bb.14:
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x19
	bl	_atomic_dec
LBB0_15:
Lloh40:
	adrp	x8, _EINVAL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_18:
	add	w8, w9, w9, lsl #1
	lsl	w0, w8, #5
Lloh42:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	stp	x11, x10, [sp, #24]             ; 16-byte Folded Spill
	bl	_kzalloc
	ldp	x9, x8, [sp, #24]               ; 16-byte Folded Reload
	add	x8, x8, x9, lsl #5
	mov	x9, x8
	str	x0, [x9, #24]!
	cbz	x0, LBB0_11
; %bb.19:
	str	x9, [sp, #56]                   ; 8-byte Folded Spill
	stp	w21, w27, [x8, #4]
	ldr	x8, [sp, #64]                   ; 8-byte Folded Reload
	ldr	w8, [x8]
	ldr	w9, [sp, #76]                   ; 4-byte Folded Reload
	cmp	w8, w9
	b.ge	LBB0_24
; %bb.20:
	str	x22, [sp, #16]                  ; 8-byte Folded Spill
	str	wzr, [sp, #72]                  ; 4-byte Folded Spill
	mov	x10, #0
	sxtw	x9, w26
	stp	x9, x28, [sp, #40]              ; 16-byte Folded Spill
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x23]
	add	w9, w9, w8
	mov	w11, #96
	smaddl	x22, w8, w11, x0
	stp	w9, w26, [x22]
	str	w25, [x22, #8]
	ldr	x8, [x23, #16]
	add	x8, x10, x8
	stp	x8, xzr, [x22, #80]
	mov	x28, x10
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	add	x8, x8, x10
	str	x8, [x22, #16]
	mov	x24, x22
	str	x8, [x24, #32]!
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x22, #48]
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	str	w0, [x22, #24]
Lloh45:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh46:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	bl	_kzalloc
	str	x0, [x22, #40]
	cbz	x0, LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	x22, [sp, #64]                  ; 8-byte Folded Reload
	ldr	w1, [x22]
	ldr	x8, [x24]
	str	x8, [sp]
Lloh48:
	adrp	x0, l_.str.7@PAGE
Lloh49:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w8, [x22]
	add	w8, w8, #1
	str	w8, [x22]
Lloh50:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh51:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	lsl	w9, w9, w27
	ldr	w10, [sp, #72]                  ; 4-byte Folded Reload
	add	w10, w9, w10
	str	w10, [sp, #72]                  ; 4-byte Folded Spill
	ldr	w9, [sp, #76]                   ; 4-byte Folded Reload
	cmp	w8, w9
	b.ge	LBB0_26
; %bb.23:                               ;   in Loop: Header=BB0_21 Depth=1
	mov	x10, x28
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	add	x10, x28, x9
	ldr	x9, [sp, #56]                   ; 8-byte Folded Reload
	ldr	x0, [x9]
	b	LBB0_21
LBB0_24:
	mov	w26, #0
	b	LBB0_27
LBB0_25:
	ldr	x1, [sp, #64]                   ; 8-byte Folded Reload
	ldr	w8, [sp, #76]                   ; 4-byte Folded Reload
	str	w8, [x1]
	mov	x0, x19
	bl	_drm_cleanup_buf_error
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	b	LBB0_12
LBB0_26:
Lloh53:
	adrp	x24, _PAGE_SHIFT@GOTPAGE
Lloh54:
	ldr	x24, [x24, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	x22, [sp, #16]                  ; 8-byte Folded Reload
	ldr	w26, [sp, #72]                  ; 4-byte Folded Reload
LBB0_27:
Lloh55:
	adrp	x0, l_.str.8@PAGE
Lloh56:
	add	x0, x0, l_.str.8@PAGEOFF
	mov	x1, x26
	bl	_DRM_DEBUG
	ldr	x0, [x23, #32]
	ldr	w8, [x23]
	ldr	x25, [sp, #64]                  ; 8-byte Folded Reload
	ldr	w9, [x25]
	add	w8, w9, w8
	lsl	w1, w8, #3
Lloh57:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh58:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh59:
	ldr	w2, [x8]
	bl	_krealloc
	cbz	x0, LBB0_33
; %bb.28:
	str	x0, [x23, #32]
	ldr	w8, [x25]
	ldrsw	x9, [x23]
	cmp	w8, #1
	ldr	x15, [sp, #56]                  ; 8-byte Folded Reload
	b.lt	LBB0_32
; %bb.29:
	ldr	x10, [x15]
	str	x10, [x0, x9, lsl #3]
	cmp	w8, #1
	b.eq	LBB0_32
; %bb.30:
	sub	x10, x8, #1
	lsl	x11, x9, #3
	add	x11, x11, #8
	mov	w12, #96
LBB0_31:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x15]
	add	x13, x13, x12
	ldr	x14, [x23, #32]
	str	x13, [x14, x11]
	add	x12, x12, #96
	add	x11, x11, #8
	subs	x10, x10, #1
	b.ne	LBB0_31
LBB0_32:
	add	w1, w9, w8
	str	w1, [x23]
	ldp	x9, x8, [sp, #24]               ; 16-byte Folded Reload
	add	x8, x8, x9, lsl #5
	ldr	w8, [x8, #16]
	ldr	w9, [x23, #24]
	add	w8, w9, w8
	str	w8, [x23, #24]
	ldr	w8, [x24]
	asr	w8, w26, w8
	ldr	w9, [x23, #4]
	add	w8, w9, w8
	str	w8, [x23, #4]
	ldr	x8, [x23, #16]
	add	x8, x8, w26, sxtw
	str	x8, [x23, #16]
Lloh60:
	adrp	x0, l_.str.9@PAGE
Lloh61:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w1, [x25]
Lloh62:
	adrp	x0, l_.str.10@PAGE
Lloh63:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_DRM_DEBUG
	mov	x0, x22
	bl	_mutex_unlock
	ldr	w8, [x25]
	stp	w8, w21, [x20]
Lloh64:
	adrp	x8, __DRM_DMA_USE_FB@GOTPAGE
Lloh65:
	ldr	x8, [x8, __DRM_DMA_USE_FB@GOTPAGEOFF]
Lloh66:
	ldr	w8, [x8]
	str	w8, [x23, #8]
	mov	x0, x19
	bl	_atomic_dec
	mov	w0, #0
	b	LBB0_17
LBB0_33:
	mov	x0, x19
	mov	x1, x25
	bl	_drm_cleanup_buf_error
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpAdd	Lloh60, Lloh61
	.cfi_endproc
                                        ; -- End function
	.comm	_DRIVER_FB_DMA,4,2              ; @DRIVER_FB_DMA
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	__DRM_PAGE_ALIGN,4,2            ; @_DRM_PAGE_ALIGN
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"count:      %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"order:      %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"size:       %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"agp_offset: %lu\n"

l_.str.4:                               ; @.str.4
	.asciz	"alignment:  %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"page_order: %d\n"

l_.str.6:                               ; @.str.6
	.asciz	"total:      %d\n"

	.comm	_DRM_MIN_ORDER,4,2              ; @DRM_MIN_ORDER
	.comm	_DRM_MAX_ORDER,4,2              ; @DRM_MAX_ORDER
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.7:                               ; @.str.7
	.asciz	"buffer %d @ %p\n"

l_.str.8:                               ; @.str.8
	.asciz	"byte_count: %d\n"

l_.str.9:                               ; @.str.9
	.asciz	"dma->buf_count : %d\n"

l_.str.10:                              ; @.str.10
	.asciz	"entry->buf_count : %d\n"

	.comm	__DRM_DMA_USE_FB,4,2            ; @_DRM_DMA_USE_FB
	.no_dead_strip	_drm_addbufs_fb
.subsections_via_symbols
