	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_device_reset                ## -- Begin function hl_device_reset
	.p2align	4, 0x90
_hl_device_reset:                       ## @hl_device_reset
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	cmpl	$0, 116(%rdi)
	je	LBB0_37
## %bb.1:
	movl	%edx, %r14d
	movl	%esi, %r15d
	testl	%edx, %edx
	je	LBB0_39
LBB0_2:
	leaq	112(%r13), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	108(%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	64(%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	16(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testl	%r14d, %r14d
	jne	LBB0_6
	.p2align	4, 0x90
LBB0_3:
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.4:
	movl	$1, 4(%r13)
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	jne	LBB0_41
## %bb.5:
	xorl	%r12d, %r12d
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_6:
	testl	%r15d, %r15d
	je	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	callq	_device_late_fini
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_8:
	movq	32(%r13), %rax
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	*32(%rax)
	movq	%r13, %rdi
	callq	_hl_cs_rollback_all
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	callq	_device_kill_open_processes
LBB0_10:
	testl	%r15d, %r15d
	je	LBB0_14
## %bb.11:
	movq	48(%r13), %rdi
	callq	_hl_ctx_put
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.12:
	movq	$0, 48(%r13)
LBB0_13:
	movq	32(%r13), %rax
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	*24(%rax)
	movq	%r13, %rdi
	callq	_hl_vm_fini
	movq	%r13, %rdi
	callq	_hl_mmu_fini
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_hl_eq_reset
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_14:
	movq	32(%r13), %rax
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	*24(%rax)
LBB0_15:
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_hl_hw_queue_reset
	cmpl	$0, 104(%r13)
	jle	LBB0_18
## %bb.16:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	96(%r13), %rsi
	addq	%r12, %rsi
	movq	%r13, %rdi
	callq	_hl_cq_reset
	incq	%rbx
	movslq	104(%r13), %rax
	addq	$4, %r12
	cmpq	%rax, %rbx
	jl	LBB0_17
LBB0_18:
	movq	$0, 88(%r13)
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_ktime_set
	movq	80(%r13), %rcx
	movq	%rax, 8(%rcx)
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_ktime_set
	movq	80(%r13), %rcx
	movq	%rax, (%rcx)
	movq	72(%r13), %rdx
	testq	%rdx, %rdx
	je	LBB0_20
## %bb.19:
	movl	20(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_crit
LBB0_20:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_lock
	movq	56(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.21:
	addq	$8, %rdi
	movl	$1, %esi
	callq	_atomic_set
	movq	56(%r13), %rax
	movq	$0, (%rax)
LBB0_22:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	testl	%r15d, %r15d
	je	LBB0_27
## %bb.23:
	movq	$0, 4(%r13)
	cmpq	$0, 48(%r13)
	jne	LBB0_42
## %bb.24:
	movq	%r13, %rdi
	callq	_hl_mmu_init
	testl	%eax, %eax
	jne	LBB0_43
## %bb.25:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	%rax, 48(%r13)
	testq	%rax, %rax
	je	LBB0_45
## %bb.26:
	movq	$0, 56(%r13)
	movq	%r13, %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	callq	_hl_ctx_init
	testl	%eax, %eax
	jne	LBB0_47
LBB0_27:
	movq	32(%r13), %rax
	movq	%r13, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_29
## %bb.28:
	movl	%eax, %r12d
	movl	20(%r13), %edi
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_31
	.p2align	4, 0x90
LBB0_29:
	movl	$0, (%r13)
	movq	32(%r13), %rax
	movq	%r13, %rdi
	callq	*8(%rax)
	testl	%eax, %eax
	je	LBB0_34
## %bb.30:
	movl	%eax, %r12d
	movl	20(%r13), %edi
	leaq	L_.str.7(%rip), %rsi
LBB0_31:
	callq	_dev_err
LBB0_32:
	movl	$1, (%r13)
	testl	%r15d, %r15d
	jne	LBB0_49
LBB0_33:
	movl	20(%r13), %edi
	leaq	L_.str.13(%rip), %rsi
	callq	_dev_err
	incl	16(%r13)
	movl	$1, %r15d
	testl	%r14d, %r14d
	je	LBB0_3
	jmp	LBB0_6
LBB0_34:
	testl	%r15d, %r15d
	jne	LBB0_51
## %bb.35:
	movq	32(%r13), %rax
	movq	%r13, %rdi
	callq	*16(%rax)
	testl	%eax, %eax
	je	LBB0_53
## %bb.36:
	movl	20(%r13), %edi
	leaq	L_.str.10(%rip), %rsi
	callq	_dev_err
	movl	$1, (%r13)
	jmp	LBB0_33
LBB0_37:
	movl	20(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_38:
	xorl	%r12d, %r12d
	jmp	LBB0_50
LBB0_39:
	leaq	12(%r13), %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_atomic_cmpxchg
	testl	%eax, %eax
	jne	LBB0_50
## %bb.40:
	movl	$1, (%r13)
	movq	32(%r13), %rax
	movq	%r13, %rdi
	callq	*48(%rax)
	movq	32(%r13), %rax
	movq	%r13, %rdi
	callq	*40(%rax)
	leaq	64(%r13), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	20(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_2
LBB0_41:
	movq	%rax, %r12
	movq	_device_hard_reset_pending@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_INIT_WORK
	movq	%r13, 8(%r12)
	movq	%r12, %rdi
	callq	_schedule_work
	jmp	LBB0_38
LBB0_42:
	movl	20(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_dev_crit
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_46
LBB0_43:
	movl	%eax, %r12d
	movl	20(%r13), %edi
	leaq	L_.str.4(%rip), %rsi
LBB0_44:
	callq	_dev_err
	jmp	LBB0_48
LBB0_45:
	xorl	%r12d, %r12d
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_46:
	subl	(%rax), %r12d
	jmp	LBB0_48
LBB0_47:
	movl	%eax, %r12d
	movl	20(%r13), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_err
	movq	48(%r13), %rdi
	callq	_kfree
	movq	$0, 48(%r13)
LBB0_48:
	movl	$1, (%r13)
LBB0_49:
	movl	20(%r13), %edi
	leaq	L_.str.12(%rip), %rsi
	callq	_dev_err
	incl	24(%r13)
	addq	$12, %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
LBB0_50:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_51:
	movq	%r13, %rdi
	callq	_device_late_init
	testl	%eax, %eax
	je	LBB0_55
## %bb.52:
	movl	%eax, %r12d
	movl	20(%r13), %edi
	leaq	L_.str.8(%rip), %rsi
	jmp	LBB0_44
LBB0_53:
	leaq	12(%r13), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_54:
	incl	(%rax)
	movl	20(%r13), %edi
	leaq	L_.str.11(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_38
LBB0_55:
	movq	%r13, %rdi
	callq	_hl_vm_init
	testl	%eax, %eax
	je	LBB0_57
## %bb.56:
	movl	%eax, %r12d
	movl	20(%r13), %edi
	leaq	L_.str.9(%rip), %rsi
	jmp	LBB0_44
LBB0_57:
	movl	40(%r13), %esi
	movq	%r13, %rdi
	callq	_hl_set_max_power
	leaq	12(%r13), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	24(%r13), %rax
	jmp	LBB0_54
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't reset before initialization is done\n"

L_.str.1:                               ## @.str.1
	.asciz	"Going to RESET device!\n"

	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_device_hard_reset_pending,4,2  ## @device_hard_reset_pending
L_.str.2:                               ## @.str.2
	.asciz	"CS active cnt %d is not 0 during reset\n"

L_.str.3:                               ## @.str.3
	.asciz	"kernel ctx was alive during hard reset, something is terribly wrong\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.4:                               ## @.str.4
	.asciz	"Failed to initialize MMU S/W after hard reset\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.5:                               ## @.str.5
	.asciz	"failed to init kernel ctx in hard reset\n"

L_.str.6:                               ## @.str.6
	.asciz	"failed to initialize the H/W after reset\n"

L_.str.7:                               ## @.str.7
	.asciz	"Failed to detect if device is alive after reset\n"

L_.str.8:                               ## @.str.8
	.asciz	"Failed late init after hard reset\n"

L_.str.9:                               ## @.str.9
	.asciz	"Failed to init memory module after hard reset\n"

L_.str.10:                              ## @.str.10
	.asciz	"Failed late init after soft reset\n"

L_.str.11:                              ## @.str.11
	.asciz	"Successfully finished resetting the device\n"

L_.str.12:                              ## @.str.12
	.asciz	"Failed to reset! Device is NOT usable\n"

L_.str.13:                              ## @.str.13
	.asciz	"Failed to do soft-reset, trying hard reset\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hl_device_reset                ; -- Begin function hl_device_reset
	.p2align	2
_hl_device_reset:                       ; @hl_device_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w8, [x0, #116]
	cbz	w8, LBB0_36
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	cbz	w2, LBB0_38
LBB0_2:
	add	x22, x19, #112
	add	x23, x19, #108
	add	x24, x19, #64
	add	x8, x19, #16
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	mov	w27, #1
Lloh0:
	adrp	x25, l_.str.13@PAGE
Lloh1:
	add	x25, x25, l_.str.13@PAGEOFF
	cbnz	w20, LBB0_6
LBB0_3:
	cbz	w21, LBB0_6
; %bb.4:
	str	w27, [x19, #4]
Lloh2:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbnz	x0, LBB0_40
; %bb.5:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w26, w8
	str	w27, [x19]
	cbz	w21, LBB0_32
	b	LBB0_48
LBB0_6:
	cbz	w21, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_device_late_fini
	mov	x0, x22
	bl	_mutex_lock
	mov	x0, x22
	bl	_mutex_unlock
LBB0_8:
	ldr	x8, [x19, #32]
	ldr	x8, [x8, #32]
	mov	x0, x19
	mov	x1, x21
	blr	x8
	mov	x0, x19
	bl	_hl_cs_rollback_all
	cbz	w20, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_device_kill_open_processes
LBB0_10:
	cbz	w21, LBB0_14
; %bb.11:
	ldr	x0, [x19, #48]
	bl	_hl_ctx_put
	cmp	w0, #1
	b.ne	LBB0_13
; %bb.12:
	str	xzr, [x19, #48]
LBB0_13:
	ldr	x8, [x19, #32]
	ldr	x8, [x8, #24]
	mov	x0, x19
	mov	x1, x21
	blr	x8
	mov	x0, x19
	bl	_hl_vm_fini
	mov	x0, x19
	bl	_hl_mmu_fini
	mov	x0, x19
	mov	x1, x23
	bl	_hl_eq_reset
	b	LBB0_15
LBB0_14:
	ldr	x8, [x19, #32]
	ldr	x8, [x8, #24]
	mov	x0, x19
	mov	w1, #0
	blr	x8
LBB0_15:
	mov	x0, x19
	mov	x1, x21
	bl	_hl_hw_queue_reset
	ldr	w8, [x19, #104]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.16:
	mov	x26, #0
	mov	x28, #0
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #96]
	add	x1, x8, x26
	mov	x0, x19
	bl	_hl_cq_reset
	add	x28, x28, #1
	ldrsw	x8, [x19, #104]
	add	x26, x26, #4
	cmp	x28, x8
	b.lt	LBB0_17
LBB0_18:
	str	xzr, [x19, #88]
	mov	w0, #0
	mov	w1, #0
	bl	_ktime_set
	ldr	x8, [x19, #80]
	str	x0, [x8, #8]
	mov	w0, #0
	mov	w1, #0
	bl	_ktime_set
	ldp	x8, x9, [x19, #72]
	str	x0, [x9]
	cbz	x8, LBB0_20
; %bb.19:
	ldr	w0, [x19, #20]
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_crit
LBB0_20:
	mov	x0, x24
	bl	_mutex_lock
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_22
; %bb.21:
	add	x0, x8, #8
	mov	w1, #1
	bl	_atomic_set
	ldr	x8, [x19, #56]
	str	xzr, [x8]
LBB0_22:
	mov	x0, x24
	bl	_mutex_unlock
	cbz	w21, LBB0_27
; %bb.23:
	stp	wzr, wzr, [x19, #4]
	ldr	x8, [x19, #48]
	cbnz	x8, LBB0_41
; %bb.24:
	mov	x0, x19
	bl	_hl_mmu_init
	cbnz	w0, LBB0_42
; %bb.25:
Lloh10:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	str	x0, [x19, #48]
	cbz	x0, LBB0_44
; %bb.26:
	mov	x1, x0
	str	xzr, [x19, #56]
	mov	x0, x19
	mov	w2, #1
	bl	_hl_ctx_init
	cbnz	w0, LBB0_46
LBB0_27:
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_29
; %bb.28:
	mov	x26, x0
	ldr	w0, [x19, #20]
Lloh13:
	adrp	x1, l_.str.6@PAGE
Lloh14:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_31
LBB0_29:
	str	wzr, [x19]
	ldr	x8, [x19, #32]
	ldr	x8, [x8, #8]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_33
; %bb.30:
	mov	x26, x0
	ldr	w0, [x19, #20]
Lloh15:
	adrp	x1, l_.str.7@PAGE
Lloh16:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_31:
	bl	_dev_err
	str	w27, [x19]
	cbnz	w21, LBB0_48
LBB0_32:
	ldr	w0, [x19, #20]
	mov	x1, x25
	bl	_dev_err
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
	mov	w21, #1
	cbz	w20, LBB0_3
	b	LBB0_6
LBB0_33:
	cbnz	w21, LBB0_50
; %bb.34:
	ldr	x8, [x19, #32]
	ldr	x8, [x8, #16]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_52
; %bb.35:
	ldr	w0, [x19, #20]
Lloh17:
	adrp	x1, l_.str.10@PAGE
Lloh18:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_dev_err
	str	w27, [x19]
	b	LBB0_32
LBB0_36:
	ldr	w0, [x19, #20]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_37:
	mov	w26, #0
	b	LBB0_49
LBB0_38:
	add	x0, x19, #12
	mov	w22, #1
	mov	w1, #0
	mov	w2, #1
	bl	_atomic_cmpxchg
	mov	w26, #0
	cbnz	w0, LBB0_49
; %bb.39:
	str	w22, [x19]
	ldr	x8, [x19, #32]
	ldr	x8, [x8, #48]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #32]
	ldr	x8, [x8, #40]
	mov	x0, x19
	blr	x8
	add	x22, x19, #64
	mov	x0, x22
	bl	_mutex_lock
	mov	x0, x22
	bl	_mutex_unlock
	ldr	w0, [x19, #20]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_2
LBB0_40:
	mov	x26, x0
Lloh23:
	adrp	x8, _device_hard_reset_pending@GOTPAGE
Lloh24:
	ldr	x8, [x8, _device_hard_reset_pending@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_INIT_WORK
	str	x19, [x26, #8]
	mov	x0, x26
	bl	_schedule_work
	b	LBB0_37
LBB0_41:
	ldr	w0, [x19, #20]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_crit
Lloh28:
	adrp	x8, _EBUSY@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_45
LBB0_42:
	mov	x26, x0
	ldr	w0, [x19, #20]
Lloh30:
	adrp	x1, l_.str.4@PAGE
Lloh31:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_43:
	bl	_dev_err
	b	LBB0_47
LBB0_44:
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_45:
	ldr	w8, [x8]
	neg	w26, w8
	b	LBB0_47
LBB0_46:
	mov	x26, x0
	ldr	w0, [x19, #20]
Lloh34:
	adrp	x1, l_.str.5@PAGE
Lloh35:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	ldr	x0, [x19, #48]
	bl	_kfree
	str	xzr, [x19, #48]
LBB0_47:
	mov	w8, #1
	str	w8, [x19]
LBB0_48:
	ldr	w0, [x19, #20]
Lloh36:
	adrp	x1, l_.str.12@PAGE
Lloh37:
	add	x1, x1, l_.str.12@PAGEOFF
	bl	_dev_err
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
	add	x0, x19, #12
	mov	w1, #0
	bl	_atomic_set
LBB0_49:
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_50:
	mov	x0, x19
	bl	_device_late_init
	cbz	w0, LBB0_54
; %bb.51:
	mov	x26, x0
	ldr	w0, [x19, #20]
Lloh38:
	adrp	x1, l_.str.8@PAGE
Lloh39:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_43
LBB0_52:
	add	x0, x19, #12
	mov	w1, #0
	bl	_atomic_set
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
LBB0_53:
	ldr	w8, [x9]
	add	w8, w8, #1
	str	w8, [x9]
	ldr	w0, [x19, #20]
Lloh40:
	adrp	x1, l_.str.11@PAGE
Lloh41:
	add	x1, x1, l_.str.11@PAGEOFF
	bl	_dev_warn
	b	LBB0_37
LBB0_54:
	mov	x0, x19
	bl	_hl_vm_init
	cbz	w0, LBB0_56
; %bb.55:
	mov	x26, x0
	ldr	w0, [x19, #20]
Lloh42:
	adrp	x1, l_.str.9@PAGE
Lloh43:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_43
LBB0_56:
	ldr	w1, [x19, #40]
	mov	x0, x19
	bl	_hl_set_max_power
	add	x0, x19, #12
	mov	w1, #0
	bl	_atomic_set
	add	x9, x19, #24
	b	LBB0_53
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't reset before initialization is done\n"

l_.str.1:                               ; @.str.1
	.asciz	"Going to RESET device!\n"

	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_device_hard_reset_pending,4,2  ; @device_hard_reset_pending
l_.str.2:                               ; @.str.2
	.asciz	"CS active cnt %d is not 0 during reset\n"

l_.str.3:                               ; @.str.3
	.asciz	"kernel ctx was alive during hard reset, something is terribly wrong\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.4:                               ; @.str.4
	.asciz	"Failed to initialize MMU S/W after hard reset\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.5:                               ; @.str.5
	.asciz	"failed to init kernel ctx in hard reset\n"

l_.str.6:                               ; @.str.6
	.asciz	"failed to initialize the H/W after reset\n"

l_.str.7:                               ; @.str.7
	.asciz	"Failed to detect if device is alive after reset\n"

l_.str.8:                               ; @.str.8
	.asciz	"Failed late init after hard reset\n"

l_.str.9:                               ; @.str.9
	.asciz	"Failed to init memory module after hard reset\n"

l_.str.10:                              ; @.str.10
	.asciz	"Failed late init after soft reset\n"

l_.str.11:                              ; @.str.11
	.asciz	"Successfully finished resetting the device\n"

l_.str.12:                              ; @.str.12
	.asciz	"Failed to reset! Device is NOT usable\n"

l_.str.13:                              ; @.str.13
	.asciz	"Failed to do soft-reset, trying hard reset\n"

.subsections_via_symbols
