	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpu_mdss_init                  ## -- Begin function dpu_mdss_init
	.p2align	4, 0x90
_dpu_mdss_init:                         ## @dpu_mdss_init
	.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, %rbx
	movl	(%rdi), %edi
	callq	_to_platform_device
	movq	%rax, %r14
	movq	8(%rbx), %r13
	movl	(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movq	%rdx, %rsi
	callq	_msm_ioremap
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	(%r15), %rsi
	testq	%rax, %rax
	je	LBB0_3
## %bb.17:
	movq	%rsi, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_platform_get_resource_byname
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rdi
	callq	_resource_size
	movl	%eax, 32(%r15)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_dpu_mdss_parse_data_bus_icc_path
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.6:
	leaq	24(%r15), %rsi
	movq	%r14, %rdi
	callq	_msm_dss_parse_clock
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	callq	_DPU_ERROR
	jmp	LBB0_13
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_ERROR
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_16:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rbx, 16(%r15)
	movq	_mdss_funcs@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r15)
	movq	%r15, %rdi
	callq	__dpu_mdss_irq_domain_add
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_9
LBB0_12:
	movl	24(%r15), %edi
	movl	28(%r15), %esi
	callq	_msm_dss_put_clk
LBB0_13:
	movl	24(%r15), %esi
	movq	%r14, %rdi
	callq	_devm_kfree
	movq	(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	callq	_devm_iounmap
LBB0_15:
	movq	$0, (%r15)
	jmp	LBB0_16
LBB0_9:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	testl	%eax, %eax
	js	LBB0_11
## %bb.10:
	movq	%r15, %r14
	addq	$8, %r14
	movq	_dpu_mdss_irq@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	movq	%r15, %rdx
	callq	_irq_set_chained_handler_and_data
	movq	%r14, (%r13)
	movl	(%rbx), %edi
	callq	_pm_runtime_enable
	movq	(%r13), %rdi
	callq	_dpu_mdss_icc_request_bw
	jmp	LBB0_16
LBB0_11:
	movq	%r15, %rdi
	callq	__dpu_mdss_irq_domain_fini
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_12
	.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	"mdss"

L_.str.1:                               ## @.str.1
	.asciz	"mapped mdss address space @%pK\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.2:                               ## @.str.2
	.asciz	"failed to get memory resource for mdss\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to parse clocks, ret=%d\n"

	.comm	_mdss_funcs,4,2                 ## @mdss_funcs
	.comm	_dpu_mdss_irq,4,2               ## @dpu_mdss_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpu_mdss_init                  ; -- Begin function dpu_mdss_init
	.p2align	2
_dpu_mdss_init:                         ; @dpu_mdss_init
	.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	x21, x0
	ldr	w0, [x0]
	bl	_to_platform_device
	mov	x20, x0
	ldr	x23, [x21, #8]
	ldr	w0, [x21]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x1
	bl	_msm_ioremap
	str	x0, [x19]
	bl	_IS_ERR
	ldr	x1, [x19]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x1
	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
	b	_PTR_ERR
LBB0_3:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG
Lloh7:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	bl	_platform_get_resource_byname
	cbz	x0, LBB0_7
; %bb.4:
	bl	_resource_size
	str	w0, [x19, #32]
	mov	x0, x21
	mov	x1, x19
	bl	_dpu_mdss_parse_data_bus_icc_path
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.5:
	add	x1, x19, #24
	mov	x0, x20
	bl	_msm_dss_parse_clock
	cbz	w0, LBB0_10
; %bb.6:
	mov	x22, x0
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x22
	bl	_DPU_ERROR
	b	LBB0_12
LBB0_7:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
LBB0_8:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x22
	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_10:
Lloh19:
	adrp	x8, _mdss_funcs@GOTPAGE
Lloh20:
	ldr	x8, [x8, _mdss_funcs@GOTPAGEOFF]
	mov	x24, x19
	str	x8, [x24, #8]!
	str	x21, [x19, #16]
	mov	x0, x19
	bl	__dpu_mdss_irq_domain_add
	mov	x22, x0
	cbz	w0, LBB0_15
LBB0_11:
	ldp	w0, w1, [x19, #24]
	bl	_msm_dss_put_clk
LBB0_12:
	ldr	w1, [x19, #24]
	mov	x0, x20
	bl	_devm_kfree
	ldr	x1, [x19]
	cbz	x1, LBB0_14
; %bb.13:
	mov	x0, x20
	bl	_devm_iounmap
LBB0_14:
	str	xzr, [x19]
	b	LBB0_9
LBB0_15:
	mov	x0, x20
	mov	w1, #0
	bl	_platform_get_irq
	tbnz	w0, #31, LBB0_17
; %bb.16:
Lloh21:
	adrp	x8, _dpu_mdss_irq@GOTPAGE
Lloh22:
	ldr	x8, [x8, _dpu_mdss_irq@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_irq_set_chained_handler_and_data
	str	x24, [x23]
	ldr	w0, [x21]
	bl	_pm_runtime_enable
	ldr	x0, [x23]
	bl	_dpu_mdss_icc_request_bw
	mov	w22, #0
	b	LBB0_9
LBB0_17:
	mov	x0, x19
	bl	__dpu_mdss_irq_domain_fini
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.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	"mdss"

l_.str.1:                               ; @.str.1
	.asciz	"mapped mdss address space @%pK\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.2:                               ; @.str.2
	.asciz	"failed to get memory resource for mdss\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to parse clocks, ret=%d\n"

	.comm	_mdss_funcs,4,2                 ; @mdss_funcs
	.comm	_dpu_mdss_irq,4,2               ; @dpu_mdss_irq
.subsections_via_symbols
