	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_mac_get_inner_port_num     ## -- Begin function hns_mac_get_inner_port_num
	.p2align	4, 0x90
_hns_mac_get_inner_port_num:            ## @hns_mac_get_inner_port_num
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %r8d
	movq	8(%rdi), %rax
	movl	(%rax), %esi
	movq	_DSAF_MODE_ENABLE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jle	LBB0_1
## %bb.4:
	movq	_DSAF_MODE_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jge	LBB0_7
## %bb.5:
	movl	(%rdi), %ecx
	movq	_DSAF_MAX_PORT_NUM@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %ecx
	jl	LBB0_8
## %bb.6:
	movl	16(%rdi), %edi
	movl	4(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_1:
	movl	(%rdi), %ecx
	movq	_DSAF_MAX_PORT_NUM@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %ecx
	jne	LBB0_2
LBB0_8:
	movq	8(%rax), %rbx
	movq	(%rbx), %r9
	movl	(%r9), %r10d
	cmpl	%r8d, %r10d
	jle	LBB0_2
## %bb.9:
	xorl	%ebx, %ebx
	addl	$-128, %esi
	cmpl	$13, %esi
	ja	LBB0_13
## %bb.10:
	movl	$16318, %eax                    ## imm = 0x3FBE
	btl	%esi, %eax
	jae	LBB0_12
## %bb.11:
	imull	%r10d, %ecx
	addl	%r8d, %ecx
	imull	4(%r9), %ecx
	movq	%rcx, %rbx
LBB0_12:
	movq	_DSAF_BASE_INNER_PORT_NUM@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	movl	%ebx, (%rdx)
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_2:
	movl	16(%rdi), %edi
	movl	4(%rax), %edx
	leaq	L_.str(%rip), %rsi
LBB0_3:
	xorl	%ebx, %ebx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_15
LBB0_7:
	movl	(%rdi), %ecx
	movl	16(%rdi), %edi
	movl	4(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
LBB0_14:
	xorl	%eax, %eax
	callq	_dev_err
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_13:
	movl	16(%rdi), %edi
	movl	4(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
                                        ## kill: def $ecx killed $ecx killed $rcx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_DSAF_MODE_ENABLE,4,2           ## @DSAF_MODE_ENABLE
	.comm	_DSAF_MAX_PORT_NUM,4,2          ## @DSAF_MAX_PORT_NUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"input invalid, %s mac%d vmid%d !\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DSAF_MODE_MAX,4,2              ## @DSAF_MODE_MAX
L_.str.1:                               ## @.str.1
	.asciz	"input invalid, %s mac%d vmid%d!\n"

L_.str.2:                               ## @.str.2
	.asciz	"dsaf mode invalid, %s mac%d!\n"

	.comm	_DSAF_BASE_INNER_PORT_NUM,8,3   ## @DSAF_BASE_INNER_PORT_NUM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_mac_get_inner_port_num     ; -- Begin function hns_mac_get_inner_port_num
	.p2align	2
_hns_mac_get_inner_port_num:            ; @hns_mac_get_inner_port_num
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
                                        ; kill: def $w1 killed $w1 def $x1
	ldr	x9, [x0, #8]
	ldr	w8, [x9]
Lloh0:
	adrp	x10, _DSAF_MODE_ENABLE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DSAF_MODE_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w8, w10
	b.le	LBB0_4
; %bb.1:
Lloh3:
	adrp	x10, _DSAF_MODE_MAX@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DSAF_MODE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w8, w10
	b.ge	LBB0_10
; %bb.2:
	ldr	w3, [x0]
Lloh6:
	adrp	x10, _DSAF_MAX_PORT_NUM@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DSAF_MAX_PORT_NUM@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w3, w10
	b.lt	LBB0_5
; %bb.3:
	ldr	w0, [x0, #16]
	ldr	w2, [x9, #4]
                                        ; kill: def $w1 killed $w1 killed $x1 def $x1
	str	x1, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_4:
	ldr	w3, [x0]
Lloh11:
	adrp	x10, _DSAF_MAX_PORT_NUM@GOTPAGE
Lloh12:
	ldr	x10, [x10, _DSAF_MAX_PORT_NUM@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	cmp	w3, w10
	b.ne	LBB0_11
LBB0_5:
	ldr	x10, [x9, #8]
	ldr	x10, [x10]
	ldr	w11, [x10]
	cmp	w11, w1
	b.le	LBB0_12
; %bb.6:
	sub	w8, w8, #128
	cmp	w8, #13
	b.hi	LBB0_17
; %bb.7:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #16318
	tst	w8, w9
	b.eq	LBB0_16
; %bb.8:
	ldr	w8, [x10, #4]
	madd	w9, w3, w11, w1
	mul	w8, w9, w8
LBB0_9:
	mov	w0, #0
Lloh14:
	adrp	x9, _DSAF_BASE_INNER_PORT_NUM@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DSAF_BASE_INNER_PORT_NUM@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	add	w8, w9, w8
	str	w8, [x2]
	b	LBB0_15
LBB0_10:
	ldr	w8, [x0, #16]
	ldr	w2, [x9, #4]
	ldr	w3, [x0]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x8
	b	LBB0_14
LBB0_11:
	ldr	w0, [x0, #16]
	ldr	w2, [x9, #4]
	b	LBB0_13
LBB0_12:
	ldr	w0, [x0, #16]
	ldr	w2, [x9, #4]
                                        ; kill: def $w1 killed $w1 killed $x1 def $x1
LBB0_13:
	str	x1, [sp]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
LBB0_14:
	bl	_dev_err
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
LBB0_16:
	mov	x8, #0
	b	LBB0_9
LBB0_17:
	ldr	w0, [x0, #16]
	ldr	w2, [x9, #4]
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_DSAF_MODE_ENABLE,4,2           ; @DSAF_MODE_ENABLE
	.comm	_DSAF_MAX_PORT_NUM,4,2          ; @DSAF_MAX_PORT_NUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"input invalid, %s mac%d vmid%d !\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DSAF_MODE_MAX,4,2              ; @DSAF_MODE_MAX
l_.str.1:                               ; @.str.1
	.asciz	"input invalid, %s mac%d vmid%d!\n"

l_.str.2:                               ; @.str.2
	.asciz	"dsaf mode invalid, %s mac%d!\n"

	.comm	_DSAF_BASE_INNER_PORT_NUM,8,3   ; @DSAF_BASE_INNER_PORT_NUM
.subsections_via_symbols
