	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_drv_bind
_sun4i_drv_bind:                        ## @sun4i_drv_bind
	.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	%rdi, %r14
	movq	_sun4i_drv_driver@GOTPCREL(%rip), %rdi
	movq	%r14, %rsi
	callq	_drm_dev_alloc
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.15:
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$12, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_dev_set_drvdata
	movq	%rbx, 16(%r12)
	leaq	8(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_INIT_LIST_HEAD
	movq	%rbx, %rdi
	callq	_INIT_LIST_HEAD
	movq	%r14, %rdi
	callq	_of_reserved_mem_device_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.4:
	movl	%eax, %r15d
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r15d, %eax
	jne	LBB0_5
LBB0_6:
	movq	%r12, %rdi
	callq	_drm_mode_config_init
	movl	$1, 4(%r12)
	movl	12(%r12), %edi
	movq	%r12, %rsi
	callq	_component_bind_all
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r15d
	movl	12(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_12
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_13
LBB0_5:
	movl	12(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_13
LBB0_8:
	movl	8(%r12), %esi
	movq	%r12, %rdi
	callq	_drm_vblank_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.9:
	movl	$1, (%r12)
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	xorl	%edx, %edx
	callq	_drm_fb_helper_remove_conflicting_framebuffers
	movq	%r12, %rdi
	callq	_sun4i_framebuffer_init
	movq	%r12, %rdi
	callq	_drm_kms_helper_poll_init
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_drm_dev_register
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_drm_kms_helper_poll_fini
	movl	%ebx, %r15d
LBB0_12:
	movq	%r12, %rdi
	callq	_drm_mode_config_cleanup
	movq	%r14, %rdi
	callq	_of_reserved_mem_device_release
LBB0_13:
	movq	%r12, %rdi
	callq	_drm_dev_put
LBB0_14:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r12, %rdi
	movl	$32, %esi
	callq	_drm_fbdev_generic_setup
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_sun4i_drv_driver,4,2           ## @sun4i_drv_driver
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Couldn't claim our memory region\n"

L_.str.1:                               ## @.str.1
	.asciz	"Couldn't bind all pipelines components\n"

L_.str.2:                               ## @.str.2
	.asciz	"sun4i-drm-fb"

	.no_dead_strip	_sun4i_drv_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4i_drv_bind
_sun4i_drv_bind:                        ; @sun4i_drv_bind
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x0
Lloh0:
	adrp	x0, _sun4i_drv_driver@GOTPAGE
Lloh1:
	ldr	x0, [x0, _sun4i_drv_driver@GOTPAGEOFF]
	mov	x1, x20
	bl	_drm_dev_alloc
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_2:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #12
	bl	_devm_kzalloc
	cbz	x0, LBB0_7
; %bb.3:
	mov	x21, x0
	mov	x0, x20
	mov	x1, x19
	bl	_dev_set_drvdata
	str	x21, [x19, #16]
	add	x0, x21, #8
	bl	_INIT_LIST_HEAD
	add	x0, x21, #4
	bl	_INIT_LIST_HEAD
	mov	x0, x21
	bl	_INIT_LIST_HEAD
	mov	x0, x20
	bl	_of_reserved_mem_device_init
	cbz	w0, LBB0_5
; %bb.4:
	mov	x21, x0
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_8
LBB0_5:
	mov	x0, x19
	bl	_drm_mode_config_init
	mov	w8, #1
	str	w8, [x19, #4]
	ldr	w0, [x19, #12]
	mov	x1, x19
	bl	_component_bind_all
	cbz	w0, LBB0_9
; %bb.6:
	mov	x21, x0
	ldr	w0, [x19, #12]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_12
LBB0_7:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_13
LBB0_8:
	ldr	w0, [x19, #12]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_13
LBB0_9:
	ldr	w1, [x19, #8]
	mov	x0, x19
	bl	_drm_vblank_init
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.10:
	mov	w8, #1
	str	w8, [x19]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, #0
	mov	w2, #0
	bl	_drm_fb_helper_remove_conflicting_framebuffers
	mov	x0, x19
	bl	_sun4i_framebuffer_init
	mov	x0, x19
	bl	_drm_kms_helper_poll_init
	mov	x0, x19
	mov	w1, #0
	bl	_drm_dev_register
	mov	x21, x0
	cbz	w0, LBB0_15
; %bb.11:
	mov	x0, x19
	bl	_drm_kms_helper_poll_fini
LBB0_12:
	mov	x0, x19
	bl	_drm_mode_config_cleanup
	mov	x0, x20
	bl	_of_reserved_mem_device_release
LBB0_13:
	mov	x0, x19
	bl	_drm_dev_put
LBB0_14:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x0, x19
	mov	w1, #32
	bl	_drm_fbdev_generic_setup
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_sun4i_drv_driver,4,2           ; @sun4i_drv_driver
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Couldn't claim our memory region\n"

l_.str.1:                               ; @.str.1
	.asciz	"Couldn't bind all pipelines components\n"

l_.str.2:                               ; @.str.2
	.asciz	"sun4i-drm-fb"

	.no_dead_strip	_sun4i_drv_bind
.subsections_via_symbols
