	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lima_device_init               ## -- Begin function lima_device_init
	.p2align	4, 0x90
_lima_device_init:                      ## @lima_device_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	24(%rdi), %ebx
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_dma_set_coherent_mask
	movq	%r14, %rdi
	callq	_lima_clk_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_27
## %bb.1:
	movq	%r14, %rdi
	callq	_lima_regulator_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_26
## %bb.2:
	movq	%r14, %rdi
	callq	_lima_vm_create
	movl	%eax, 8(%r14)
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movq	$0, 48(%r14)
	movq	(%r14), %rax
	movq	_lima_gpu_mali450@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.4:
	movq	_LIMA_VA_RESERVE_START@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r14)
	movl	24(%r14), %edi
	movq	_LIMA_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	12(%r14), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_alloc_wc
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	jne	LBB0_8
## %bb.5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_24
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_25
LBB0_7:
	movq	_LIMA_VA_RESERVE_END@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r14)
LBB0_8:
	movl	40(%r14), %edi
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_platform_get_resource
	movl	24(%r14), %edi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 36(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	24(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	36(%r14), %edi
	callq	_PTR_ERR
	movl	%eax, %r15d
	jmp	LBB0_22
LBB0_10:
	movq	_lima_ip_num@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_14
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_lima_init_ip
	testl	%eax, %eax
	jne	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_12
LBB0_14:
	movq	%r14, %rdi
	callq	_lima_init_gp_pipe
	testl	%eax, %eax
	je	LBB0_17
LBB0_16:
	movl	%eax, %r15d
	testl	%ebx, %ebx
	jle	LBB0_22
LBB0_20:
	incl	%ebx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %esi
	movq	%r14, %rdi
	callq	_lima_fini_ip
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_21
LBB0_22:
	movq	16(%r14), %rdx
	testq	%rdx, %rdx
	je	LBB0_24
## %bb.23:
	movl	12(%r14), %ecx
	movl	24(%r14), %edi
	movq	_LIMA_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dma_free_wc
LBB0_24:
	movl	8(%r14), %edi
	callq	_lima_vm_put
LBB0_25:
	movq	%r14, %rdi
	callq	_lima_regulator_fini
LBB0_26:
	movq	%r14, %rdi
	callq	_lima_clk_fini
LBB0_27:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%r14, %rdi
	callq	_lima_init_pp_pipe
	testl	%eax, %eax
	je	LBB0_28
## %bb.18:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_lima_fini_gp_pipe
	testl	%ebx, %ebx
	jg	LBB0_20
	jmp	LBB0_22
LBB0_28:
	movl	24(%r14), %ebx
	movl	32(%r14), %edi
	callq	_clk_get_rate
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_dev_info
	movl	24(%r14), %ebx
	movl	28(%r14), %edi
	callq	_clk_get_rate
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_dev_info
	xorl	%r15d, %r15d
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_lima_gpu_mali450,8,3           ## @lima_gpu_mali450
	.comm	_LIMA_VA_RESERVE_START,4,2      ## @LIMA_VA_RESERVE_START
	.comm	_LIMA_PAGE_SIZE,4,2             ## @LIMA_PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_LIMA_VA_RESERVE_END,4,2        ## @LIMA_VA_RESERVE_END
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fail to ioremap iomem\n"

	.comm	_lima_ip_num,4,2                ## @lima_ip_num
L_.str.1:                               ## @.str.1
	.asciz	"bus rate = %lu\n"

L_.str.2:                               ## @.str.2
	.asciz	"mod rate = %lu"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lima_device_init               ; -- Begin function lima_device_init
	.p2align	2
_lima_device_init:                      ; @lima_device_init
	.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
	ldr	w20, [x0, #24]
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x20
	bl	_dma_set_coherent_mask
	mov	x0, x19
	bl	_lima_clk_init
	mov	x20, x0
	cbnz	w0, LBB0_24
; %bb.1:
	mov	x0, x19
	bl	_lima_regulator_init
	mov	x20, x0
	cbnz	w0, LBB0_23
; %bb.2:
	mov	x0, x19
	bl	_lima_vm_create
	str	w0, [x19, #8]
	cbz	w0, LBB0_6
; %bb.3:
	str	xzr, [x19, #48]
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _lima_gpu_mali450@GOTPAGE
Lloh1:
	ldr	x9, [x9, _lima_gpu_mali450@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
Lloh3:
	adrp	x8, _LIMA_VA_RESERVE_START@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LIMA_VA_RESERVE_START@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #44]
Lloh6:
	adrp	x8, _LIMA_PAGE_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LIMA_PAGE_SIZE@GOTPAGEOFF]
	ldr	w0, [x19, #24]
Lloh8:
	ldr	w1, [x8]
	add	x2, x19, #12
Lloh9:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	bl	_dma_alloc_wc
	str	x0, [x19, #16]
	cbnz	x0, LBB0_8
; %bb.5:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_21
LBB0_6:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_22
LBB0_7:
Lloh18:
	adrp	x8, _LIMA_VA_RESERVE_END@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LIMA_VA_RESERVE_END@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19, #44]
LBB0_8:
	ldr	w0, [x19, #40]
Lloh21:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	ldr	w0, [x19, #24]
	bl	_devm_ioremap_resource
	str	w0, [x19, #36]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.9:
	ldr	w0, [x19, #24]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	w0, [x19, #36]
	bl	_PTR_ERR
	mov	x20, x0
	b	LBB0_19
LBB0_10:
Lloh26:
	adrp	x22, _lima_ip_num@GOTPAGE
Lloh27:
	ldr	x22, [x22, _lima_ip_num@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.11:
	mov	w21, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_lima_init_ip
	cbnz	w0, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	w21, w21, #1
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_12
	b	LBB0_15
LBB0_14:
	mov	w21, #0
LBB0_15:
	mov	x0, x19
	bl	_lima_init_gp_pipe
	cbz	w0, LBB0_25
LBB0_16:
	mov	x20, x0
	cmp	w21, #1
	b.lt	LBB0_19
LBB0_17:
	add	w21, w21, #1
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	sub	w1, w21, #2
	mov	x0, x19
	bl	_lima_fini_ip
	sub	w21, w21, #1
	cmp	w21, #1
	b.hi	LBB0_18
LBB0_19:
	ldr	x2, [x19, #16]
	cbz	x2, LBB0_21
; %bb.20:
	ldr	w0, [x19, #24]
Lloh28:
	adrp	x8, _LIMA_PAGE_SIZE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _LIMA_PAGE_SIZE@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldr	w3, [x19, #12]
	bl	_dma_free_wc
LBB0_21:
	ldr	w0, [x19, #8]
	bl	_lima_vm_put
LBB0_22:
	mov	x0, x19
	bl	_lima_regulator_fini
LBB0_23:
	mov	x0, x19
	bl	_lima_clk_fini
LBB0_24:
	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
	ret
LBB0_25:
	mov	x0, x19
	bl	_lima_init_pp_pipe
	cbz	w0, LBB0_27
; %bb.26:
	mov	x20, x0
	mov	x0, x19
	bl	_lima_fini_gp_pipe
	cmp	w21, #1
	b.ge	LBB0_17
	b	LBB0_19
LBB0_27:
	ldr	w20, [x19, #24]
	ldr	w0, [x19, #32]
	bl	_clk_get_rate
	mov	x2, x0
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	ldp	w20, w0, [x19, #24]
	bl	_clk_get_rate
	mov	x2, x0
Lloh33:
	adrp	x1, l_.str.2@PAGE
Lloh34:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	mov	w20, #0
	b	LBB0_24
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_lima_gpu_mali450,8,3           ; @lima_gpu_mali450
	.comm	_LIMA_VA_RESERVE_START,4,2      ; @LIMA_VA_RESERVE_START
	.comm	_LIMA_PAGE_SIZE,4,2             ; @LIMA_PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_LIMA_VA_RESERVE_END,4,2        ; @LIMA_VA_RESERVE_END
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fail to ioremap iomem\n"

	.comm	_lima_ip_num,4,2                ; @lima_ip_num
l_.str.1:                               ; @.str.1
	.asciz	"bus rate = %lu\n"

l_.str.2:                               ; @.str.2
	.asciz	"mod rate = %lu"

.subsections_via_symbols
