	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kfd_topology_update_sysfs
_kfd_topology_update_sysfs:             ## @kfd_topology_update_sysfs
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	movq	_sys_props@GOTPCREL(%rip), %r14
	cmpq	$0, 16(%r14)
	je	LBB0_2
LBB0_1:
	xorl	%eax, %eax
	callq	_kfd_remove_sysfs_node_tree
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfd_build_sysfs_node_tree      ## TAILCALL
LBB0_2:
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_kfd_alloc_struct
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	_kfd_device@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_sysprops_type@GOTPCREL(%rip), %rsi
	leaq	L_.str.1(%rip), %rcx
	movq	%rax, %rdi
	callq	_kobject_init_and_add
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	movq	16(%r14), %rsi
	leaq	L_.str.2(%rip), %rdi
	callq	_kobject_create_and_add
	movl	%eax, 40(%r14)
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	leaq	L_.str.3(%rip), %rax
	movq	%rax, 24(%r14)
	leaq	24(%r14), %rbx
	movq	_KFD_SYSFS_FILE_MODE@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, 32(%r14)
	movq	%rbx, %rdi
	callq	_sysfs_attr_init
	movq	16(%r14), %rdi
	movq	%rbx, %rsi
	callq	_sysfs_create_file
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	leaq	L_.str.4(%rip), %rax
	movq	%rax, (%r14)
	movq	(%r15), %rax
	movq	%rax, 8(%r14)
	movq	%r14, %rdi
	callq	_sysfs_attr_init
	movq	16(%r14), %rdi
	movq	%r14, %rsi
	callq	_sysfs_create_file
	testl	%eax, %eax
	jns	LBB0_1
LBB0_7:
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_10:
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Creating topology SYSFS entries\n"

	.comm	_sys_props,48,3                 ## @sys_props
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_sysprops_type,4,2              ## @sysprops_type
	.comm	_kfd_device,8,3                 ## @kfd_device
L_.str.1:                               ## @.str.1
	.asciz	"topology"

L_.str.2:                               ## @.str.2
	.asciz	"nodes"

L_.str.3:                               ## @.str.3
	.asciz	"generation_id"

	.comm	_KFD_SYSFS_FILE_MODE,8,3        ## @KFD_SYSFS_FILE_MODE
L_.str.4:                               ## @.str.4
	.asciz	"system_properties"

	.no_dead_strip	_kfd_topology_update_sysfs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kfd_topology_update_sysfs
_kfd_topology_update_sysfs:             ; @kfd_topology_update_sysfs
	.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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
Lloh2:
	adrp	x19, _sys_props@GOTPAGE
Lloh3:
	ldr	x19, [x19, _sys_props@GOTPAGEOFF]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_2
LBB0_1:
	bl	_kfd_remove_sysfs_node_tree
	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
	b	_kfd_build_sysfs_node_tree
LBB0_2:
	mov	x0, #0
	bl	_kfd_alloc_struct
	str	x0, [x19, #16]
	cbz	x0, LBB0_7
; %bb.3:
Lloh4:
	adrp	x8, _kfd_device@GOTPAGE
Lloh5:
	ldr	x8, [x8, _kfd_device@GOTPAGEOFF]
Lloh6:
	ldr	x2, [x8]
Lloh7:
	adrp	x1, _sysprops_type@GOTPAGE
Lloh8:
	ldr	x1, [x1, _sysprops_type@GOTPAGEOFF]
Lloh9:
	adrp	x3, l_.str.1@PAGE
Lloh10:
	add	x3, x3, l_.str.1@PAGEOFF
	bl	_kobject_init_and_add
	tbnz	w0, #31, LBB0_8
; %bb.4:
	ldr	x1, [x19, #16]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_kobject_create_and_add
	str	w0, [x19, #40]
	cbz	w0, LBB0_7
; %bb.5:
Lloh13:
	adrp	x8, l_.str.3@PAGE
Lloh14:
	add	x8, x8, l_.str.3@PAGEOFF
	mov	x20, x19
	str	x8, [x20, #24]!
Lloh15:
	adrp	x21, _KFD_SYSFS_FILE_MODE@GOTPAGE
Lloh16:
	ldr	x21, [x21, _KFD_SYSFS_FILE_MODE@GOTPAGEOFF]
	ldr	x8, [x21]
	str	x8, [x20, #8]
	mov	x0, x20
	bl	_sysfs_attr_init
	ldur	x0, [x20, #-8]
	mov	x1, x20
	bl	_sysfs_create_file
	tbnz	w0, #31, LBB0_8
; %bb.6:
	ldr	x8, [x21]
Lloh17:
	adrp	x9, l_.str.4@PAGE
Lloh18:
	add	x9, x9, l_.str.4@PAGEOFF
	stp	x9, x8, [x19]
	mov	x0, x19
	bl	_sysfs_attr_init
	ldr	x0, [x19, #16]
	mov	x1, x19
	bl	_sysfs_create_file
	tbz	w0, #31, LBB0_1
	b	LBB0_8
LBB0_7:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Creating topology SYSFS entries\n"

	.comm	_sys_props,48,3                 ; @sys_props
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_sysprops_type,4,2              ; @sysprops_type
	.comm	_kfd_device,8,3                 ; @kfd_device
l_.str.1:                               ; @.str.1
	.asciz	"topology"

l_.str.2:                               ; @.str.2
	.asciz	"nodes"

l_.str.3:                               ; @.str.3
	.asciz	"generation_id"

	.comm	_KFD_SYSFS_FILE_MODE,8,3        ; @KFD_SYSFS_FILE_MODE
l_.str.4:                               ; @.str.4
	.asciz	"system_properties"

	.no_dead_strip	_kfd_topology_update_sysfs
.subsections_via_symbols
