	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function zx_drm_bind
LCPI0_0:
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	4096                            ## 0x1000
	.long	4096                            ## 0x1000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_zx_drm_bind:                           ## @zx_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_zx_drm_driver@GOTPCREL(%rip), %rdi
	movq	%r14, %rsi
	callq	_drm_dev_alloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.11:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_dev_set_drvdata
	movq	%rbx, %rdi
	callq	_drm_mode_config_init
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [16,16,4096,4096]
	movups	%xmm0, 8(%rbx)
	movq	_zx_drm_mode_config_funcs@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_component_bind_all
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
	jmp	LBB0_9
LBB0_3:
	movl	24(%rbx), %esi
	movq	%rbx, %rdi
	callq	_drm_vblank_init
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	callq	_drm_mode_config_reset
	movq	%rbx, %rdi
	callq	_drm_kms_helper_poll_init
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_drm_dev_register
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_drm_kms_helper_poll_fini
	movq	%rbx, %rdi
	callq	_drm_mode_config_cleanup
	movl	%r12d, %r15d
	jmp	LBB0_8
LBB0_4:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_DRM_DEV_ERROR
LBB0_8:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_component_unbind_all
LBB0_9:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_dev_set_drvdata
	movq	%rbx, %rdi
	callq	_drm_dev_put
LBB0_10:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, %rdi
	movl	$32, %esi
	callq	_drm_fbdev_generic_setup
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_zx_drm_driver,4,2              ## @zx_drm_driver
	.comm	_zx_drm_mode_config_funcs,4,2   ## @zx_drm_mode_config_funcs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to bind all components: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to init vblank: %d\n"

	.no_dead_strip	_zx_drm_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function zx_drm_bind
lCPI0_0:
	.long	16                              ; 0x10
	.long	16                              ; 0x10
	.long	4096                            ; 0x1000
	.long	4096                            ; 0x1000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_zx_drm_bind:                           ; @zx_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	x20, x0
Lloh0:
	adrp	x0, _zx_drm_driver@GOTPAGE
Lloh1:
	ldr	x0, [x0, _zx_drm_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:
	mov	x0, x20
	mov	x1, x19
	bl	_dev_set_drvdata
	mov	x0, x19
	bl	_drm_mode_config_init
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	stur	q0, [x19, #8]
Lloh4:
	adrp	x8, _zx_drm_mode_config_funcs@GOTPAGE
Lloh5:
	ldr	x8, [x8, _zx_drm_mode_config_funcs@GOTPAGEOFF]
	str	x8, [x19, #32]
	mov	x0, x20
	mov	x1, x19
	bl	_component_bind_all
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_DRM_DEV_ERROR
	b	LBB0_9
LBB0_4:
	ldr	w1, [x19, #24]
	mov	x0, x19
	bl	_drm_vblank_init
	tbnz	w0, #31, LBB0_7
; %bb.5:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_drm_mode_config_reset
	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_11
; %bb.6:
	mov	x0, x19
	bl	_drm_kms_helper_poll_fini
	mov	x0, x19
	bl	_drm_mode_config_cleanup
	b	LBB0_8
LBB0_7:
	mov	x21, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_DRM_DEV_ERROR
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	bl	_component_unbind_all
LBB0_9:
	mov	x0, x20
	mov	x1, #0
	bl	_dev_set_drvdata
	mov	x0, x19
	bl	_drm_dev_put
LBB0_10:
	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_11:
	mov	x0, x19
	mov	w1, #32
	bl	_drm_fbdev_generic_setup
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdrp	Lloh2, Lloh4
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_zx_drm_driver,4,2              ; @zx_drm_driver
	.comm	_zx_drm_mode_config_funcs,4,2   ; @zx_drm_mode_config_funcs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to bind all components: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to init vblank: %d\n"

	.no_dead_strip	_zx_drm_bind
.subsections_via_symbols
