	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdlcd_drm_bind
_hdlcd_drm_bind:                        ## @hdlcd_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	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$8, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	_hdlcd_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_3
## %bb.17:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_3:
	movq	%r15, 8(%r12)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_dev_set_drvdata
	movq	%r12, %rdi
	callq	_hdlcd_setup_mode_config
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_hdlcd_load
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.4:
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_of_graph_get_port_by_id
	movq	%rax, (%r15)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_component_bind_all
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	jmp	LBB0_14
LBB0_6:
	movq	%r14, %rdi
	callq	_pm_runtime_set_active
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:
	movq	%r14, %rdi
	callq	_pm_runtime_enable
	movl	4(%r12), %esi
	movq	%r12, %rdi
	callq	_drm_vblank_init
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movq	%r12, %rdi
	callq	_drm_mode_config_reset
	movq	%r12, %rdi
	callq	_drm_kms_helper_poll_init
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_drm_dev_register
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_drm_kms_helper_poll_fini
	movl	%r13d, %ebx
	jmp	LBB0_12
LBB0_8:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
LBB0_12:
	movl	(%r12), %edi
	callq	_pm_runtime_disable
LBB0_13:
	movq	%r12, %rdi
	callq	_drm_atomic_helper_shutdown
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_component_unbind_all
LBB0_14:
	movq	(%r15), %rdi
	callq	_of_node_put
	movq	$0, (%r15)
	movq	%r12, %rdi
	callq	_drm_irq_uninstall
	movl	(%r12), %edi
	callq	_of_reserved_mem_device_release
LBB0_15:
	movq	%r12, %rdi
	callq	_drm_mode_config_cleanup
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_dev_set_drvdata
	movq	%r12, %rdi
	callq	_drm_dev_put
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r12, %rdi
	movl	$32, %esi
	callq	_drm_fbdev_generic_setup
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_hdlcd_driver,4,2               ## @hdlcd_driver
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to bind all components\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to initialise vblank\n"

	.no_dead_strip	_hdlcd_drm_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdlcd_drm_bind
_hdlcd_drm_bind:                        ; @hdlcd_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	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x0, _hdlcd_driver@GOTPAGE
Lloh4:
	ldr	x0, [x0, _hdlcd_driver@GOTPAGEOFF]
	mov	x1, x19
	bl	_drm_dev_alloc
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	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_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_16
LBB0_4:
	str	x21, [x20, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_dev_set_drvdata
	mov	x0, x20
	bl	_hdlcd_setup_mode_config
	mov	x0, x20
	mov	w1, #0
	bl	_hdlcd_load
	mov	x22, x0
	cbnz	w0, LBB0_15
; %bb.5:
	ldr	w0, [x19]
	mov	w1, #0
	bl	_of_graph_get_port_by_id
	str	x0, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_component_bind_all
	cbz	w0, LBB0_7
; %bb.6:
	mov	x22, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_14
LBB0_7:
	mov	x0, x19
	bl	_pm_runtime_set_active
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.8:
	mov	x0, x19
	bl	_pm_runtime_enable
	ldr	w1, [x20, #4]
	mov	x0, x20
	bl	_drm_vblank_init
	tbnz	w0, #31, LBB0_11
; %bb.9:
	mov	x0, x20
	bl	_drm_mode_config_reset
	mov	x0, x20
	bl	_drm_kms_helper_poll_init
	mov	x0, x20
	mov	w1, #0
	bl	_drm_dev_register
	mov	x22, x0
	cbz	w0, LBB0_17
; %bb.10:
	mov	x0, x20
	bl	_drm_kms_helper_poll_fini
	b	LBB0_12
LBB0_11:
	mov	x22, x0
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
LBB0_12:
	ldr	w0, [x20]
	bl	_pm_runtime_disable
LBB0_13:
	mov	x0, x20
	bl	_drm_atomic_helper_shutdown
	mov	x0, x19
	mov	x1, x20
	bl	_component_unbind_all
LBB0_14:
	ldr	x0, [x21]
	bl	_of_node_put
	str	xzr, [x21]
	mov	x0, x20
	bl	_drm_irq_uninstall
	ldr	w0, [x20]
	bl	_of_reserved_mem_device_release
LBB0_15:
	mov	x0, x20
	bl	_drm_mode_config_cleanup
	mov	x0, x19
	mov	x1, #0
	bl	_dev_set_drvdata
	mov	x0, x20
	bl	_drm_dev_put
LBB0_16:
	mov	x0, x22
	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_17:
	mov	x0, x20
	mov	w1, #32
	bl	_drm_fbdev_generic_setup
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_hdlcd_driver,4,2               ; @hdlcd_driver
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to bind all components\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to initialise vblank\n"

	.no_dead_strip	_hdlcd_drm_bind
.subsections_via_symbols
