	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_hw_stats
_setup_hw_stats:                        ## @setup_hw_stats
	.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	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	%rdx, %rsi
	callq	*40(%rdi)
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	%rax, %r12
	cmpq	$0, 32(%rax)
	je	LBB0_21
## %bb.2:
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_21
## %bb.3:
	leal	64(,%rax,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_21
## %bb.4:
	movq	%rax, %r15
	movl	(%r12), %ecx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	*32(%r14)
	cmpl	(%r12), %eax
	jne	LBB0_20
## %bb.5:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 40(%r12)
	leaq	L_.str(%rip), %rcx
	movq	%rcx, 8(%r15)
	movq	%r15, %rcx
	addq	$48, %rcx
	movq	%rcx, 16(%r15)
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jle	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r12), %rax
	movl	(%rax,%r13,4), %edx
	movl	%r13d, %edi
	movq	%rbx, %rsi
	callq	_alloc_hsa
	movq	16(%r15), %rcx
	movq	%rax, (%rcx,%r13,8)
	movq	16(%r15), %rax
	movq	(%rax,%r13,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	callq	_sysfs_attr_init
	incq	%r13
	movslq	(%r12), %rax
	cmpq	%rax, %r13
	jl	LBB0_6
LBB0_8:
	movq	%r12, %rdi
	addq	$24, %rdi
	callq	_mutex_init
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_alloc_hsa_lifespan
	movq	16(%r15), %rcx
	movl	%r13d, %edx
	movq	%rax, (%rcx,%rdx,8)
	movq	16(%r15), %rax
	movq	(%rax,%rdx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_sysfs_attr_init
LBB0_10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:
	leaq	16(%rax), %rdi
	movq	%r15, %rsi
	callq	_sysfs_create_group
	testl	%eax, %eax
	jne	LBB0_17
## %bb.12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, 8(%rax)
	movq	%r12, (%rax)
	movq	24(%r14), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%r12, (%rax,%rbx,8)
	jmp	LBB0_14
LBB0_15:
	leaq	16(%r14), %rdi
	movq	%r15, %rsi
	callq	_sysfs_create_group
	testl	%eax, %eax
	je	LBB0_16
LBB0_17:
	testl	%r13d, %r13d
	js	LBB0_20
## %bb.18:
	movl	%r13d, %ebx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_kfree
	addq	$-1, %rbx
	jb	LBB0_19
LBB0_20:
	movq	%r15, %rdi
	callq	_kfree
LBB0_21:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_16:
	movq	%r15, 8(%r14)
	movq	%r12, (%r14)
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_jiffies,4,2                    ## @jiffies
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hw_counters"

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

	.no_dead_strip	_setup_hw_stats
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_hw_stats
_setup_hw_stats:                        ; @setup_hw_stats
	.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	x22, x2
	mov	x23, x1
	mov	x20, x0
	ldr	x8, [x0, #40]
	mov	x1, x2
	blr	x8
	cbz	x0, LBB0_23
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_21
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.3:
	lsl	w8, w8, #3
	add	w0, w8, #64
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_21
; %bb.4:
	mov	x21, x0
	ldr	x8, [x20, #32]
	ldr	w3, [x19]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	blr	x8
	ldr	w8, [x19]
	cmp	w0, w8
	b.ne	LBB0_20
; %bb.5:
Lloh3:
	adrp	x8, _jiffies@GOTPAGE
Lloh4:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #40]
Lloh6:
	adrp	x8, l_.str@PAGE
Lloh7:
	add	x8, x8, l_.str@PAGEOFF
	add	x9, x21, #48
	stp	x8, x9, [x21, #8]
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x24, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	w2, [x8, x24, lsl #2]
	mov	x0, x24
	mov	x1, x22
	bl	_alloc_hsa
	ldr	x8, [x21, #16]
	lsl	x9, x24, #3
	str	x0, [x8, x9]
	ldr	x8, [x21, #16]
	ldr	x0, [x8, x9]
	cbz	x0, LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_sysfs_attr_init
	add	x24, x24, #1
	ldrsw	x8, [x19]
	cmp	x24, x8
	b.lt	LBB0_7
	b	LBB0_10
LBB0_9:
	mov	w24, #0
LBB0_10:
	add	x0, x19, #24
	bl	_mutex_init
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_alloc_hsa_lifespan
	ldr	x8, [x21, #16]
	mov	w9, w24
	lsl	x9, x9, #3
	str	x0, [x8, x9]
	ldr	x8, [x21, #16]
	ldr	x0, [x8, x9]
	cbz	x0, LBB0_12
; %bb.11:
	bl	_sysfs_attr_init
LBB0_12:
	cbz	x23, LBB0_16
; %bb.13:
	add	x0, x23, #16
	mov	x1, x21
	bl	_sysfs_create_group
	cbnz	w0, LBB0_17
; %bb.14:
	stp	x19, x21, [x23]
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_23
; %bb.15:
	str	x19, [x8, x22, lsl #3]
	b	LBB0_23
LBB0_16:
	add	x0, x20, #16
	mov	x1, x21
	bl	_sysfs_create_group
	cbz	w0, LBB0_22
LBB0_17:
	tbnz	w24, #31, LBB0_20
; %bb.18:
	mov	w8, w24
	lsl	x20, x8, #3
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #16]
	ldr	x0, [x8, x20]
	bl	_kfree
	sub	x20, x20, #8
	cmn	x20, #8
	b.ne	LBB0_19
LBB0_20:
	mov	x0, x21
	bl	_kfree
LBB0_21:
	mov	x0, x19
	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	_kfree
LBB0_22:
	stp	x19, x21, [x20]
LBB0_23:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_jiffies,4,2                    ; @jiffies
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hw_counters"

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

	.no_dead_strip	_setup_hw_stats
.subsections_via_symbols
