	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lima_bo_create                 ## -- Begin function lima_bo_create
	.p2align	4, 0x90
_lima_bo_create:                        ## @lima_bo_create
	.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
	movq	%rcx, %r12
	movq	%rdi, %r15
	callq	_lima_bo_create_struct
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_17
## %bb.1:
	movq	16(%r13), %rbx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrq	%cl, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	testq	%r12, %r12
	je	LBB0_9
## %bb.5:
	movq	%r12, 32(%r13)
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movl	$40, %esi
	callq	_kcalloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_2
## %bb.6:
	movq	(%r13), %rdx
	movq	%r12, %rdi
	movq	%rax, %rsi
	movq	%rbx, %rcx
	callq	_drm_prime_sg_to_page_addr_arrays
	testl	%eax, %eax
	je	LBB0_17
## %bb.7:
	movl	%eax, %edi
	jmp	LBB0_8
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_8:
	callq	_ERR_PTR
	movq	%rax, %r14
LBB0_16:
	movq	%r13, %rdi
	callq	_lima_bo_destroy
	movq	%r14, %r13
LBB0_17:
	movq	%r13, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r13, %r14
	addq	$16, %r14
	movq	24(%r13), %rax
	movl	(%rax), %edi
	movq	_GFP_DMA32@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mapping_set_gfp_mask
	movq	%r14, %rdi
	callq	_drm_gem_get_pages
	movq	%rax, 8(%r13)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.15:
	movq	8(%r13), %rdi
	callq	_ERR_CAST
	movq	%rax, %r14
	movq	$0, 8(%r13)
	jmp	LBB0_16
LBB0_10:
	testq	%rbx, %rbx
	je	LBB0_17
## %bb.11:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	8(%r13), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	32(%rax,%r12), %rsi
	movq	%rsi, 32(%rsp)
	movups	(%rax,%r12), %xmm0
	movups	16(%rax,%r12), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	xorl	%esi, %esi
	callq	_dma_map_page
	movl	%eax, %ebx
	movl	(%r15), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r13), %rax
	movl	%ebx, (%rax,%r14,4)
	incq	%r14
	addq	$40, %r12
	cmpq	%r14, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_12
	jmp	LBB0_17
LBB0_13:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_DMA32,4,2                  ## @GFP_DMA32
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lima_bo_create                 ; -- Begin function lima_bo_create
	.p2align	2
_lima_bo_create:                        ; @lima_bo_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x3
	mov	x21, x0
	bl	_lima_bo_create_struct
	mov	x19, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_9
; %bb.1:
	mov	x23, x19
	ldr	x8, [x23, #16]!
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	lsr	x20, x8, x9
Lloh3:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x20
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19]
	cbz	x0, LBB0_5
; %bb.2:
	cbz	x22, LBB0_10
; %bb.3:
	str	x22, [x19, #32]
	ldr	w2, [x24]
	mov	x0, x20
	mov	w1, #40
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.4:
	mov	x1, x0
	ldr	x2, [x19]
	mov	x0, x22
	mov	x3, x20
	bl	_drm_prime_sg_to_page_addr_arrays
	cbnz	w0, LBB0_7
	b	LBB0_9
LBB0_5:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	bl	_ERR_PTR
	mov	x20, x0
LBB0_8:
	mov	x0, x19
	bl	_lima_bo_destroy
	mov	x19, x20
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_10:
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
Lloh7:
	adrp	x8, _GFP_DMA32@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_DMA32@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_mapping_set_gfp_mask
	mov	x0, x23
	bl	_drm_gem_get_pages
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.11:
	ldr	x0, [x19, #8]
	bl	_ERR_CAST
	mov	x20, x0
	str	xzr, [x19, #8]
	b	LBB0_8
LBB0_12:
	cbz	x20, LBB0_9
; %bb.13:
	mov	x23, #0
	mov	x24, #0
Lloh10:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh11:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
Lloh12:
	adrp	x26, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh13:
	ldr	x26, [x26, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	ldr	x8, [x19, #8]
	ldr	w3, [x25]
	ldr	w4, [x26]
	add	x8, x8, x23
	ldp	q0, q1, [x8]
	ldr	x8, [x8, #32]
	str	x8, [sp, #32]
	stp	q0, q1, [sp]
	mov	x1, sp
	mov	w2, #0
	bl	_dma_map_page
	mov	x22, x0
	ldr	w0, [x21]
	mov	x1, x22
	bl	_dma_mapping_error
	cbnz	x0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x19]
	str	w22, [x8, x24, lsl #2]
	add	x24, x24, #1
	add	x23, x23, #40
	cmp	x20, x24
	b.ne	LBB0_14
	b	LBB0_9
LBB0_16:
Lloh14:
	adrp	x8, _EFAULT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_DMA32,4,2                  ; @GFP_DMA32
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
