	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_device_fini               ## -- Begin function nvkm_device_fini
	.p2align	4, 0x90
_nvkm_device_fini:                      ## @nvkm_device_fini
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	testl	%esi, %esi
	leaq	L_.str(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmovneq	%rax, %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_nvdev_trace
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	callq	_ktime_to_us
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_nvkm_acpi_fini
	movq	_NVKM_SUBDEV_NR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	testl	%r14d, %r14d
	jle	LBB0_12
## %bb.1:
	incl	%r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	decl	%r14d
	cmpl	$1, %r14d
	jbe	LBB0_12
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%r14), %r13d
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_nvkm_device_subdev
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_nvkm_subdev_fini
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_11
## %bb.5:
	movq	_NVKM_SUBDEV_NR@GOTPCREL(%rip), %r14
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%r13d
	cmpl	(%r14), %r13d
	jge	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_nvkm_device_subdev
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_nvkm_subdev_init
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.4(%rip), %rsi
	movl	%r12d, %edx
	callq	_nvkm_fatal
	jmp	LBB0_9
LBB0_12:
	movl	8(%r15), %edi
	movl	%ebx, %esi
	callq	_nvkm_therm_clkgate_fini
	movq	(%r15), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	*%rax
LBB0_14:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	callq	_ktime_to_us
	subl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, %ecx
	jmp	LBB0_15
LBB0_10:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%r12d, %ecx
LBB0_15:
	xorl	%eax, %eax
	callq	_nvdev_trace
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"suspend"

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

L_.str.2:                               ## @.str.2
	.asciz	"%s running...\n"

	.comm	_NVKM_SUBDEV_NR,4,2             ## @NVKM_SUBDEV_NR
L_.str.3:                               ## @.str.3
	.asciz	"%s completed in %lldus...\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed restart, %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"%s failed with %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_device_fini               ; -- Begin function nvkm_device_fini
	.p2align	2
_nvkm_device_fini:                      ; @nvkm_device_fini
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh2:
	adrp	x9, l_.str@PAGE
Lloh3:
	add	x9, x9, l_.str@PAGEOFF
	cmp	w1, #0
	csel	x19, x9, x8, ne
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_nvdev_trace
	bl	_ktime_get
	bl	_ktime_to_us
	mov	x22, x0
	mov	x0, x20
	bl	_nvkm_acpi_fini
Lloh6:
	adrp	x25, _NVKM_SUBDEV_NR@GOTPAGE
Lloh7:
	ldr	x25, [x25, _NVKM_SUBDEV_NR@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.1:
	add	w26, w8, #1
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	w26, w26, #1
	cmp	w26, #1
	b.ls	LBB0_11
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w24, w26, #2
	mov	x0, x20
	mov	x1, x24
	bl	_nvkm_device_subdev
	cbz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x1, x21
	bl	_nvkm_subdev_fini
	cbz	w21, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, x0
	cbz	w0, LBB0_2
; %bb.6:
Lloh8:
	adrp	x21, l_.str.4@PAGE
Lloh9:
	add	x21, x21, l_.str.4@PAGEOFF
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w24, w24, #1
	ldr	w8, [x25]
	cmp	w24, w8
	b.ge	LBB0_14
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x24
	bl	_nvkm_device_subdev
	cbz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x22, x0
	bl	_nvkm_subdev_init
	cbz	w0, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	bl	_nvkm_fatal
	b	LBB0_7
LBB0_11:
	ldr	w0, [x20, #8]
	mov	x1, x21
	bl	_nvkm_therm_clkgate_fini
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x20
	mov	x1, x21
	blr	x8
LBB0_13:
	bl	_ktime_get
	bl	_ktime_to_us
	sub	w8, w0, w22
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_nvdev_trace
	mov	w23, #0
	b	LBB0_15
LBB0_14:
	str	x23, [sp]
Lloh12:
	adrp	x1, l_.str.5@PAGE
Lloh13:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_nvdev_trace
LBB0_15:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"suspend"

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

l_.str.2:                               ; @.str.2
	.asciz	"%s running...\n"

	.comm	_NVKM_SUBDEV_NR,4,2             ; @NVKM_SUBDEV_NR
l_.str.3:                               ; @.str.3
	.asciz	"%s completed in %lldus...\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed restart, %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"%s failed with %d\n"

.subsections_via_symbols
