	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rockchip_drm_bind
_rockchip_drm_bind:                     ## @rockchip_drm_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_rockchip_drm_driver@GOTPCREL(%rip), %rdi
	movq	%r14, %rsi
	callq	_drm_dev_alloc
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.13:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_dev_set_drvdata
	movl	20(%r13), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$8, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	%rax, 8(%r13)
	movq	%rax, %rdi
	addq	$4, %rdi
	callq	_INIT_LIST_HEAD
	movq	%rbx, %rdi
	callq	_mutex_init
	movq	%r13, %rdi
	callq	_rockchip_drm_init_iommu
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.4:
	movq	%r13, %rdi
	callq	_drm_mode_config_init
	movq	%r13, %rdi
	callq	_rockchip_drm_mode_config_init
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_component_bind_all
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movl	16(%r13), %esi
	movq	%r13, %rdi
	callq	_drm_vblank_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	%r13, %rdi
	callq	_drm_mode_config_reset
	movl	$1, (%r13)
	movq	%r13, %rdi
	callq	_rockchip_drm_fbdev_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	%r13, %rdi
	callq	_drm_kms_helper_poll_init
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_drm_dev_register
	testl	%eax, %eax
	je	LBB0_12
## %bb.8:
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_drm_kms_helper_poll_fini
	movq	%r13, %rdi
	callq	_rockchip_drm_fbdev_fini
	movl	%r12d, %r15d
LBB0_9:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_component_unbind_all
LBB0_10:
	movq	%r13, %rdi
	callq	_drm_mode_config_cleanup
	movq	%r13, %rdi
	callq	_rockchip_iommu_cleanup
	jmp	LBB0_11
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_11:
	movq	$0, 8(%r13)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_dev_set_drvdata
	movq	%r13, %rdi
	callq	_drm_dev_put
LBB0_12:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rockchip_drm_driver,4,2        ## @rockchip_drm_driver
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_rockchip_drm_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rockchip_drm_bind
_rockchip_drm_bind:                     ; @rockchip_drm_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	x19, x0
Lloh0:
	adrp	x0, _rockchip_drm_driver@GOTPAGE
Lloh1:
	ldr	x0, [x0, _rockchip_drm_driver@GOTPAGEOFF]
	mov	x1, x19
	bl	_drm_dev_alloc
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	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:
	mov	x0, x19
	mov	x1, x20
	bl	_dev_set_drvdata
	ldr	w0, [x20, #20]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_devm_kzalloc
	cbz	x0, LBB0_11
; %bb.3:
	mov	x21, x0
	str	x0, [x20, #8]
	add	x0, x0, #4
	bl	_INIT_LIST_HEAD
	mov	x0, x21
	bl	_mutex_init
	mov	x0, x20
	bl	_rockchip_drm_init_iommu
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.4:
	mov	x0, x20
	bl	_drm_mode_config_init
	mov	x0, x20
	bl	_rockchip_drm_mode_config_init
	mov	x0, x19
	mov	x1, x20
	bl	_component_bind_all
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.5:
	ldr	w1, [x20, #16]
	mov	x0, x20
	bl	_drm_vblank_init
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.6:
	mov	x0, x20
	bl	_drm_mode_config_reset
	mov	w8, #1
	str	w8, [x20]
	mov	x0, x20
	bl	_rockchip_drm_fbdev_init
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.7:
	mov	x0, x20
	bl	_drm_kms_helper_poll_init
	mov	x0, x20
	mov	w1, #0
	bl	_drm_dev_register
	mov	x21, x0
	cbz	w0, LBB0_13
; %bb.8:
	mov	x0, x20
	bl	_drm_kms_helper_poll_fini
	mov	x0, x20
	bl	_rockchip_drm_fbdev_fini
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_component_unbind_all
LBB0_10:
	mov	x0, x20
	bl	_drm_mode_config_cleanup
	mov	x0, x20
	bl	_rockchip_iommu_cleanup
	b	LBB0_12
LBB0_11:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_12:
	str	xzr, [x20, #8]
	mov	x0, x19
	mov	x1, #0
	bl	_dev_set_drvdata
	mov	x0, x20
	bl	_drm_dev_put
LBB0_13:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_rockchip_drm_driver,4,2        ; @rockchip_drm_driver
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_rockchip_drm_bind
.subsections_via_symbols
