	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_port_headroom_set
_mlxsw_sp_port_headroom_set:            ## @mlxsw_sp_port_headroom_set
	.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	%rsi, %r12
	movq	%rdi, %rbx
	callq	_mlxsw_sp_port_is_pause_en
	movq	8(%rbx), %r13
	movq	16(%rbx), %r14
	movl	(%r14), %esi
	movl	(%r12), %edx
	movl	(%rbx), %r8d
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	___mlxsw_sp_port_headroom_set
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
	jmp	LBB0_6
LBB0_2:
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_mlxsw_sp_port_pg_prio_map
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_mlxsw_sp_port_pg_destroy
	jmp	LBB0_6
LBB0_4:
	movl	(%r13), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_mlxsw_sp_port_pg_destroy
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_warn
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to configure port's headroom\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to set PG-priority mapping\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to remove ununsed PGs\n"

	.no_dead_strip	_mlxsw_sp_port_headroom_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_port_headroom_set
_mlxsw_sp_port_headroom_set:            ; @mlxsw_sp_port_headroom_set
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x20, x0
	bl	_mlxsw_sp_port_is_pause_en
	mov	x3, x0
	ldp	x23, x19, [x20, #8]
	ldr	w1, [x19]
	ldr	w2, [x21]
	ldr	w4, [x20]
	mov	x0, x20
	bl	___mlxsw_sp_port_headroom_set
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	b	LBB0_7
LBB0_2:
	ldr	w1, [x21]
	mov	x0, x20
	bl	_mlxsw_sp_port_pg_prio_map
	cbz	w0, LBB0_4
; %bb.3:
	mov	x22, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	ldr	w1, [x21]
	ldr	w2, [x23]
	mov	x0, x20
	bl	_mlxsw_sp_port_pg_destroy
	b	LBB0_7
LBB0_4:
	ldr	w1, [x23]
	ldr	w2, [x21]
	mov	x0, x20
	bl	_mlxsw_sp_port_pg_destroy
	cbz	w0, LBB0_6
; %bb.5:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netdev_warn
LBB0_6:
	mov	w22, #0
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to configure port's headroom\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to set PG-priority mapping\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to remove ununsed PGs\n"

	.no_dead_strip	_mlxsw_sp_port_headroom_set
.subsections_via_symbols
