	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v3d_platform_drm_probe
_v3d_platform_drm_probe:                ## @v3d_platform_drm_probe
	.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), %r12
	movl	(%r12), %esi
	movl	$80, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r14, 72(%rax)
	movq	%r14, 64(%rax)
	leaq	56(%rax), %rsi
	leaq	L_.str(%rip), %rdx
	movq	%rax, %rdi
	callq	_map_regs
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
## %bb.3:
	movq	48(%r15), %rsi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	callq	_map_regs
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
LBB0_20:
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_21
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_V3D_MMU_DEBUG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_V3D_READ
	movl	%eax, %ebx
	movq	_V3D_MMU_PA_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_V3D_GET_FIELD
                                        ## kill: def $eax killed $eax def $rax
	leal	30(%rax), %edi
	callq	_DMA_BIT_MASK
	movl	%eax, (%r14)
	movq	_V3D_MMU_VA_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_V3D_GET_FIELD
	addl	$30, %eax
	movl	%eax, (%r15)
	movq	_V3D_HUB_IDENT1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_V3D_READ
	movl	%eax, %ebx
	movq	_V3D_HUB_IDENT1_TVER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_V3D_GET_FIELD
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax,4), %r13d
	movq	_V3D_HUB_IDENT1_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_V3D_GET_FIELD
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%r13,2), %eax
	movl	%eax, 4(%r15)
	movq	_V3D_HUB_IDENT1_NCORES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_V3D_GET_FIELD
	movl	%eax, 8(%r15)
	xorl	%edi, %edi
	cmpl	$2, %eax
	setge	%dil
	callq	_WARN_ON
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devm_reset_control_get_exclusive
	movq	%rax, 40(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	40(%r15), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	addl	(%rax), %ecx
	je	LBB0_20
## %bb.6:
	movq	$0, 40(%r15)
	leaq	36(%r15), %rsi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	callq	_map_regs
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_20
LBB0_8:
	cmpl	$40, 4(%r15)
	jg	LBB0_10
## %bb.9:
	leaq	32(%r15), %rsi
	leaq	L_.str.4(%rip), %rdx
	movq	%r15, %rdi
	callq	_map_regs
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_20
LBB0_10:
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	orl	(%r12), %ecx
	leaq	12(%r15), %rdx
	movq	___GFP_ZERO@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_dma_alloc_wc
	movl	%eax, 16(%r15)
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movq	%r15, %r12
	addq	$24, %r12
	movq	%r14, %rdi
	callq	_pm_runtime_use_autosuspend
	movq	%r14, %rdi
	movl	$50, %esi
	callq	_pm_runtime_set_autosuspend_delay
	movq	%r14, %rdi
	callq	_pm_runtime_enable
	movq	_v3d_drm_driver@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_drm_dev_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.13:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_platform_set_drvdata
	movq	%r15, 24(%r15)
	movq	%r12, %rdi
	callq	_v3d_gem_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.14:
	movq	%r15, %rdi
	callq	_v3d_irq_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.15:
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_drm_dev_register
	testl	%eax, %eax
	je	LBB0_21
## %bb.16:
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_v3d_irq_disable
	movl	%r13d, %ebx
LBB0_17:
	movq	%r12, %rdi
	callq	_v3d_gem_destroy
LBB0_18:
	movq	%r12, %rdi
	callq	_drm_dev_put
LBB0_19:
	movl	12(%r15), %ecx
	movl	16(%r15), %edx
	movq	%r14, %rdi
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_dma_free_wc
	jmp	LBB0_20
LBB0_11:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hub"

L_.str.1:                               ## @.str.1
	.asciz	"core0"

	.comm	_V3D_MMU_DEBUG_INFO,4,2         ## @V3D_MMU_DEBUG_INFO
	.comm	_V3D_MMU_PA_WIDTH,4,2           ## @V3D_MMU_PA_WIDTH
	.comm	_V3D_MMU_VA_WIDTH,4,2           ## @V3D_MMU_VA_WIDTH
	.comm	_V3D_HUB_IDENT1,4,2             ## @V3D_HUB_IDENT1
	.comm	_V3D_HUB_IDENT1_TVER,4,2        ## @V3D_HUB_IDENT1_TVER
	.comm	_V3D_HUB_IDENT1_REV,4,2         ## @V3D_HUB_IDENT1_REV
	.comm	_V3D_HUB_IDENT1_NCORES,4,2      ## @V3D_HUB_IDENT1_NCORES
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
L_.str.2:                               ## @.str.2
	.asciz	"bridge"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to get reset control or bridge regs\n"

L_.str.4:                               ## @.str.4
	.asciz	"gca"

	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
L_.str.5:                               ## @.str.5
	.asciz	"Failed to allocate MMU scratch page\n"

	.comm	_v3d_drm_driver,4,2             ## @v3d_drm_driver
	.no_dead_strip	_v3d_platform_drm_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v3d_platform_drm_probe
_v3d_platform_drm_probe:                ; @v3d_platform_drm_probe
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #80
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	stp	x20, x20, [x0, #64]
	add	x1, x0, #56
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	bl	_map_regs
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	x1, [x19, #48]
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_map_regs
	mov	x21, x0
	cbz	w0, LBB0_6
LBB0_3:
	mov	x0, x19
	bl	_kfree
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh9:
	adrp	x8, _V3D_MMU_DEBUG_INFO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V3D_MMU_DEBUG_INFO@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_V3D_READ
	mov	x21, x0
Lloh12:
	adrp	x8, _V3D_MMU_PA_WIDTH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _V3D_MMU_PA_WIDTH@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_V3D_GET_FIELD
	add	w0, w0, #30
	bl	_DMA_BIT_MASK
	str	w0, [x20]
Lloh15:
	adrp	x8, _V3D_MMU_VA_WIDTH@GOTPAGE
Lloh16:
	ldr	x8, [x8, _V3D_MMU_VA_WIDTH@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_V3D_GET_FIELD
	add	w8, w0, #30
	str	w8, [x19]
Lloh18:
	adrp	x8, _V3D_HUB_IDENT1@GOTPAGE
Lloh19:
	ldr	x8, [x8, _V3D_HUB_IDENT1@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_V3D_READ
	mov	x21, x0
Lloh21:
	adrp	x8, _V3D_HUB_IDENT1_TVER@GOTPAGE
Lloh22:
	ldr	x8, [x8, _V3D_HUB_IDENT1_TVER@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_V3D_GET_FIELD
	mov	x22, x0
	mov	w24, #10
Lloh24:
	adrp	x8, _V3D_HUB_IDENT1_REV@GOTPAGE
Lloh25:
	ldr	x8, [x8, _V3D_HUB_IDENT1_REV@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_V3D_GET_FIELD
	madd	w8, w22, w24, w0
	str	w8, [x19, #4]
Lloh27:
	adrp	x8, _V3D_HUB_IDENT1_NCORES@GOTPAGE
Lloh28:
	ldr	x8, [x8, _V3D_HUB_IDENT1_NCORES@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_V3D_GET_FIELD
	str	w0, [x19, #8]
	cmp	w0, #1
	cset	w0, gt
	bl	_WARN_ON
	mov	x0, x20
	mov	x1, #0
	bl	_devm_reset_control_get_exclusive
	str	x0, [x19, #40]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.7:
	ldr	x0, [x19, #40]
	bl	_PTR_ERR
	mov	x21, x0
Lloh30:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_3
; %bb.8:
	str	xzr, [x19, #40]
	add	x1, x19, #36
Lloh33:
	adrp	x2, l_.str.2@PAGE
Lloh34:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_map_regs
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
Lloh35:
	adrp	x1, l_.str.3@PAGE
Lloh36:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_3
LBB0_10:
	ldr	w8, [x19, #4]
	cmp	w8, #40
	b.gt	LBB0_12
; %bb.11:
	add	x1, x19, #32
Lloh37:
	adrp	x2, l_.str.4@PAGE
Lloh38:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_map_regs
	mov	x21, x0
	cbnz	w0, LBB0_3
LBB0_12:
	add	x2, x19, #12
	ldr	w8, [x23]
Lloh39:
	adrp	x9, ___GFP_NOWARN@GOTPAGE
Lloh40:
	ldr	x9, [x9, ___GFP_NOWARN@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh42:
	adrp	x9, ___GFP_ZERO@GOTPAGE
Lloh43:
	ldr	x9, [x9, ___GFP_ZERO@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	x0, x20
	mov	w1, #4096
	bl	_dma_alloc_wc
	str	w0, [x19, #16]
	cbz	w0, LBB0_21
; %bb.13:
	add	x22, x19, #24
	mov	x0, x20
	bl	_pm_runtime_use_autosuspend
	mov	x0, x20
	mov	w1, #50
	bl	_pm_runtime_set_autosuspend_delay
	mov	x0, x20
	bl	_pm_runtime_enable
Lloh45:
	adrp	x1, _v3d_drm_driver@GOTPAGE
Lloh46:
	ldr	x1, [x1, _v3d_drm_driver@GOTPAGEOFF]
	mov	x0, x22
	mov	x2, x20
	bl	_drm_dev_init
	mov	x21, x0
	cbnz	w0, LBB0_20
; %bb.14:
	mov	x0, x20
	mov	x1, x22
	bl	_platform_set_drvdata
	str	x19, [x19, #24]
	mov	x0, x22
	bl	_v3d_gem_init
	mov	x21, x0
	cbnz	w0, LBB0_19
; %bb.15:
	mov	x0, x19
	bl	_v3d_irq_init
	mov	x21, x0
	cbnz	w0, LBB0_18
; %bb.16:
	mov	x0, x22
	mov	w1, #0
	bl	_drm_dev_register
	mov	x21, x0
	cbz	w0, LBB0_5
; %bb.17:
	mov	x0, x19
	bl	_v3d_irq_disable
LBB0_18:
	mov	x0, x22
	bl	_v3d_gem_destroy
LBB0_19:
	mov	x0, x22
	bl	_drm_dev_put
LBB0_20:
	ldp	w3, w2, [x19, #12]
	mov	x0, x20
	mov	w1, #4096
	bl	_dma_free_wc
	b	LBB0_3
LBB0_21:
Lloh47:
	adrp	x1, l_.str.5@PAGE
Lloh48:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh49:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh50:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hub"

l_.str.1:                               ; @.str.1
	.asciz	"core0"

	.comm	_V3D_MMU_DEBUG_INFO,4,2         ; @V3D_MMU_DEBUG_INFO
	.comm	_V3D_MMU_PA_WIDTH,4,2           ; @V3D_MMU_PA_WIDTH
	.comm	_V3D_MMU_VA_WIDTH,4,2           ; @V3D_MMU_VA_WIDTH
	.comm	_V3D_HUB_IDENT1,4,2             ; @V3D_HUB_IDENT1
	.comm	_V3D_HUB_IDENT1_TVER,4,2        ; @V3D_HUB_IDENT1_TVER
	.comm	_V3D_HUB_IDENT1_REV,4,2         ; @V3D_HUB_IDENT1_REV
	.comm	_V3D_HUB_IDENT1_NCORES,4,2      ; @V3D_HUB_IDENT1_NCORES
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
l_.str.2:                               ; @.str.2
	.asciz	"bridge"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to get reset control or bridge regs\n"

l_.str.4:                               ; @.str.4
	.asciz	"gca"

	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
l_.str.5:                               ; @.str.5
	.asciz	"Failed to allocate MMU scratch page\n"

	.comm	_v3d_drm_driver,4,2             ; @v3d_drm_driver
	.no_dead_strip	_v3d_platform_drm_probe
.subsections_via_symbols
