	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msm_framebuffer_init
_msm_framebuffer_init:                  ## @msm_framebuffer_init
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_drm_get_format_info
	movq	%rax, %r13
	movq	8(%r15), %rax
	movq	(%rax), %r14
	movl	(%rbx), %ecx
	movl	4(%rbx), %r8d
	leaq	24(%rbx), %r12
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	%r12, %r9
	xorl	%eax, %eax
	callq	_DBG
	movl	(%r13), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rax
	movl	24(%rbx), %esi
	movq	32(%rbx), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	%r14, 16(%rax)
	movq	8(%rax), %rdi
	callq	_ARRAY_SIZE
	movq	-56(%rbp), %r11                 ## 8-byte Reload
	cmpl	%eax, %r11d
	jle	LBB0_5
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_1:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_16
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
LBB0_10:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_16:
	movq	%r12, %rdi
	callq	_kfree
	movl	%ebx, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_5:
	testl	%r11d, %r11d
	movq	-48(%rbp), %r10                 ## 8-byte Reload
	jle	LBB0_14
## %bb.6:
	movl	(%rbx), %r8d
	movl	4(%rbx), %r9d
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%r8d, %eax
	cltd
	idivl	4(%r13)
	movl	%eax, %edi
	movl	8(%r13), %esi
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	movl	$1, %esi
	movl	%r8d, %edi
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r9d, %eax
	cltd
	idivl	%esi
	decl	%eax
	movq	8(%rbx), %rdx
	imull	(%rdx,%rcx,4), %eax
	movq	16(%r13), %rdx
	imull	(%rdx,%rcx,4), %edi
	movq	16(%rbx), %rdx
	addl	%eax, %edi
	addl	(%rdx,%rcx,4), %edi
	movq	(%r10,%rcx,8), %rax
	cmpl	%edi, (%rax)
	jb	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r12), %rdx
	movq	%rax, (%rdx,%rcx,8)
	incq	%rcx
	cmpq	%rcx, %r11
	jne	LBB0_7
LBB0_14:
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_drm_helper_mode_fill_fb_struct
	movq	_msm_framebuffer_funcs@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_drm_framebuffer_init
	testl	%eax, %eax
	je	LBB0_17
## %bb.15:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DRM_DEV_ERROR
	jmp	LBB0_16
LBB0_17:
	movslq	(%r12), %rsi
	leaq	L_.str.3(%rip), %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_DBG
	movq	%r12, %rax
	addq	$24, %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	"create framebuffer: dev=%p, mode_cmd=%p (%dx%d@%4.4s)"

L_.str.1:                               ## @.str.1
	.asciz	"unsupported pixel format: %4.4s\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_msm_framebuffer_funcs,4,2      ## @msm_framebuffer_funcs
L_.str.2:                               ## @.str.2
	.asciz	"framebuffer init failed: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"create: FB ID: %d (%p)"

	.no_dead_strip	_msm_framebuffer_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msm_framebuffer_init
_msm_framebuffer_init:                  ; @msm_framebuffer_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x2
	mov	x21, x1
	mov	x20, x0
	bl	_drm_get_format_info
	mov	x23, x0
	ldr	x8, [x20, #8]
	ldr	x19, [x8]
	add	x26, x21, #24
	ldp	w8, w9, [x21]
	stp	x9, x26, [sp, #16]
	stp	x21, x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_DBG
	ldr	w25, [x23]
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	w1, [x21, #24]
	ldr	x9, [x21, #32]
	ldr	w2, [x9]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_12
; %bb.1:
	mov	x24, x0
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_14
; %bb.2:
	str	x24, [x19, #16]
	ldr	x0, [x19, #8]
	bl	_ARRAY_SIZE
	cmp	w25, w0
	b.gt	LBB0_13
; %bb.3:
	cmp	w25, #1
	b.lt	LBB0_10
; %bb.4:
	mov	x8, #0
	ldp	w9, w10, [x21]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x8, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	w11, w12, [x23, #4]
	sdiv	w11, w9, w11
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w12, #1
	mov	x11, x9
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	sdiv	w12, w10, w12
	sub	w12, w12, #1
	lsl	x13, x8, #2
	ldp	x14, x15, [x21, #8]
	ldr	w14, [x14, x13]
	mul	w12, w14, w12
	ldr	x14, [x23, #16]
	ldr	w14, [x14, x13]
	ldr	w13, [x15, x13]
	madd	w12, w14, w11, w12
	ldr	x11, [x22, x8, lsl #3]
	ldr	w14, [x11]
	add	w12, w12, w13
	cmp	w14, w12
	b.lo	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x12, [x19, #8]
	str	x11, [x12, x8, lsl #3]
	add	x8, x8, #1
	cmp	x25, x8
	b.ne	LBB0_5
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_drm_helper_mode_fill_fb_struct
Lloh5:
	adrp	x2, _msm_framebuffer_funcs@GOTPAGE
Lloh6:
	ldr	x2, [x2, _msm_framebuffer_funcs@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x19
	bl	_drm_framebuffer_init
	cbz	w0, LBB0_17
; %bb.11:
	mov	x21, x0
	ldr	w0, [x20]
	str	x21, [sp]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_DRM_DEV_ERROR
	b	LBB0_16
LBB0_12:
	ldr	w0, [x20]
	str	x26, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_DRM_DEV_ERROR
	mov	x19, #0
LBB0_13:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_16:
	mov	x0, x19
	bl	_kfree
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ERR_PTR
LBB0_17:
	ldrsw	x1, [x19]
	str	x19, [sp]
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DBG
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"create framebuffer: dev=%p, mode_cmd=%p (%dx%d@%4.4s)"

l_.str.1:                               ; @.str.1
	.asciz	"unsupported pixel format: %4.4s\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_msm_framebuffer_funcs,4,2      ; @msm_framebuffer_funcs
l_.str.2:                               ; @.str.2
	.asciz	"framebuffer init failed: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"create: FB ID: %d (%p)"

	.no_dead_strip	_msm_framebuffer_init
.subsections_via_symbols
