	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omap_framebuffer_init          ## -- Begin function omap_framebuffer_init
	.p2align	4, 0x90
_omap_framebuffer_init:                 ## @omap_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rsi), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	32(%rsi), %ecx
	movl	8(%rsi), %r8d
	leaq	16(%rsi), %r13
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%r13, %r9
	xorl	%eax, %eax
	callq	_DBG
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_drm_get_format_info
	movq	%rax, %r15
	movq	_formats@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movq	(%rdi,%rbx,8), %rax
	cmpq	(%r13), %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_4:
	testq	%r15, %r15
	je	LBB0_6
## %bb.5:
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jne	LBB0_10
LBB0_6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%r14d, %r14d
LBB0_8:
	subl	(%rax), %r14d
LBB0_9:
	movq	%r13, %rdi
	callq	_kfree
	movl	%r14d, %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_10:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movq	%rax, %rbx
	movq	%rax, %r13
	movq	%r15, 16(%rbx)
	leaq	8(%rax), %rdi
	callq	_mutex_init
	movl	(%r15), %esi
	cmpl	$2, %esi
	jne	LBB0_15
## %bb.12:
	movq	(%r14), %rax
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	cmpl	4(%rax), %r8d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jne	LBB0_17
## %bb.13:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r15), %rax
	movl	(%rax), %ecx
	movl	%r8d, %eax
	xorl	%edx, %edx
	divl	%ecx
	testl	%edx, %edx
	jne	LBB0_16
	jmp	LBB0_20
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	jmp	LBB0_7
LBB0_15:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r15), %rax
	movl	(%rax), %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%r8d, %eax
	xorl	%edx, %edx
	divl	%ecx
	testl	%edx, %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_19
LBB0_16:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%r8d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_18
LBB0_17:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_19:
	testl	%esi, %esi
	jle	LBB0_26
LBB0_20:
	xorl	%ebx, %ebx
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	16(%r15), %ecx
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=1
	movl	$1, %ecx
LBB0_24:                                ##   in Loop: Header=BB0_21 Depth=1
	movq	(%r13), %r12
	movl	8(%r14), %eax
	imull	%r8d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r13d
	movq	%r14, %r15
	movq	%rdi, %r14
	movq	(%rdi,%rbx,8), %rdi
	callq	_omap_gem_mmap_size
	movq	24(%r15), %rcx
	movl	(%rcx,%rbx,4), %ecx
	subl	%ecx, %eax
	cmpl	%eax, %r13d
	ja	LBB0_28
## %bb.25:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	%r15, %rdx
	movq	(%r14,%rbx,8), %rax
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	32(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	$0, (%r12,%rbx,8)
	incq	%rbx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movq	%r14, %rdi
	movq	%rdx, %r14
	jl	LBB0_21
LBB0_26:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	addq	$24, %rbx
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_drm_helper_mode_fill_fb_struct
	movq	_omap_framebuffer_funcs@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_drm_framebuffer_init
	testl	%eax, %eax
	je	LBB0_29
## %bb.27:
	movl	%eax, %r14d
	movl	(%r15), %edi
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_9
LBB0_28:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	(%r14,%rbx,8), %rax
	movl	(%rax), %edx
	subl	%ecx, %edx
	leaq	L_.str.4(%rip), %rsi
	xorl	%r14d, %r14d
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_29:
	movslq	(%rbx), %rsi
	leaq	L_.str.6(%rip), %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_DBG
	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	"create framebuffer: dev=%p, mode_cmd=%p (%dx%d@%4.4s)"

	.comm	_formats,8,3                    ## @formats
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
L_.str.2:                               ## @.str.2
	.asciz	"pitches differ between planes 0 and 1\n"

L_.str.3:                               ## @.str.3
	.asciz	"buffer pitch (%u bytes) is not a multiple of pixel size (%u bytes)\n"

L_.str.4:                               ## @.str.4
	.asciz	"provided buffer object is too small! %zu < %d\n"

	.comm	_omap_framebuffer_funcs,4,2     ## @omap_framebuffer_funcs
L_.str.5:                               ## @.str.5
	.asciz	"framebuffer init failed: %d\n"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_omap_framebuffer_init          ; -- Begin function omap_framebuffer_init
	.p2align	2
_omap_framebuffer_init:                 ; @omap_framebuffer_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x1]
	ldr	w24, [x8]
	add	x20, x1, #16
	ldr	w8, [x1, #32]
	ldr	w9, [x1, #8]
	stp	x9, x20, [sp, #16]
	stp	x1, x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DBG
	mov	x0, x19
	mov	x1, x21
	bl	_drm_get_format_info
	mov	x23, x0
Lloh2:
	adrp	x25, _formats@GOTPAGE
Lloh3:
	ldr	x25, [x25, _formats@GOTPAGEOFF]
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x26, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	ldr	x8, [x0, x26, lsl #3]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x26, x26, #1
	bl	_ARRAY_SIZE
	cmp	x26, w0, sxtw
	b.lt	LBB0_2
LBB0_4:
	cbnz	x23, LBB0_6
	b	LBB0_7
LBB0_5:
	mov	w26, #0
	cbz	x23, LBB0_7
LBB0_6:
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cmp	w26, w0
	b.ne	LBB0_11
LBB0_7:
	ldr	w0, [x19]
	str	x20, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	mov	x20, #0
LBB0_8:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x20
	bl	_kfree
	mov	x0, x21
	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
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_ERR_PTR
LBB0_11:
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_15
; %bb.12:
	str	x23, [x20, #16]
	add	x0, x20, #8
	bl	_mutex_init
	ldr	w9, [x23]
	cmp	w9, #2
	b.ne	LBB0_16
; %bb.13:
	ldr	x8, [x21]
	ldr	w8, [x8, #4]
	cmp	w24, w8
	b.ne	LBB0_18
; %bb.14:
	ldr	x8, [x23, #8]
	ldr	w8, [x8]
	udiv	w9, w24, w8
	msub	w9, w9, w8, w24
	cbnz	w9, LBB0_17
	b	LBB0_20
LBB0_15:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
LBB0_16:
	ldr	x8, [x23, #8]
	ldr	w8, [x8]
	udiv	w10, w24, w8
	msub	w10, w10, w8, w24
	cbz	w10, LBB0_19
LBB0_17:
	ldr	w0, [x19]
	stp	x24, x8, [sp]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_29
LBB0_18:
	ldr	w0, [x19]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_29
LBB0_19:
	cmp	w9, #1
	b.lt	LBB0_26
LBB0_20:
	mov	x25, #0
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	cbz	x25, LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	ldr	w8, [x23, #16]
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_21 Depth=1
	mov	w8, #1
LBB0_24:                                ;   in Loop: Header=BB0_21 Depth=1
	ldr	x26, [x20]
	ldr	w9, [x21, #8]
	mul	w9, w9, w24
	ldr	x0, [x22, x25, lsl #3]
	udiv	w27, w9, w8
	bl	_omap_gem_mmap_size
	ldr	x8, [x21, #24]
	ldr	w8, [x8, x25, lsl #2]
	sub	w9, w0, w8
	cmp	w27, w9
	b.hi	LBB0_28
; %bb.25:                               ;   in Loop: Header=BB0_21 Depth=1
	lsl	x8, x25, #3
	ldr	x9, [x22, x8]
	ldr	x10, [x20, #32]
	str	x9, [x10, x8]
	str	xzr, [x26, x8]
	add	x25, x25, #1
	ldrsw	x8, [x23]
	cmp	x25, x8
	b.lt	LBB0_21
LBB0_26:
	add	x22, x20, #24
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_drm_helper_mode_fill_fb_struct
Lloh17:
	adrp	x2, _omap_framebuffer_funcs@GOTPAGE
Lloh18:
	ldr	x2, [x2, _omap_framebuffer_funcs@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x22
	bl	_drm_framebuffer_init
	cbz	w0, LBB0_30
; %bb.27:
	mov	x21, x0
	ldr	w0, [x19]
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	b	LBB0_10
LBB0_28:
	ldr	w0, [x19]
	ldr	x9, [x22, x25, lsl #3]
	ldr	w9, [x9]
	sub	w8, w9, w8
	stp	x8, x27, [sp]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_29:
	bl	_dev_dbg
	b	LBB0_8
LBB0_30:
	ldrsw	x1, [x22]
	str	x22, [sp]
Lloh23:
	adrp	x0, l_.str.6@PAGE
Lloh24:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_DBG
	mov	x0, x22
	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
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"create framebuffer: dev=%p, mode_cmd=%p (%dx%d@%4.4s)"

	.comm	_formats,8,3                    ; @formats
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
l_.str.2:                               ; @.str.2
	.asciz	"pitches differ between planes 0 and 1\n"

l_.str.3:                               ; @.str.3
	.asciz	"buffer pitch (%u bytes) is not a multiple of pixel size (%u bytes)\n"

l_.str.4:                               ; @.str.4
	.asciz	"provided buffer object is too small! %zu < %d\n"

	.comm	_omap_framebuffer_funcs,4,2     ; @omap_framebuffer_funcs
l_.str.5:                               ; @.str.5
	.asciz	"framebuffer init failed: %d\n"

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

.subsections_via_symbols
