	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hinic_port_set_mtu             ## -- Begin function hinic_port_set_mtu
	.p2align	4, 0x90
_hinic_port_set_mtu:                    ## @hinic_port_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rdx
	movq	_HINIC_MIN_MTU_SIZE@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jle	LBB0_3
## %bb.1:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movl	%esi, %ebx
	movq	_ETH_HLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%esi, %eax
	movq	_ETH_FCS_LEN@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movq	_HINIC_MAX_JUMBO_FRAME_SIZE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_5
## %bb.4:
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rcx
LBB0_2:
	callq	_netif_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%rdi), %r15
	movq	(%r15), %rdi
	movq	(%rdi), %r14
	callq	_HINIC_HWIF_FUNC_IDX
	movl	%eax, -40(%rbp)
	movl	%ebx, -56(%rbp)
	movq	_HINIC_PORT_CMD_CHANGE_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	leaq	-28(%rbp), %r9
	movq	%r15, %rdi
	movl	$24, %ecx
	movq	%rdx, %r8
	callq	_hinic_port_msg_cmd
	movq	-48(%rbp), %rdx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	cmpl	$24, -28(%rbp)
	jne	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	testq	%rdx, %rdx
	je	LBB0_10
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_HINIC_MIN_MTU_SIZE,4,2         ## @HINIC_MIN_MTU_SIZE
	.comm	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mtu < MIN MTU size"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ETH_HLEN,4,2                   ## @ETH_HLEN
	.comm	_ETH_FCS_LEN,4,2                ## @ETH_FCS_LEN
	.comm	_HINIC_MAX_JUMBO_FRAME_SIZE,4,2 ## @HINIC_MAX_JUMBO_FRAME_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"mtu > MAX MTU size"

	.comm	_HINIC_PORT_CMD_CHANGE_MTU,4,2  ## @HINIC_PORT_CMD_CHANGE_MTU
L_.str.2:                               ## @.str.2
	.asciz	"Failed to set mtu, ret = %d\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hinic_port_set_mtu             ; -- Begin function hinic_port_set_mtu
	.p2align	2
_hinic_port_set_mtu:                    ; @hinic_port_set_mtu
	.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
	ldr	x2, [x0, #8]
Lloh0:
	adrp	x8, _HINIC_MIN_MTU_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HINIC_MIN_MTU_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _drv@GOTPAGE
Lloh4:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	x20, x1
Lloh8:
	adrp	x8, _ETH_HLEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETH_HLEN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _ETH_FCS_LEN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ETH_FCS_LEN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	add	w8, w8, w1
	add	w8, w8, w9
Lloh14:
	adrp	x9, _HINIC_MAX_JUMBO_FRAME_SIZE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _HINIC_MAX_JUMBO_FRAME_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_7
; %bb.3:
Lloh17:
	adrp	x8, _drv@GOTPAGE
Lloh18:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x3, l_.str.1@PAGE
Lloh21:
	add	x3, x3, l_.str.1@PAGEOFF
LBB0_4:
	bl	_netif_err
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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_7:
	ldr	x21, [x0]
	ldr	x0, [x21]
	ldr	x19, [x0]
	bl	_HINIC_HWIF_FUNC_IDX
	str	w0, [sp, #24]
	str	w20, [sp, #8]
Lloh24:
	adrp	x8, _HINIC_PORT_CMD_CHANGE_MTU@GOTPAGE
Lloh25:
	ldr	x8, [x8, _HINIC_PORT_CMD_CHANGE_MTU@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	add	x2, sp, #8
	add	x4, sp, #8
	add	x5, sp, #4
	mov	x0, x21
	mov	w3, #24
	bl	_hinic_port_msg_cmd
	ldr	w8, [sp, #4]
	ldr	x2, [sp, #16]
	cmp	w0, #0
	ccmp	w8, #24, #0, eq
	ccmp	x2, #0, #0, eq
	b.eq	LBB0_9
; %bb.8:
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh29:
	adrp	x8, _EFAULT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_5
LBB0_9:
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_HINIC_MIN_MTU_SIZE,4,2         ; @HINIC_MIN_MTU_SIZE
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mtu < MIN MTU size"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ETH_HLEN,4,2                   ; @ETH_HLEN
	.comm	_ETH_FCS_LEN,4,2                ; @ETH_FCS_LEN
	.comm	_HINIC_MAX_JUMBO_FRAME_SIZE,4,2 ; @HINIC_MAX_JUMBO_FRAME_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"mtu > MAX MTU size"

	.comm	_HINIC_PORT_CMD_CHANGE_MTU,4,2  ; @HINIC_PORT_CMD_CHANGE_MTU
l_.str.2:                               ; @.str.2
	.asciz	"Failed to set mtu, ret = %d\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
