	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exynos_user_fb_create
_exynos_user_fb_create:                 ## @exynos_user_fb_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, %r15
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdx, %rsi
	callq	_drm_get_format_info
	movq	%rax, %rbx
	movq	_MAX_FB_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rbx)
	jle	LBB0_1
## %bb.2:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %r13d
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	movl	%r13d, %edi
	callq	_DIV_ROUND_UP
	movl	%eax, %r13d
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r15), %rax
	movq	16(%r15), %rcx
	movl	(%rax,%rbx,4), %r14d
	movl	(%rcx,%rbx,4), %r12d
	movq	24(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_exynos_drm_gem_get
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx,%rbx,8)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	imull	%r13d, %r14d
	addl	%r14d, %r12d
	cmpq	%r12, (%rax)
	jb	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
## %bb.10:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_11
LBB0_1:
	xorl	%ebx, %ebx
LBB0_11:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	callq	_exynos_drm_framebuffer_init
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_17
## %bb.12:
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	testl	%ebx, %ebx
	jne	LBB0_14
	jmp	LBB0_16
LBB0_6:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_DRM_DEV_ERROR
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	testl	%ebx, %ebx
	jne	LBB0_14
	jmp	LBB0_16
LBB0_8:
	incl	%ebx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_14:
	movl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	-8(%r14,%rbx,8), %rdi
	callq	_exynos_drm_gem_put
	decq	%rbx
	jne	LBB0_15
LBB0_16:
	movl	%r15d, %edi
	callq	_ERR_PTR
	movq	%rax, %r15
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	movq	%r15, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_FB_BUFFER,4,2              ## @MAX_FB_BUFFER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to lookup gem object\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_exynos_user_fb_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exynos_user_fb_create
_exynos_user_fb_create:                 ; @exynos_user_fb_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
	sub	sp, sp, #16
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	mov	x1, x2
	bl	_drm_get_format_info
	mov	x24, x0
Lloh3:
	adrp	x8, _MAX_FB_BUFFER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_FB_BUFFER@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x19, x9, x8
	mov	sp, x19
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x20, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w25, [x21]
	cbz	x20, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x24, #4]
	mov	x0, x25
	bl	_DIV_ROUND_UP
	mov	x25, x0
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	lsl	x8, x20, #2
	ldp	x9, x10, [x21, #8]
	ldr	w26, [x9, x8]
	ldr	w27, [x10, x8]
	ldr	x9, [x21, #24]
	ldr	w1, [x9, x8]
	mov	x0, x23
	bl	_exynos_drm_gem_get
	str	x0, [x19, x20, lsl #3]
	cbz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	madd	w8, w26, w25, w27
	ldr	x9, [x0]
	cmp	x9, x8
	b.lo	LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x24]
	cmp	x20, x8
	b.lt	LBB0_2
	b	LBB0_8
LBB0_7:
	mov	w20, #0
LBB0_8:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	mov	x3, x20
	bl	_exynos_drm_framebuffer_init
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_15
; %bb.9:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x21, x0
	cbnz	w20, LBB0_12
	b	LBB0_14
LBB0_10:
	ldr	w0, [x22]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_ERROR
Lloh10:
	adrp	x8, _ENOENT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
	cbnz	w20, LBB0_12
	b	LBB0_14
LBB0_11:
	add	w20, w20, #1
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_12:
	mov	w8, w20
	sub	x19, x19, #8
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sub	x20, x8, #1
	ldr	x0, [x19, x8, lsl #3]
	bl	_exynos_drm_gem_put
	mov	x8, x20
	cbnz	x20, LBB0_13
LBB0_14:
	mov	x0, x21
	bl	_ERR_PTR
	mov	x21, x0
LBB0_15:
	ldur	x8, [x29, #-88]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x21
	sub	sp, x29, #80
	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_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_FB_BUFFER,4,2              ; @MAX_FB_BUFFER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to lookup gem object\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_exynos_user_fb_create
.subsections_via_symbols
