	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xen_drm_drv_dumb_create
_xen_drm_drv_dumb_create:               ## @xen_drm_drv_dumb_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	$40, %rsp
	.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, %r12
	movq	(%rsi), %r15
	movl	8(%rdx), %edi
	imull	4(%rdx), %edi
	movl	$8, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, (%rbx)
	imull	16(%rbx), %eax
	movl	%eax, 12(%rbx)
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_xen_drm_front_gem_create
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR_OR_NULL
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %r12d
	jmp	LBB0_7
LBB0_2:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	(%r15), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_xen_drm_front_dbuf_to_cookie
	movl	%eax, %r13d
	movl	16(%rbx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	4(%rbx), %r12d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %r15d
	movl	12(%rbx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_xen_drm_front_gem_get_pages
	movl	%eax, (%rsp)
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%r15d, %r8d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	callq	_xen_drm_front_dbuf_create
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	addq	$20, %rbx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_drm_gem_handle_create
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	%eax, %r12d
	movl	(%r15), %ebx
	movq	%r14, %rdi
	callq	_xen_drm_front_dbuf_to_cookie
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_xen_drm_front_dbuf_destroy
LBB0_6:
	movq	%r14, %rdi
	callq	_drm_gem_object_put_unlocked
LBB0_7:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_DRM_ERROR
LBB0_8:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r14, %rdi
	callq	_drm_gem_object_put_unlocked
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to create dumb buffer: %d\n"

	.no_dead_strip	_xen_drm_drv_dumb_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xen_drm_drv_dumb_create
_xen_drm_drv_dumb_create:               ; @xen_drm_drv_dumb_create
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x28, [x1]
	ldp	w8, w9, [x2, #4]
	mul	w0, w9, w8
	mov	w1, #8
	bl	_DIV_ROUND_UP
	str	w0, [x21]
	ldr	w8, [x21, #16]
	mul	w1, w8, w0
	str	w1, [x21, #12]
	mov	x0, x19
	bl	_xen_drm_front_gem_create
	mov	x19, x0
	bl	_IS_ERR_OR_NULL
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_6
LBB0_2:
	ldr	w22, [x28]
	mov	x0, x19
	bl	_xen_drm_front_dbuf_to_cookie
	mov	x23, x0
	ldp	w24, w25, [x21, #4]
	ldp	w27, w26, [x21, #12]
	mov	x0, x19
	bl	_xen_drm_front_gem_get_pages
	mov	x6, x0
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	mov	x3, x26
	mov	x4, x25
	mov	x5, x27
	bl	_xen_drm_front_dbuf_create
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.3:
	add	x2, x21, #20
	mov	x0, x20
	mov	x1, x19
	bl	_drm_gem_handle_create
	mov	x22, x0
	cbz	w0, LBB0_8
; %bb.4:
	ldr	w20, [x28]
	mov	x0, x19
	bl	_xen_drm_front_dbuf_to_cookie
	mov	x1, x0
	mov	x0, x20
	bl	_xen_drm_front_dbuf_destroy
LBB0_5:
	mov	x0, x19
	bl	_drm_gem_object_put_unlocked
LBB0_6:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_DRM_ERROR
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x19
	bl	_drm_gem_object_put_unlocked
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to create dumb buffer: %d\n"

	.no_dead_strip	_xen_drm_drv_dumb_create
.subsections_via_symbols
