	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc4_drm_bind
_vc4_drm_bind:                          ## @vc4_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, %r12
	callq	_to_platform_device
	movq	%rax, %r15
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movl	%eax, (%r12)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	_vc4_v3d_dt_match@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	xorl	%edx, %edx
	callq	_of_find_matching_node_and_match
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_of_device_is_available
	testl	%eax, %eax
	jne	LBB0_5
LBB0_4:
	movq	_DRIVER_RENDER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	_vc4_drm_driver@GOTPCREL(%rip), %rcx
	andl	%eax, (%rcx)
LBB0_5:
	movq	%rbx, %rdi
	callq	_of_node_put
	movq	_vc4_drm_driver@GOTPCREL(%rip), %rdi
	movq	%r12, %rsi
	callq	_drm_dev_alloc
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.14:
	movq	%r14, %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_13
LBB0_6:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	movq	%r14, 8(%r13)
	movq	%r13, (%r14)
	movq	%r13, %rdi
	addq	$4, %rdi
	callq	_INIT_LIST_HEAD
	movq	%r13, %rdi
	callq	_mutex_init
	movq	%r14, %rdi
	callq	_vc4_bo_cache_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movq	%r14, %rdi
	callq	_drm_mode_config_init
	movq	%r14, %rdi
	callq	_vc4_gem_init
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_component_bind_all
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	leaq	L_.str(%rip), %rsi
	xorl	%edi, %edi
	xorl	%edx, %edx
	callq	_drm_fb_helper_remove_conflicting_framebuffers
	movq	%r14, %rdi
	callq	_vc4_kms_load
	testl	%eax, %eax
	js	LBB0_10
## %bb.9:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_drm_dev_register
	testl	%eax, %eax
	js	LBB0_10
## %bb.15:
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_drm_fbdev_generic_setup
	jmp	LBB0_13
LBB0_10:
	movl	%eax, %ebx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_component_unbind_all
LBB0_11:
	movq	%r14, %rdi
	callq	_vc4_gem_destroy
	movq	%r14, %rdi
	callq	_vc4_bo_cache_destroy
LBB0_12:
	movq	%r14, %rdi
	callq	_drm_dev_put
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_vc4_v3d_dt_match,4,2           ## @vc4_v3d_dt_match
	.comm	_DRIVER_RENDER,4,2              ## @DRIVER_RENDER
	.comm	_vc4_drm_driver,4,2             ## @vc4_drm_driver
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vc4drmfb"

	.no_dead_strip	_vc4_drm_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc4_drm_bind
_vc4_drm_bind:                          ; @vc4_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
	bl	_to_platform_device
	mov	x21, x0
	mov	w0, #32
	bl	_DMA_BIT_MASK
	str	w0, [x19]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x22, x0
Lloh3:
	adrp	x8, _vc4_v3d_dt_match@GOTPAGE
Lloh4:
	ldr	x8, [x8, _vc4_v3d_dt_match@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, #0
	mov	x2, #0
	bl	_of_find_matching_node_and_match
	mov	x20, x0
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_of_device_is_available
	cbnz	w0, LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _vc4_drm_driver@GOTPAGE
Lloh7:
	ldr	x8, [x8, _vc4_drm_driver@GOTPAGEOFF]
Lloh8:
	adrp	x9, _DRIVER_RENDER@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DRIVER_RENDER@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	ldr	w10, [x8]
	bic	w9, w10, w9
	str	w9, [x8]
LBB0_4:
	mov	x0, x20
	bl	_of_node_put
Lloh11:
	adrp	x0, _vc4_drm_driver@GOTPAGE
Lloh12:
	ldr	x0, [x0, _vc4_drm_driver@GOTPAGEOFF]
	mov	x1, x19
	bl	_drm_dev_alloc
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.5:
	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_6:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_15
LBB0_7:
	mov	x0, x21
	mov	x1, x20
	bl	_platform_set_drvdata
	str	x20, [x22, #8]
	str	x22, [x20]
	add	x0, x22, #4
	bl	_INIT_LIST_HEAD
	mov	x0, x22
	bl	_mutex_init
	mov	x0, x20
	bl	_vc4_bo_cache_init
	mov	x21, x0
	cbnz	w0, LBB0_14
; %bb.8:
	mov	x0, x20
	bl	_drm_mode_config_init
	mov	x0, x20
	bl	_vc4_gem_init
	mov	x0, x19
	mov	x1, x20
	bl	_component_bind_all
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.9:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, #0
	mov	w2, #0
	bl	_drm_fb_helper_remove_conflicting_framebuffers
	mov	x0, x20
	bl	_vc4_kms_load
	tbnz	w0, #31, LBB0_12
; %bb.10:
	mov	x0, x20
	mov	w1, #0
	bl	_drm_dev_register
	tbnz	w0, #31, LBB0_12
; %bb.11:
	mov	x0, x20
	mov	w1, #16
	bl	_drm_fbdev_generic_setup
	mov	w21, #0
	b	LBB0_15
LBB0_12:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	bl	_component_unbind_all
LBB0_13:
	mov	x0, x20
	bl	_vc4_gem_destroy
	mov	x0, x20
	bl	_vc4_bo_cache_destroy
LBB0_14:
	mov	x0, x20
	bl	_drm_dev_put
LBB0_15:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_vc4_v3d_dt_match,4,2           ; @vc4_v3d_dt_match
	.comm	_DRIVER_RENDER,4,2              ; @DRIVER_RENDER
	.comm	_vc4_drm_driver,4,2             ; @vc4_drm_driver
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vc4drmfb"

	.no_dead_strip	_vc4_drm_bind
.subsections_via_symbols
