	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_liquidio_change_mtu            ## -- Begin function liquidio_change_mtu
	.p2align	4, 0x90
_liquidio_change_mtu:                   ## @liquidio_change_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_GET_LIO
	movq	%rax, %r12
	movq	16(%rax), %r13
	movq	_OCTNET_CMD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	movl	$16, %edx
	xorl	%ecx, %ecx
	callq	_octeon_alloc_soft_command
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	%ebx, %r14d
	movq	24(%rax), %rbx
	movq	%rax, %rdi
	addq	$20, %rdi
	callq	_init_completion
	movq	_OCTEON_REQUEST_PENDING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	movq	$0, (%rbx)
	movq	_OCTNET_CMD_CHANGE_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, (%rbx)
	movq	_OCTNET_CMD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$3, %esi
	movq	%rbx, %rdi
	callq	_octeon_swap_8B_data
	movq	8(%r12), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	_OPCODE_NIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_OPCODE_NIC_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$0, (%rsp)
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	movq	%r15, %rsi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_octeon_prepare_soft_command
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_octeon_send_soft_command
	movq	_IQ_SEND_FAILED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.3:
	movq	_rx_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r12, %rdi
	callq	_netif_info
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_octeon_free_soft_command
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_1:
	movq	_rx_err@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdi
	callq	_netif_info
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_4:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	%r13, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_wait_for_sc_completion_timeout
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	cmpq	$0, 8(%r15)
	je	LBB0_7
## %bb.6:
	movl	(%r15), %edi
	movl	$1, %esi
	callq	_WRITE_ONCE
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	movl	%ebx, (%r12)
	movl	(%r15), %edi
	movl	$1, %esi
	callq	_WRITE_ONCE
	xorl	%r14d, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OCTNET_CMD_SIZE,4,2            ## @OCTNET_CMD_SIZE
	.comm	_rx_err,4,2                     ## @rx_err
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate soft command\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_OCTEON_REQUEST_PENDING,8,3     ## @OCTEON_REQUEST_PENDING
	.comm	_OCTNET_CMD_CHANGE_MTU,4,2      ## @OCTNET_CMD_CHANGE_MTU
	.comm	_OPCODE_NIC,4,2                 ## @OPCODE_NIC
	.comm	_OPCODE_NIC_CMD,4,2             ## @OPCODE_NIC_CMD
	.comm	_IQ_SEND_FAILED,4,2             ## @IQ_SEND_FAILED
L_.str.1:                               ## @.str.1
	.asciz	"Failed to change MTU\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_liquidio_change_mtu            ; -- Begin function liquidio_change_mtu
	.p2align	2
_liquidio_change_mtu:                   ; @liquidio_change_mtu
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x21, x0
	bl	_GET_LIO
	mov	x19, x0
	ldr	x23, [x0, #16]
Lloh0:
	adrp	x25, _OCTNET_CMD_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _OCTNET_CMD_SIZE@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x23
	mov	w2, #16
	mov	w3, #0
	bl	_octeon_alloc_soft_command
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
	ldr	x24, [x0, #24]
	add	x0, x0, #20
	bl	_init_completion
Lloh2:
	adrp	x8, _OCTEON_REQUEST_PENDING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OCTEON_REQUEST_PENDING@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	x8, [x22, #8]
Lloh5:
	adrp	x8, _OCTNET_CMD_CHANGE_MTU@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OCTNET_CMD_CHANGE_MTU@GOTPAGEOFF]
	str	xzr, [x24]
Lloh7:
	ldr	w8, [x8]
	stp	w20, w8, [x24]
	ldr	w8, [x25]
	asr	w1, w8, #3
	mov	x0, x24
	bl	_octeon_swap_8B_data
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	str	w8, [x22, #16]
Lloh8:
	adrp	x8, _OPCODE_NIC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _OPCODE_NIC@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _OPCODE_NIC_CMD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OPCODE_NIC_CMD@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	mov	x0, x23
	mov	x1, x22
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_octeon_prepare_soft_command
	mov	x0, x23
	mov	x1, x22
	bl	_octeon_send_soft_command
Lloh14:
	adrp	x8, _IQ_SEND_FAILED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IQ_SEND_FAILED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.2:
Lloh17:
	adrp	x8, _rx_err@GOTPAGE
Lloh18:
	ldr	x8, [x8, _rx_err@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
Lloh20:
	adrp	x3, l_.str.1@PAGE
Lloh21:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_info
	mov	x0, x23
	mov	x1, x22
	bl	_octeon_free_soft_command
LBB0_3:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh24:
	adrp	x8, _rx_err@GOTPAGE
Lloh25:
	ldr	x8, [x8, _rx_err@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
Lloh27:
	adrp	x3, l_.str@PAGE
Lloh28:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_info
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	mov	x0, x23
	mov	x1, x22
	mov	w2, #0
	bl	_wait_for_sc_completion_timeout
	cbz	w0, LBB0_8
LBB0_7:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	w0, [x22]
	mov	w1, #1
	bl	_WRITE_ONCE
	b	LBB0_3
LBB0_10:
	str	w20, [x21]
	str	w20, [x19]
	ldr	w0, [x22]
	mov	w1, #1
	bl	_WRITE_ONCE
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_OCTNET_CMD_SIZE,4,2            ; @OCTNET_CMD_SIZE
	.comm	_rx_err,4,2                     ; @rx_err
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate soft command\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_OCTEON_REQUEST_PENDING,8,3     ; @OCTEON_REQUEST_PENDING
	.comm	_OCTNET_CMD_CHANGE_MTU,4,2      ; @OCTNET_CMD_CHANGE_MTU
	.comm	_OPCODE_NIC,4,2                 ; @OPCODE_NIC
	.comm	_OPCODE_NIC_CMD,4,2             ; @OPCODE_NIC_CMD
	.comm	_IQ_SEND_FAILED,4,2             ; @IQ_SEND_FAILED
l_.str.1:                               ; @.str.1
	.asciz	"Failed to change MTU\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
