	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omapdrm_init
_omapdrm_init:                          ## @omapdrm_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_dev_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DBG
	movq	_omap_drm_driver@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_drm_dev_alloc
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.16:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	%r14, 64(%r12)
	movq	%r12, (%r14)
	movq	%rbx, 24(%r12)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_omapdss_get_dss
	movl	%eax, 60(%r12)
	movl	%eax, %edi
	callq	_dispc_get_dispc
	movl	%eax, 32(%r12)
	movl	60(%r12), %edi
	callq	_dispc_get_ops
	movq	%rax, 40(%r12)
	movq	%r12, %rdi
	callq	_omap_crtc_pre_init
	movq	_omapdrm_soc_devices@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_soc_device_match
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	(%rax), %ebx
LBB0_3:
	movl	%ebx, (%r12)
	leaq	L_.str.1(%rip), %rdi
	xorl	%esi, %esi
	callq	_alloc_ordered_workqueue
	movl	%eax, 8(%r12)
	leaq	56(%r12), %rdi
	callq	_mutex_init
	leaq	52(%r12), %rdi
	callq	_INIT_LIST_HEAD
	movq	40(%r12), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	32(%r12), %edi
	callq	*%rax
	movl	%eax, 48(%r12)
LBB0_5:
	movq	%r14, %rdi
	callq	_omap_gem_init
	movq	%r14, %rdi
	callq	_omap_modeset_init
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r15d
	movq	24(%r12), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_7:
	movl	4(%r12), %esi
	movq	%r14, %rdi
	callq	_drm_vblank_init
	testl	%eax, %eax
	je	LBB0_8
## %bb.17:
	movl	%eax, %r15d
	movq	24(%r12), %rdi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_13
LBB0_8:
	cmpl	$0, 4(%r12)
	je	LBB0_11
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_drm_crtc_vblank_off
	incq	%rbx
	movl	4(%r12), %eax
	cmpq	%rax, %rbx
	jb	LBB0_10
LBB0_11:
	movq	%r14, %rdi
	callq	_omap_fbdev_init
	movq	%r14, %rdi
	callq	_drm_kms_helper_poll_init
	movq	%r14, %rdi
	callq	_omap_modeset_enable_external_hpd
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_drm_dev_register
	testl	%eax, %eax
	je	LBB0_15
## %bb.12:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_omap_modeset_disable_external_hpd
	movq	%r14, %rdi
	callq	_drm_kms_helper_poll_fini
	movq	%r14, %rdi
	callq	_omap_fbdev_fini
	movl	%ebx, %r15d
LBB0_13:
	movq	%r14, %rdi
	callq	_drm_mode_config_cleanup
	movq	%r14, %rdi
	callq	_omap_drm_irq_uninstall
LBB0_14:
	movq	%r14, %rdi
	callq	_omap_gem_deinit
	movl	8(%r12), %edi
	callq	_destroy_workqueue
	movq	%r14, %rdi
	callq	_omap_disconnect_pipelines
	movq	%r12, %rdi
	callq	_omap_crtc_pre_uninit
	movq	%r14, %rdi
	callq	_drm_dev_put
LBB0_15:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_omap_drm_driver,4,2            ## @omap_drm_driver
	.comm	_omapdrm_soc_devices,4,2        ## @omapdrm_soc_devices
L_.str.1:                               ## @.str.1
	.asciz	"omapdrm"

L_.str.2:                               ## @.str.2
	.asciz	"omap_modeset_init failed: ret=%d\n"

L_.str.3:                               ## @.str.3
	.asciz	"could not init vblank\n"

	.no_dead_strip	_omapdrm_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omapdrm_init
_omapdrm_init:                          ; @omapdrm_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x19, x0
	mov	x0, x1
	bl	_dev_name
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
Lloh2:
	adrp	x0, _omap_drm_driver@GOTPAGE
Lloh3:
	ldr	x0, [x0, _omap_drm_driver@GOTPAGEOFF]
	mov	x1, x21
	bl	_drm_dev_alloc
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_PTR_ERR
LBB0_2:
	str	x20, [x19, #64]
	str	x19, [x20]
	str	x21, [x19, #24]
	bl	_omapdss_get_dss
	str	w0, [x19, #60]
	bl	_dispc_get_dispc
	str	w0, [x19, #32]
	ldr	w0, [x19, #60]
	bl	_dispc_get_ops
	str	x0, [x19, #40]
	mov	x0, x19
	bl	_omap_crtc_pre_init
Lloh4:
	adrp	x8, _omapdrm_soc_devices@GOTPAGE
Lloh5:
	ldr	x8, [x8, _omapdrm_soc_devices@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_soc_device_match
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w8, [x0]
	b	LBB0_5
LBB0_4:
	mov	w8, #0
LBB0_5:
	str	w8, [x19]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w1, #0
	bl	_alloc_ordered_workqueue
	str	w0, [x19, #8]
	add	x0, x19, #56
	bl	_mutex_init
	add	x0, x19, #52
	bl	_INIT_LIST_HEAD
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w0, [x19, #32]
	blr	x8
	str	w0, [x19, #48]
LBB0_7:
	mov	x0, x20
	bl	_omap_gem_init
	mov	x0, x20
	bl	_omap_modeset_init
	cbz	w0, LBB0_9
; %bb.8:
	mov	x21, x0
	ldr	x0, [x19, #24]
	str	x21, [sp]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_17
LBB0_9:
	ldr	w1, [x19, #4]
	mov	x0, x20
	bl	_drm_vblank_init
	cbz	w0, LBB0_11
; %bb.10:
	mov	x21, x0
	ldr	x0, [x19, #24]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	b	LBB0_16
LBB0_11:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_14
; %bb.12:
	mov	x21, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x21, lsl #2]
	bl	_drm_crtc_vblank_off
	add	x21, x21, #1
	ldr	w8, [x19, #4]
	cmp	x21, x8
	b.lo	LBB0_13
LBB0_14:
	mov	x0, x20
	bl	_omap_fbdev_init
	mov	x0, x20
	bl	_drm_kms_helper_poll_init
	mov	x0, x20
	bl	_omap_modeset_enable_external_hpd
	mov	x0, x20
	mov	w1, #0
	bl	_drm_dev_register
	mov	x21, x0
	cbz	w0, LBB0_18
; %bb.15:
	mov	x0, x20
	bl	_omap_modeset_disable_external_hpd
	mov	x0, x20
	bl	_drm_kms_helper_poll_fini
	mov	x0, x20
	bl	_omap_fbdev_fini
LBB0_16:
	mov	x0, x20
	bl	_drm_mode_config_cleanup
	mov	x0, x20
	bl	_omap_drm_irq_uninstall
LBB0_17:
	mov	x0, x20
	bl	_omap_gem_deinit
	ldr	w0, [x19, #8]
	bl	_destroy_workqueue
	mov	x0, x20
	bl	_omap_disconnect_pipelines
	mov	x0, x19
	bl	_omap_crtc_pre_uninit
	mov	x0, x20
	bl	_drm_dev_put
LBB0_18:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_omap_drm_driver,4,2            ; @omap_drm_driver
	.comm	_omapdrm_soc_devices,4,2        ; @omapdrm_soc_devices
l_.str.1:                               ; @.str.1
	.asciz	"omapdrm"

l_.str.2:                               ; @.str.2
	.asciz	"omap_modeset_init failed: ret=%d\n"

l_.str.3:                               ; @.str.3
	.asciz	"could not init vblank\n"

	.no_dead_strip	_omapdrm_init
.subsections_via_symbols
