	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_mac_set_mtu                ## -- Begin function hns_mac_set_mtu
	.p2align	4, 0x90
_hns_mac_set_mtu:                       ## @hns_mac_set_mtu
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r14
	callq	_hns_mac_get_drv
	movq	_ETH_HLEN@GOTPCREL(%rip), %rcx
	addl	(%rcx), %r12d
	movq	_ETH_FCS_LEN@GOTPCREL(%rip), %rdx
	movq	_VLAN_HLEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	(%rdx), %ecx
	leal	(%rcx,%r12), %r15d
	movq	_HNS_RCB_RING_MAX_BD_PER_PKT@GOTPCREL(%rip), %rdx
	imull	(%rdx), %ebx
	cmpl	%ebx, %r15d
	jle	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.5:
	movq	_ETH_FRAME_LEN@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	addl	%esi, %ecx
	cmpl	%esi, %r12d
	cmovll	%ecx, %r15d
	movq	%rax, %rdi
	movl	%r15d, %esi
	callq	*%rdx
	movl	%r15d, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	_ECHILD@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_HLEN,4,2                   ## @ETH_HLEN
	.comm	_ETH_FCS_LEN,4,2                ## @ETH_FCS_LEN
	.comm	_VLAN_HLEN,4,2                  ## @VLAN_HLEN
	.comm	_HNS_RCB_RING_MAX_BD_PER_PKT,4,2 ## @HNS_RCB_RING_MAX_BD_PER_PKT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ECHILD,4,2                     ## @ECHILD
	.comm	_ETH_FRAME_LEN,4,2              ## @ETH_FRAME_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns_mac_set_mtu                ; -- Begin function hns_mac_set_mtu
	.p2align	2
_hns_mac_set_mtu:                       ; @hns_mac_set_mtu
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_hns_mac_get_drv
Lloh0:
	adrp	x8, _ETH_HLEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETH_HLEN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _ETH_FCS_LEN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ETH_FCS_LEN@GOTPAGEOFF]
	add	w8, w8, w21
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _VLAN_HLEN@GOTPAGE
Lloh7:
	ldr	x10, [x10, _VLAN_HLEN@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	add	w10, w10, w9
	add	w9, w10, w8
Lloh9:
	adrp	x11, _HNS_RCB_RING_MAX_BD_PER_PKT@GOTPAGE
Lloh10:
	ldr	x11, [x11, _HNS_RCB_RING_MAX_BD_PER_PKT@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	mul	w11, w11, w20
	cmp	w9, w11
	b.le	LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	ldr	x11, [x0]
	cbz	x11, LBB0_4
; %bb.3:
Lloh14:
	adrp	x12, _ETH_FRAME_LEN@GOTPAGE
Lloh15:
	ldr	x12, [x12, _ETH_FRAME_LEN@GOTPAGEOFF]
Lloh16:
	ldr	w12, [x12]
	add	w10, w10, w12
	cmp	w8, w12
	csel	w20, w10, w9, lt
	mov	x1, x20
	blr	x11
	mov	w0, #0
	str	w20, [x19]
	b	LBB0_6
LBB0_4:
Lloh17:
	adrp	x8, _ECHILD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ECHILD@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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 AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_HLEN,4,2                   ; @ETH_HLEN
	.comm	_ETH_FCS_LEN,4,2                ; @ETH_FCS_LEN
	.comm	_VLAN_HLEN,4,2                  ; @VLAN_HLEN
	.comm	_HNS_RCB_RING_MAX_BD_PER_PKT,4,2 ; @HNS_RCB_RING_MAX_BD_PER_PKT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ECHILD,4,2                     ; @ECHILD
	.comm	_ETH_FRAME_LEN,4,2              ; @ETH_FRAME_LEN
.subsections_via_symbols
