	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msm_alloc_stolen_fb            ## -- Begin function msm_alloc_stolen_fb
	.p2align	4, 0x90
_msm_alloc_stolen_fb:                   ## @msm_alloc_stolen_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rdi, %r14
	movl	%esi, -72(%rbp)
	movl	%edx, -68(%rbp)
	movslq	%ecx, %rax
	movq	%rax, -64(%rbp)
	movl	%r8d, -56(%rbp)
	imull	(%rax), %r15d
	movq	8(%rdi), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_DBG
	movq	_MSM_BO_SCANOUT@GOTPCREL(%rip), %r12
	movq	_MSM_BO_WC@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	orl	(%r12), %edx
	movq	_MSM_BO_STOLEN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_msm_gem_new
	movq	%rax, %rbx
	movq	%rax, -48(%rbp)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
	movl	(%r13), %edx
	orl	(%r12), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_msm_gem_new
	movq	%rax, %rbx
	movq	%rax, -48(%rbp)
LBB0_2:
	movq	%rbx, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_DRM_DEV_ERROR
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
LBB0_3:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_msm_gem_object_set_name
	leaq	-72(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_msm_framebuffer_init
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_DRM_DEV_ERROR
	movq	-48(%rbp), %rdi
	callq	_drm_gem_object_put_unlocked
	movq	%rbx, %rdi
	callq	_ERR_CAST
	movq	%rax, %rbx
LBB0_5:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"allocating %d bytes for fb %d"

	.comm	_MSM_BO_SCANOUT,4,2             ## @MSM_BO_SCANOUT
	.comm	_MSM_BO_WC,4,2                  ## @MSM_BO_WC
	.comm	_MSM_BO_STOLEN,4,2              ## @MSM_BO_STOLEN
L_.str.1:                               ## @.str.1
	.asciz	"could not allocate stolen bo\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to allocate buffer object\n"

L_.str.3:                               ## @.str.3
	.asciz	"stolenfb"

L_.str.4:                               ## @.str.4
	.asciz	"failed to allocate fb\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msm_alloc_stolen_fb            ; -- Begin function msm_alloc_stolen_fb
	.p2align	2
_msm_alloc_stolen_fb:                   ; @msm_alloc_stolen_fb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
                                        ; kill: def $w3 killed $w3 def $x3
	mov	x19, x0
	stp	w1, w2, [sp, #8]
	sxtw	x8, w3
	str	x8, [sp, #16]
	str	w4, [sp, #24]
	ldr	w8, [x8]
	mul	w20, w8, w2
	ldr	x8, [x0, #8]
	ldr	w2, [x8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_DBG
Lloh2:
	adrp	x22, _MSM_BO_SCANOUT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MSM_BO_SCANOUT@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh4:
	adrp	x23, _MSM_BO_WC@GOTPAGE
Lloh5:
	ldr	x23, [x23, _MSM_BO_WC@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _MSM_BO_STOLEN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MSM_BO_STOLEN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	mov	x1, x20
	bl	_msm_gem_new
	mov	x21, x0
	str	x0, [sp]
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w2, w9, w8
	mov	x0, x19
	mov	x1, x20
	bl	_msm_gem_new
	mov	x21, x0
	str	x0, [sp]
LBB0_2:
	mov	x0, x21
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_DRM_DEV_ERROR
	mov	x0, x21
	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
	add	sp, sp, #96
	b	_ERR_CAST
LBB0_4:
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_msm_gem_object_set_name
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x19
	bl	_msm_framebuffer_init
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.5:
	ldr	w0, [x19]
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_DRM_DEV_ERROR
	ldr	x0, [sp]
	bl	_drm_gem_object_put_unlocked
	mov	x0, x20
	bl	_ERR_CAST
	mov	x20, x0
LBB0_6:
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"allocating %d bytes for fb %d"

	.comm	_MSM_BO_SCANOUT,4,2             ; @MSM_BO_SCANOUT
	.comm	_MSM_BO_WC,4,2                  ; @MSM_BO_WC
	.comm	_MSM_BO_STOLEN,4,2              ; @MSM_BO_STOLEN
l_.str.1:                               ; @.str.1
	.asciz	"could not allocate stolen bo\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to allocate buffer object\n"

l_.str.3:                               ; @.str.3
	.asciz	"stolenfb"

l_.str.4:                               ; @.str.4
	.asciz	"failed to allocate fb\n"

.subsections_via_symbols
