	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_xgmi_sysfs_add_dev_info
_amdgpu_xgmi_sysfs_add_dev_info:        ## @amdgpu_xgmi_sysfs_add_dev_info
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movw	$0, -40(%rbp)
	movq	$0, -48(%rbp)
	movq	(%rdi), %rdi
	movq	_dev_attr_xgmi_device_id@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	movq	(%r14), %rdi
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_11
LBB0_2:
	movq	_dev_attr_xgmi_error@GOTPCREL(%rip), %rsi
	callq	_device_create_file
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
LBB0_4:
	cmpq	%r14, 16(%r15)
	je	LBB0_7
## %bb.5:
	movq	(%r14), %rdi
	movq	8(%r15), %rsi
	leaq	L_.str.2(%rip), %rdx
	callq	_sysfs_create_link
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	movq	(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_10
LBB0_7:
	movl	(%r15), %edx
	leaq	L_.str.4(%rip), %rsi
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_sprintf
	movq	8(%r15), %rdi
	movq	(%r14), %rsi
	movq	%rbx, %rdx
	callq	_sysfs_create_link
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	%eax, %ebx
	movq	(%r14), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_err
	movq	(%r14), %rdi
	movq	8(%r14), %rax
	movl	(%rax), %esi
	callq	_sysfs_remove_link
LBB0_10:
	movq	(%r14), %rdi
	movq	_dev_attr_xgmi_device_id@GOTPCREL(%rip), %rsi
	callq	_device_remove_file
	jmp	LBB0_11
LBB0_8:
	xorl	%ebx, %ebx
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_dev_attr_xgmi_device_id,4,2    ## @dev_attr_xgmi_device_id
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"XGMI: Failed to create device file xgmi_device_id\n"

	.comm	_dev_attr_xgmi_error,4,2        ## @dev_attr_xgmi_error
L_.str.1:                               ## @.str.1
	.asciz	"failed to create xgmi_error\n"

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

L_.str.3:                               ## @.str.3
	.asciz	"XGMI: Failed to create link to hive info"

L_.str.4:                               ## @.str.4
	.asciz	"node%d"

L_.str.5:                               ## @.str.5
	.asciz	"XGMI: Failed to create link from hive info"

	.no_dead_strip	_amdgpu_xgmi_sysfs_add_dev_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_xgmi_sysfs_add_dev_info
_amdgpu_xgmi_sysfs_add_dev_info:        ; @amdgpu_xgmi_sysfs_add_dev_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	strh	wzr, [sp, #16]
	str	xzr, [sp, #8]
	ldr	x0, [x0]
Lloh3:
	adrp	x1, _dev_attr_xgmi_device_id@GOTPAGE
Lloh4:
	ldr	x1, [x1, _dev_attr_xgmi_device_id@GOTPAGEOFF]
	bl	_device_create_file
	mov	x20, x0
	ldr	x0, [x19]
	cbz	w20, LBB0_2
; %bb.1:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_10
LBB0_2:
Lloh7:
	adrp	x1, _dev_attr_xgmi_error@GOTPAGE
Lloh8:
	ldr	x1, [x1, _dev_attr_xgmi_error@GOTPAGEOFF]
	bl	_device_create_file
	cbz	w0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_4:
	ldr	x8, [x21, #16]
	cmp	x8, x19
	b.eq	LBB0_7
; %bb.5:
	ldr	x0, [x19]
	ldr	x1, [x21, #8]
Lloh11:
	adrp	x2, l_.str.2@PAGE
Lloh12:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_sysfs_create_link
	cbz	w0, LBB0_7
; %bb.6:
	mov	x20, x0
	ldr	x0, [x19]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	b	LBB0_9
LBB0_7:
	ldr	w2, [x21]
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x0, sp, #8
	bl	_sprintf
	ldr	x0, [x21, #8]
	ldr	x1, [x19]
	add	x2, sp, #8
	bl	_sysfs_create_link
	mov	x20, x0
	cbz	w0, LBB0_10
; %bb.8:
	ldr	x0, [x19]
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_err
	ldp	x0, x8, [x19]
	ldr	w1, [x8]
	bl	_sysfs_remove_link
LBB0_9:
	ldr	x0, [x19]
Lloh19:
	adrp	x1, _dev_attr_xgmi_device_id@GOTPAGE
Lloh20:
	ldr	x1, [x1, _dev_attr_xgmi_device_id@GOTPAGEOFF]
	bl	_device_remove_file
LBB0_10:
	ldr	x8, [sp, #24]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_dev_attr_xgmi_device_id,4,2    ; @dev_attr_xgmi_device_id
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"XGMI: Failed to create device file xgmi_device_id\n"

	.comm	_dev_attr_xgmi_error,4,2        ; @dev_attr_xgmi_error
l_.str.1:                               ; @.str.1
	.asciz	"failed to create xgmi_error\n"

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

l_.str.3:                               ; @.str.3
	.asciz	"XGMI: Failed to create link to hive info"

l_.str.4:                               ; @.str.4
	.asciz	"node%d"

l_.str.5:                               ; @.str.5
	.asciz	"XGMI: Failed to create link from hive info"

	.no_dead_strip	_amdgpu_xgmi_sysfs_add_dev_info
.subsections_via_symbols
