	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eth_link_query_port
_eth_link_query_port:                   ## @eth_link_query_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	%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
	movq	%rdx, %rbx
	movl	%esi, %r13d
	callq	_to_mdev
	movq	%rax, %r15
	movq	(%rax), %rdi
	callq	_mlx4_alloc_cmd_mailbox
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.16:
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rbx
	movq	(%r15), %rdi
	movl	8(%r12), %edx
	movq	_MLX4_CMD_QUERY_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_CMD_TIME_CLASS_B@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_MLX4_CMD_WRAPPED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	xorl	%esi, %esi
	movl	%r13d, %ecx
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	%r10
	callq	_mlx4_cmd_box
	addq	$16, %rsp
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.2:
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	(%r12), %rax
	cmpl	$64, 20(%rax)
	jne	LBB0_3
## %bb.4:
	movl	%r13d, %edx
	movq	_IB_WIDTH_4X@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movl	%r13d, %edx
	movq	_IB_WIDTH_1X@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movl	%eax, 56(%r13)
	movq	_IB_SPEED_QDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r13)
	movq	_IB_PORT_CM_SUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r13)
	movq	(%rbx), %rax
	movq	8(%rax), %rcx
	movslq	%edx, %r14
	movl	(%rcx,%r14,4), %ecx
	movl	%ecx, 44(%r13)
	movl	(%rax), %eax
	movl	%eax, 40(%r13)
	movl	$1, (%r13)
	movq	_IB_MTU_4096@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
	movl	$2, 4(%r13)
	movq	_IB_PORT_DOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rdi, 8(%r13)
	callq	_state_to_phys_state
	movq	%rax, 16(%r13)
	movq	_IB_MTU_256@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r13)
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movq	16(%rbx), %rax
	movq	-8(%rax,%r14,8), %r13
	testq	%r13, %r13
	je	LBB0_14
## %bb.6:
	movl	(%r13), %edi
	callq	_iboe_get_mtu
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	24(%r14), %edi
	movl	%eax, %esi
	callq	_min
	jmp	LBB0_9
LBB0_8:
	movq	_IB_MTU_256@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_9:
	movq	%rax, 32(%r14)
	movq	%r13, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movq	%r13, %rdi
	callq	_netif_carrier_ok
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_IB_PORT_ACTIVE@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_IB_PORT_DOWN@GOTPCREL(%rip), %rax
LBB0_13:
	movq	(%rax), %rdi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%rdi, 8(%r14)
	callq	_state_to_phys_state
	movq	%rax, 16(%r14)
LBB0_14:
	movq	%r15, %rdi
	callq	_spin_unlock
	movl	-52(%rbp), %r14d                ## 4-byte Reload
LBB0_15:
	movq	(%rbx), %rdi
	movq	%r12, %rsi
	callq	_mlx4_free_cmd_mailbox
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_CMD_QUERY_PORT,4,2        ## @MLX4_CMD_QUERY_PORT
	.comm	_MLX4_CMD_TIME_CLASS_B,4,2      ## @MLX4_CMD_TIME_CLASS_B
	.comm	_MLX4_CMD_WRAPPED,4,2           ## @MLX4_CMD_WRAPPED
	.comm	_IB_WIDTH_4X,4,2                ## @IB_WIDTH_4X
	.comm	_IB_WIDTH_1X,4,2                ## @IB_WIDTH_1X
	.comm	_IB_SPEED_QDR,4,2               ## @IB_SPEED_QDR
	.comm	_IB_PORT_CM_SUP,4,2             ## @IB_PORT_CM_SUP
	.comm	_IB_MTU_4096,4,2                ## @IB_MTU_4096
	.comm	_IB_PORT_DOWN,8,3               ## @IB_PORT_DOWN
	.comm	_IB_MTU_256,8,3                 ## @IB_MTU_256
	.comm	_IB_PORT_ACTIVE,8,3             ## @IB_PORT_ACTIVE
	.no_dead_strip	_eth_link_query_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function eth_link_query_port
lCPI0_0:
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_eth_link_query_port:                   ; @eth_link_query_port
	.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	x19, x2
	mov	x23, x1
	bl	_to_mdev
	mov	x20, x0
	ldr	x0, [x0]
	bl	_mlx4_alloc_cmd_mailbox
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	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
	b	_PTR_ERR
LBB0_2:
	ldr	x0, [x20]
	ldr	w2, [x21, #8]
Lloh0:
	adrp	x8, _MLX4_CMD_QUERY_PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_CMD_QUERY_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w5, [x8]
Lloh3:
	adrp	x8, _MLX4_CMD_TIME_CLASS_B@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX4_CMD_TIME_CLASS_B@GOTPAGEOFF]
Lloh5:
	ldr	w6, [x8]
Lloh6:
	adrp	x8, _MLX4_CMD_WRAPPED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLX4_CMD_WRAPPED@GOTPAGEOFF]
Lloh8:
	ldr	w7, [x8]
	mov	w1, #0
	mov	x3, x23
	mov	w4, #0
	bl	_mlx4_cmd_box
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.3:
	ldr	x8, [x21]
	ldr	w8, [x8, #20]
Lloh9:
	adrp	x9, _IB_WIDTH_4X@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IB_WIDTH_4X@GOTPAGEOFF]
Lloh11:
	adrp	x10, _IB_WIDTH_1X@GOTPAGE
Lloh12:
	ldr	x10, [x10, _IB_WIDTH_1X@GOTPAGEOFF]
	cmp	w8, #64
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	str	w8, [x19, #56]
Lloh13:
	adrp	x8, _IB_SPEED_QDR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IB_SPEED_QDR@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _IB_PORT_CM_SUP@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IB_PORT_CM_SUP@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #48]
	ldr	x8, [x20]
	ldr	x9, [x8, #8]
	ldr	w9, [x9, w23, sxtw #2]
	ldr	w8, [x8]
	stp	w8, w9, [x19, #40]
Lloh19:
	adrp	x8, lCPI0_0@PAGE
Lloh20:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
Lloh21:
	adrp	x8, _IB_MTU_4096@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IB_MTU_4096@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh24:
	adrp	x8, _IB_PORT_DOWN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IB_PORT_DOWN@GOTPAGEOFF]
Lloh26:
	ldr	x0, [x8]
	str	x0, [x19, #8]
	bl	_state_to_phys_state
	str	x0, [x19, #16]
Lloh27:
	adrp	x25, _IB_MTU_256@GOTPAGE
Lloh28:
	ldr	x25, [x25, _IB_MTU_256@GOTPAGEOFF]
	ldr	x8, [x25]
	str	x8, [x19, #32]
	add	x24, x20, #8
	mov	x0, x24
	bl	_spin_lock
	ldr	x8, [x20, #16]
	add	x8, x8, w23, sxtw #3
	ldur	x23, [x8, #-8]
	cbz	x23, LBB0_12
; %bb.4:
	ldr	w0, [x23]
	bl	_iboe_get_mtu
	cbz	w0, LBB0_6
; %bb.5:
	mov	x1, x0
	ldr	w0, [x19, #24]
	bl	_min
	b	LBB0_7
LBB0_6:
	ldr	x0, [x25]
LBB0_7:
	str	x0, [x19, #32]
	mov	x0, x23
	bl	_netif_running
	cbz	x0, LBB0_10
; %bb.8:
	mov	x0, x23
	bl	_netif_carrier_ok
	cbz	x0, LBB0_10
; %bb.9:
Lloh29:
	adrp	x8, _IB_PORT_ACTIVE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _IB_PORT_ACTIVE@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh31:
	adrp	x8, _IB_PORT_DOWN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _IB_PORT_DOWN@GOTPAGEOFF]
LBB0_11:
	ldr	x0, [x8]
	str	x0, [x19, #8]
	bl	_state_to_phys_state
	str	x0, [x19, #16]
LBB0_12:
	mov	x0, x24
	bl	_spin_unlock
LBB0_13:
	ldr	x0, [x20]
	mov	x1, x21
	bl	_mlx4_free_cmd_mailbox
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdrp	Lloh19, Lloh21
	.loh AdrpLdr	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_CMD_QUERY_PORT,4,2        ; @MLX4_CMD_QUERY_PORT
	.comm	_MLX4_CMD_TIME_CLASS_B,4,2      ; @MLX4_CMD_TIME_CLASS_B
	.comm	_MLX4_CMD_WRAPPED,4,2           ; @MLX4_CMD_WRAPPED
	.comm	_IB_WIDTH_4X,4,2                ; @IB_WIDTH_4X
	.comm	_IB_WIDTH_1X,4,2                ; @IB_WIDTH_1X
	.comm	_IB_SPEED_QDR,4,2               ; @IB_SPEED_QDR
	.comm	_IB_PORT_CM_SUP,4,2             ; @IB_PORT_CM_SUP
	.comm	_IB_MTU_4096,4,2                ; @IB_MTU_4096
	.comm	_IB_PORT_DOWN,8,3               ; @IB_PORT_DOWN
	.comm	_IB_MTU_256,8,3                 ; @IB_MTU_256
	.comm	_IB_PORT_ACTIVE,8,3             ; @IB_PORT_ACTIVE
	.no_dead_strip	_eth_link_query_port
.subsections_via_symbols
