	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_roce_v1_reset
_hns_roce_v1_reset:                     ## @hns_roce_v1_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	(%rdi), %r15
	movq	8(%r15), %r12
	movq	%r15, %rdi
	callq	_dev_of_node
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_of_parse_phandle
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movq	%rax, %r12
LBB0_3:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_hns_dsaf_roce_reset
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.4:
	movl	$0, %ebx
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.5:
	movq	_SLEEP_TIME_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_hns_dsaf_roce_reset
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_6:
	movl	(%r15), %edi
	callq	_is_acpi_device_node
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %rcx
	xorl	%edx, %edx
	callq	_acpi_node_get_property_reference
	testl	%eax, %eax
	je	LBB0_13
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_11:
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	-40(%rbp), %r12
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dsaf-handle"

L_.str.1:                               ## @.str.1
	.asciz	"could not find dsaf-handle\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"cannot read data from DT or ACPI\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_SLEEP_TIME_INTERVAL,4,2        ## @SLEEP_TIME_INTERVAL
	.no_dead_strip	_hns_roce_v1_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_roce_v1_reset
_hns_roce_v1_reset:                     ; @hns_roce_v1_reset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	ldr	x20, [x0]
	ldr	x21, [x20, #8]
	mov	x0, x20
	bl	_dev_of_node
	cbz	x0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	w2, #0
	bl	_of_parse_phandle
	cbz	x0, LBB0_9
; %bb.2:
	mov	x21, x0
LBB0_3:
	mov	x0, x21
	mov	w1, #0
	bl	_hns_dsaf_roce_reset
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.4:
	cbz	w19, LBB0_14
; %bb.5:
Lloh2:
	adrp	x8, _SLEEP_TIME_INTERVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SLEEP_TIME_INTERVAL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_msleep
	mov	x0, x21
	mov	w1, #1
	bl	_hns_dsaf_roce_reset
	mov	x22, x0
	b	LBB0_12
LBB0_6:
	ldr	w0, [x20]
	bl	_is_acpi_device_node
	cbz	x0, LBB0_10
; %bb.7:
	ldr	w0, [x20]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	add	x3, sp, #8
	mov	w2, #0
	bl	_acpi_node_get_property_reference
	cbz	w0, LBB0_13
; %bb.8:
	mov	x22, x0
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_12
LBB0_9:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh15:
	adrp	x8, _ENXIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_12:
	mov	x0, x22
	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
	add	sp, sp, #64
	ret
LBB0_13:
	ldr	x21, [sp, #8]
	b	LBB0_3
LBB0_14:
	mov	w22, #0
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dsaf-handle"

l_.str.1:                               ; @.str.1
	.asciz	"could not find dsaf-handle\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"cannot read data from DT or ACPI\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_SLEEP_TIME_INTERVAL,4,2        ; @SLEEP_TIME_INTERVAL
	.no_dead_strip	_hns_roce_v1_reset
.subsections_via_symbols
