	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_get_phys_port_id          ## -- Begin function mlx4_get_phys_port_id
	.p2align	4, 0x90
_mlx4_get_phys_port_id:                 ## @mlx4_get_phys_port_id
	.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	%rdi, %r13
	callq	_mlx4_alloc_cmd_mailbox
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	cmpq	$0, (%r13)
	je	LBB0_2
## %bb.3:
	movq	(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %ebx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$256, %r12d                     ## imm = 0x100
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	$20, %edx
	callq	_MLX4_GET
	movq	%r15, %rsi
	movl	$28, %edx
	callq	_MLX4_GET
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	addq	$256, %r12                      ## imm = 0x100
	cmpq	(%r13), %rbx
	ja	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r14), %edx
	movq	_MLX4_CMD_MOD_STAT_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_CMD_TIME_CLASS_A@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_MLX4_CMD_NATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r13, %rdi
	xorl	%esi, %esi
	movq	%r12, %rcx
	movl	$2, %r8d
	pushq	%rax
	pushq	%r10
	callq	_mlx4_cmd_box
	addq	$16, %rsp
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %r15d
	movq	%r13, %rdi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_mlx4_err
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_7
LBB0_2:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_8:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_mlx4_free_cmd_mailbox
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_CMD_MOD_STAT_CFG,4,2      ## @MLX4_CMD_MOD_STAT_CFG
	.comm	_MLX4_CMD_TIME_CLASS_A,4,2      ## @MLX4_CMD_TIME_CLASS_A
	.comm	_MLX4_CMD_NATIVE,4,2            ## @MLX4_CMD_NATIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fail to get port %d uplink guid\n"

	.comm	_MOD_STAT_CFG_GUID_H,4,2        ## @MOD_STAT_CFG_GUID_H
	.comm	_MOD_STAT_CFG_GUID_L,4,2        ## @MOD_STAT_CFG_GUID_L
	.comm	_MOD_STAT_CFG_PORT_OFFSET,8,3   ## @MOD_STAT_CFG_PORT_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_get_phys_port_id          ; -- Begin function mlx4_get_phys_port_id
	.p2align	2
_mlx4_get_phys_port_id:                 ; @mlx4_get_phys_port_id
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	bl	_mlx4_alloc_cmd_mailbox
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_2:
	ldr	x8, [x19]
	cbz	x8, LBB0_8
; %bb.3:
	mov	w21, #0
	ldr	x22, [x20]
	mov	w23, #1
	mov	w24, #256
Lloh0:
	adrp	x27, _MLX4_CMD_MOD_STAT_CFG@GOTPAGE
Lloh1:
	ldr	x27, [x27, _MLX4_CMD_MOD_STAT_CFG@GOTPAGEOFF]
Lloh2:
	adrp	x28, _MLX4_CMD_TIME_CLASS_A@GOTPAGE
Lloh3:
	ldr	x28, [x28, _MLX4_CMD_TIME_CLASS_A@GOTPAGEOFF]
Lloh4:
	adrp	x25, _MLX4_CMD_NATIVE@GOTPAGE
Lloh5:
	ldr	x25, [x25, _MLX4_CMD_NATIVE@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x1, x22
	mov	w2, #20
	bl	_MLX4_GET
	mov	x1, x22
	mov	w2, #28
	bl	_MLX4_GET
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	ldr	x8, [x19]
	add	x24, x24, #256
	cmp	x23, x8
	b.hi	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x20, #8]
	ldr	w5, [x27]
	ldr	w6, [x28]
	ldr	w7, [x25]
	mov	x0, x19
	mov	w1, #0
	mov	x3, x24
	mov	w4, #2
	bl	_mlx4_cmd_box
	cbz	w0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x26, x0
	mov	x0, x19
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_mlx4_err
	mov	x21, x26
	b	LBB0_5
LBB0_8:
	mov	w21, #0
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_mlx4_free_cmd_mailbox
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_CMD_MOD_STAT_CFG,4,2      ; @MLX4_CMD_MOD_STAT_CFG
	.comm	_MLX4_CMD_TIME_CLASS_A,4,2      ; @MLX4_CMD_TIME_CLASS_A
	.comm	_MLX4_CMD_NATIVE,4,2            ; @MLX4_CMD_NATIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fail to get port %d uplink guid\n"

	.comm	_MOD_STAT_CFG_GUID_H,4,2        ; @MOD_STAT_CFG_GUID_H
	.comm	_MOD_STAT_CFG_GUID_L,4,2        ; @MOD_STAT_CFG_GUID_L
	.comm	_MOD_STAT_CFG_PORT_OFFSET,8,3   ; @MOD_STAT_CFG_PORT_OFFSET
.subsections_via_symbols
