	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_panfrost_device_init           ## -- Begin function panfrost_device_init
	.p2align	4, 0x90
_panfrost_device_init:                  ## @panfrost_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	addq	$28, %rdi
	callq	_mutex_init
	leaq	24(%rbx), %rdi
	callq	_mutex_init
	leaq	20(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	16(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	12(%rbx), %rdi
	callq	_spin_lock_init
	movq	%rbx, %rdi
	callq	_panfrost_clk_init
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r14d
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_19
LBB0_2:
	movq	%rbx, %rdi
	callq	_panfrost_regulator_init
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r14d
	movl	4(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_18
LBB0_4:
	movq	%rbx, %rdi
	callq	_panfrost_reset_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r14d
	movl	4(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_17
LBB0_6:
	movl	8(%rbx), %edi
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movl	4(%rbx), %edi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, (%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	4(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%rbx), %edi
	callq	_PTR_ERR
	movl	%eax, %r14d
	jmp	LBB0_16
LBB0_8:
	movq	%rbx, %rdi
	callq	_panfrost_gpu_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.9:
	movq	%rbx, %rdi
	callq	_panfrost_mmu_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.10:
	movq	%rbx, %rdi
	callq	_panfrost_job_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.11:
	movq	%rbx, %rdi
	callq	_panfrost_perfcnt_init
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_panfrost_job_fini
LBB0_14:
	movq	%rbx, %rdi
	callq	_panfrost_mmu_fini
LBB0_15:
	movq	%rbx, %rdi
	callq	_panfrost_gpu_fini
LBB0_16:
	movq	%rbx, %rdi
	callq	_panfrost_reset_fini
LBB0_17:
	movq	%rbx, %rdi
	callq	_panfrost_regulator_fini
LBB0_18:
	movq	%rbx, %rdi
	callq	_panfrost_clk_fini
LBB0_19:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_12:
	xorl	%r14d, %r14d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clk init failed %d\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"reset init failed %d\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.3:                               ## @.str.3
	.asciz	"failed to ioremap iomem\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_panfrost_device_init           ; -- Begin function panfrost_device_init
	.p2align	2
_panfrost_device_init:                  ; @panfrost_device_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	add	x0, x0, #28
	bl	_mutex_init
	add	x0, x19, #24
	bl	_mutex_init
	add	x0, x19, #20
	bl	_INIT_LIST_HEAD
	add	x0, x19, #16
	bl	_INIT_LIST_HEAD
	add	x0, x19, #12
	bl	_spin_lock_init
	mov	x0, x19
	bl	_panfrost_clk_init
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19, #4]
	str	x20, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_18
LBB0_2:
	mov	x0, x19
	bl	_panfrost_regulator_init
	cbz	w0, LBB0_4
; %bb.3:
	mov	x20, x0
	ldr	w0, [x19, #4]
	str	x20, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	b	LBB0_17
LBB0_4:
	mov	x0, x19
	bl	_panfrost_reset_init
	cbz	w0, LBB0_6
; %bb.5:
	mov	x20, x0
	ldr	w0, [x19, #4]
	str	x20, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	b	LBB0_16
LBB0_6:
	ldr	w0, [x19, #8]
Lloh6:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	ldr	w0, [x19, #4]
	bl	_devm_ioremap_resource
	str	w0, [x19]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x19, #4]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	ldr	w0, [x19]
	bl	_PTR_ERR
	mov	x20, x0
	b	LBB0_15
LBB0_8:
	mov	x0, x19
	bl	_panfrost_gpu_init
	mov	x20, x0
	cbnz	w0, LBB0_15
; %bb.9:
	mov	x0, x19
	bl	_panfrost_mmu_init
	mov	x20, x0
	cbnz	w0, LBB0_14
; %bb.10:
	mov	x0, x19
	bl	_panfrost_job_init
	mov	x20, x0
	cbnz	w0, LBB0_13
; %bb.11:
	mov	x0, x19
	bl	_panfrost_perfcnt_init
	mov	x20, x0
	cbz	w0, LBB0_18
; %bb.12:
	mov	x0, x19
	bl	_panfrost_job_fini
LBB0_13:
	mov	x0, x19
	bl	_panfrost_mmu_fini
LBB0_14:
	mov	x0, x19
	bl	_panfrost_gpu_fini
LBB0_15:
	mov	x0, x19
	bl	_panfrost_reset_fini
LBB0_16:
	mov	x0, x19
	bl	_panfrost_regulator_fini
LBB0_17:
	mov	x0, x19
	bl	_panfrost_clk_fini
LBB0_18:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clk init failed %d\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"reset init failed %d\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.3:                               ; @.str.3
	.asciz	"failed to ioremap iomem\n"

.subsections_via_symbols
