	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sx_port_type_set
_mlxsw_sx_port_type_set:                ## @mlxsw_sx_port_type_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r14d
	callq	_mlxsw_core_driver_priv
	movq	%rax, %r15
	movq	_DEVLINK_PORT_TYPE_AUTO@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_2:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	___mlxsw_sx_port_remove
	leaq	-32(%rbp), %rdx
	leaq	-28(%rbp), %rcx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mlxsw_sx_port_module_info_get
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	_DEVLINK_PORT_TYPE_ETH@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_5
## %bb.4:
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	___mlxsw_sx_port_eth_create
	jmp	LBB0_7
LBB0_5:
	movq	_DEVLINK_PORT_TYPE_IB@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	%ebx, (%rcx)
	jne	LBB0_7
## %bb.6:
	movl	-32(%rbp), %edx
	movl	-28(%rbp), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	___mlxsw_sx_port_ib_create
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEVLINK_PORT_TYPE_AUTO,4,2     ## @DEVLINK_PORT_TYPE_AUTO
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_DEVLINK_PORT_TYPE_ETH,4,2      ## @DEVLINK_PORT_TYPE_ETH
	.comm	_DEVLINK_PORT_TYPE_IB,4,2       ## @DEVLINK_PORT_TYPE_IB
	.no_dead_strip	_mlxsw_sx_port_type_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sx_port_type_set
_mlxsw_sx_port_type_set:                ; @mlxsw_sx_port_type_set
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x19, x1
	bl	_mlxsw_core_driver_priv
Lloh0:
	adrp	x8, _DEVLINK_PORT_TYPE_AUTO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEVLINK_PORT_TYPE_AUTO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_2:
	mov	x20, x0
	mov	x1, x19
	bl	___mlxsw_sx_port_remove
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x20
	mov	x1, x19
	bl	_mlxsw_sx_port_module_info_get
	cbnz	w0, LBB0_8
; %bb.3:
Lloh6:
	adrp	x8, _DEVLINK_PORT_TYPE_ETH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DEVLINK_PORT_TYPE_ETH@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_5
; %bb.4:
	ldp	w3, w2, [sp, #8]
	mov	x0, x20
	mov	x1, x19
	bl	___mlxsw_sx_port_eth_create
	b	LBB0_8
LBB0_5:
Lloh9:
	adrp	x8, _DEVLINK_PORT_TYPE_IB@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DEVLINK_PORT_TYPE_IB@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_7
; %bb.6:
	ldp	w3, w2, [sp, #8]
	mov	x0, x20
	mov	x1, x19
	bl	___mlxsw_sx_port_ib_create
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DEVLINK_PORT_TYPE_AUTO,4,2     ; @DEVLINK_PORT_TYPE_AUTO
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_DEVLINK_PORT_TYPE_ETH,4,2      ; @DEVLINK_PORT_TYPE_ETH
	.comm	_DEVLINK_PORT_TYPE_IB,4,2       ; @DEVLINK_PORT_TYPE_IB
	.no_dead_strip	_mlxsw_sx_port_type_set
.subsections_via_symbols
