	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_dsaf_ge_srst_by_port
_hns_dsaf_ge_srst_by_port:              ## @hns_dsaf_ge_srst_by_port
	.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	_DSAF_GE_NUM@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jle	LBB0_5
## %bb.1:
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_HNS_DSAF_IS_DEBUG
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	4(%r15), %edi
	callq	_AE_IS_VER1
	testq	%rax, %rax
	movl	$64, %eax
	movl	$256, %ebx                      ## imm = 0x100
	cmovel	%eax, %ebx
	movb	(%r15), %cl
	movl	$87360, %edx                    ## imm = 0x15540
	shll	%cl, %edx
	shll	%cl, %ebx
	testl	%r14d, %r14d
	movq	_DSAF_SUB_SC_GE_RESET_DREQ1_REG@GOTPCREL(%rip), %rax
	cmoveq	_DSAF_SUB_SC_GE_RESET_REQ1_REG@GOTPCREL(%rip), %rax
	movq	_DSAF_SUB_SC_PPE_RESET_DREQ_REG@GOTPCREL(%rip), %r14
	cmoveq	_DSAF_SUB_SC_PPE_RESET_REQ_REG@GOTPCREL(%rip), %r14
	jmp	LBB0_4
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	$1, %r13d
	movl	%ebx, %ecx
	shll	%cl, %r13d
	movq	8(%r15), %rax
	movslq	%ebx, %rcx
	movq	(%rax,%rcx,8), %rax
	movb	(%rax), %r12b
	movl	4(%r15), %edi
	callq	_AE_IS_VER1
	testq	%rax, %rax
	movl	$34087042, %eax                 ## imm = 0x2082082
	movl	$17043521, %ebx                 ## imm = 0x1041041
	cmovel	%eax, %ebx
	movl	%r12d, %ecx
	shll	%cl, %ebx
	testl	%r14d, %r14d
	movq	_DSAF_SUB_SC_GE_RESET_DREQ0_REG@GOTPCREL(%rip), %rax
	cmoveq	_DSAF_SUB_SC_GE_RESET_REQ1_REG@GOTPCREL(%rip), %rax
	movl	%ebx, %edx
	movq	_DSAF_SUB_SC_GE_RESET_DREQ1_REG@GOTPCREL(%rip), %r14
	cmoveq	_DSAF_SUB_SC_GE_RESET_REQ0_REG@GOTPCREL(%rip), %r14
	cmovel	%r13d, %edx
	cmovnel	%r13d, %ebx
LBB0_4:
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_dsaf_write_sub
	movl	(%r14), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dsaf_write_sub                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DSAF_GE_NUM,4,2                ## @DSAF_GE_NUM
	.comm	_DSAF_SUB_SC_GE_RESET_REQ1_REG,4,2 ## @DSAF_SUB_SC_GE_RESET_REQ1_REG
	.comm	_DSAF_SUB_SC_GE_RESET_REQ0_REG,4,2 ## @DSAF_SUB_SC_GE_RESET_REQ0_REG
	.comm	_DSAF_SUB_SC_GE_RESET_DREQ0_REG,4,2 ## @DSAF_SUB_SC_GE_RESET_DREQ0_REG
	.comm	_DSAF_SUB_SC_GE_RESET_DREQ1_REG,4,2 ## @DSAF_SUB_SC_GE_RESET_DREQ1_REG
	.comm	_DSAF_SUB_SC_PPE_RESET_REQ_REG,4,2 ## @DSAF_SUB_SC_PPE_RESET_REQ_REG
	.comm	_DSAF_SUB_SC_PPE_RESET_DREQ_REG,4,2 ## @DSAF_SUB_SC_PPE_RESET_DREQ_REG
	.no_dead_strip	_hns_dsaf_ge_srst_by_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_dsaf_ge_srst_by_port
_hns_dsaf_ge_srst_by_port:              ; @hns_dsaf_ge_srst_by_port
	.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	x8, _DSAF_GE_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DSAF_GE_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.le	LBB0_3
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_HNS_DSAF_IS_DEBUG
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_AE_IS_VER1
	cmp	x0, #0
	mov	w8, #256
	mov	w9, #64
	csel	w8, w9, w8, eq
	ldr	w9, [x19]
	mov	w10, #21824
	movk	w10, #1, lsl #16
	lsl	w2, w10, w9
	lsl	w21, w8, w9
Lloh3:
	adrp	x8, _DSAF_SUB_SC_GE_RESET_DREQ1_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DSAF_SUB_SC_GE_RESET_DREQ1_REG@GOTPAGEOFF]
Lloh5:
	adrp	x9, _DSAF_SUB_SC_GE_RESET_REQ1_REG@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DSAF_SUB_SC_GE_RESET_REQ1_REG@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
Lloh7:
	adrp	x9, _DSAF_SUB_SC_PPE_RESET_DREQ_REG@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DSAF_SUB_SC_PPE_RESET_DREQ_REG@GOTPAGEOFF]
Lloh9:
	adrp	x10, _DSAF_SUB_SC_PPE_RESET_REQ_REG@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DSAF_SUB_SC_PPE_RESET_REQ_REG@GOTPAGEOFF]
	csel	x20, x10, x9, eq
	b	LBB0_5
LBB0_3:
	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
LBB0_4:
	mov	w8, #1
	lsl	w22, w8, w21
	ldr	x8, [x19, #8]
	ldr	x8, [x8, w21, sxtw #3]
	ldr	w21, [x8]
	ldr	w0, [x19, #4]
	bl	_AE_IS_VER1
	cmp	x0, #0
	mov	w8, #4161
	movk	w8, #260, lsl #16
	mov	w9, #8322
	movk	w9, #520, lsl #16
	csel	w8, w9, w8, eq
Lloh11:
	adrp	x9, _DSAF_SUB_SC_GE_RESET_DREQ0_REG@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DSAF_SUB_SC_GE_RESET_DREQ0_REG@GOTPAGEOFF]
	lsl	w10, w8, w21
Lloh13:
	adrp	x8, _DSAF_SUB_SC_GE_RESET_REQ1_REG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DSAF_SUB_SC_GE_RESET_REQ1_REG@GOTPAGEOFF]
	cmp	w20, #0
	csel	w2, w22, w10, eq
	csel	x8, x8, x9, eq
Lloh15:
	adrp	x9, _DSAF_SUB_SC_GE_RESET_DREQ1_REG@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DSAF_SUB_SC_GE_RESET_DREQ1_REG@GOTPAGEOFF]
Lloh17:
	adrp	x11, _DSAF_SUB_SC_GE_RESET_REQ0_REG@GOTPAGE
Lloh18:
	ldr	x11, [x11, _DSAF_SUB_SC_GE_RESET_REQ0_REG@GOTPAGEOFF]
	csel	x20, x11, x9, eq
	csel	w21, w10, w22, eq
LBB0_5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dsaf_write_sub
	ldr	w1, [x20]
	mov	x0, x19
	mov	x2, x21
	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	_dsaf_write_sub
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DSAF_GE_NUM,4,2                ; @DSAF_GE_NUM
	.comm	_DSAF_SUB_SC_GE_RESET_REQ1_REG,4,2 ; @DSAF_SUB_SC_GE_RESET_REQ1_REG
	.comm	_DSAF_SUB_SC_GE_RESET_REQ0_REG,4,2 ; @DSAF_SUB_SC_GE_RESET_REQ0_REG
	.comm	_DSAF_SUB_SC_GE_RESET_DREQ0_REG,4,2 ; @DSAF_SUB_SC_GE_RESET_DREQ0_REG
	.comm	_DSAF_SUB_SC_GE_RESET_DREQ1_REG,4,2 ; @DSAF_SUB_SC_GE_RESET_DREQ1_REG
	.comm	_DSAF_SUB_SC_PPE_RESET_REQ_REG,4,2 ; @DSAF_SUB_SC_PPE_RESET_REQ_REG
	.comm	_DSAF_SUB_SC_PPE_RESET_DREQ_REG,4,2 ; @DSAF_SUB_SC_PPE_RESET_DREQ_REG
	.no_dead_strip	_hns_dsaf_ge_srst_by_port
.subsections_via_symbols
