	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_adjust_port
_mlx4_adjust_port:                      ## @mlx4_adjust_port
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_MLX4_PROT_ETH@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	%ecx, (%rax)
	jne	LBB0_6
## %bb.1:
	movq	%rdx, %r14
	movq	(%rdi), %rax
	movq	_MLX4_STEERING_MODE_B0@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	movq	_MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
LBB0_3:
	movl	20(%r14), %edx
	callq	_mlx4_slave_convert_port
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	%eax, 20(%r14)
	jmp	LBB0_6
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_PROT_ETH,4,2              ## @MLX4_PROT_ETH
	.comm	_MLX4_STEERING_MODE_B0,8,3      ## @MLX4_STEERING_MODE_B0
	.comm	_MLX4_STEERING_MODE_DEVICE_MANAGED,8,3 ## @MLX4_STEERING_MODE_DEVICE_MANAGED
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mlx4_adjust_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_adjust_port
_mlx4_adjust_port:                      ; @mlx4_adjust_port
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _MLX4_PROT_ETH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_PROT_ETH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w3
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _MLX4_STEERING_MODE_B0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLX4_STEERING_MODE_B0@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MLX4_STEERING_MODE_DEVICE_MANAGED@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_4
; %bb.2:
	mov	x19, x2
	ldr	w2, [x2, #20]
	bl	_mlx4_slave_convert_port
	tbnz	w0, #31, LBB0_6
; %bb.3:
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #20]
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_PROT_ETH,4,2              ; @MLX4_PROT_ETH
	.comm	_MLX4_STEERING_MODE_B0,8,3      ; @MLX4_STEERING_MODE_B0
	.comm	_MLX4_STEERING_MODE_DEVICE_MANAGED,8,3 ; @MLX4_STEERING_MODE_DEVICE_MANAGED
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mlx4_adjust_port
.subsections_via_symbols
