	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_INIT_PORT                 ## -- Begin function mlx4_INIT_PORT
	.p2align	4, 0x90
_mlx4_INIT_PORT:                        ## @mlx4_INIT_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	_MLX4_FLAG_OLD_PORT_CMDS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	%r13, %rdi
	callq	_mlx4_alloc_cmd_mailbox
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.7:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	movq	_MLX4_CMD_INIT_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MLX4_CMD_TIME_CLASS_A@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_CMD_WRAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_mlx4_cmd
	movl	%eax, %ebx
	testl	%ebx, %ebx
	jne	LBB0_6
LBB0_5:
	movq	%r13, %rdi
	callq	_mlx4_hca_core_clock_update
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	(%r14), %r12
	movslq	%r15d, %r15
	movq	8(%r13), %rax
	movq	16(%r13), %rcx
	movl	(%rax,%r15,4), %eax
	shll	$4, %eax
	movzbl	%al, %eax
	movl	(%rcx,%r15,4), %esi
	andl	$15, %esi
	shll	$8, %esi
	orl	%eax, %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_MLX4_PUT
	movq	24(%r13), %rax
	movb	(%rax,%r15,4), %cl
	movl	$128, %esi
	shll	%cl, %esi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_MLX4_PUT
	movq	32(%r13), %rax
	movl	(%rax,%r15,4), %esi
	movq	%r12, %rdi
	movl	$6, %edx
	callq	_MLX4_PUT
	movq	40(%r13), %rax
	movl	(%rax,%r15,4), %esi
	movq	%r12, %rdi
	movl	$10, %edx
	callq	_MLX4_PUT
	movl	8(%r14), %esi
	movq	_MLX4_CMD_INIT_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MLX4_CMD_TIME_CLASS_A@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_CMD_NATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r13, %rdi
	movl	%r15d, %edx
	xorl	%ecx, %ecx
	callq	_mlx4_cmd
	movl	%eax, %ebx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_mlx4_free_cmd_mailbox
	testl	%ebx, %ebx
	jne	LBB0_6
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_FLAG_OLD_PORT_CMDS,4,2    ## @MLX4_FLAG_OLD_PORT_CMDS
	.comm	_MLX4_CMD_INIT_PORT,4,2         ## @MLX4_CMD_INIT_PORT
	.comm	_MLX4_CMD_TIME_CLASS_A,4,2      ## @MLX4_CMD_TIME_CLASS_A
	.comm	_MLX4_CMD_NATIVE,4,2            ## @MLX4_CMD_NATIVE
	.comm	_MLX4_CMD_WRAPPED,4,2           ## @MLX4_CMD_WRAPPED
	.comm	_INIT_PORT_FLAGS_OFFSET,4,2     ## @INIT_PORT_FLAGS_OFFSET
	.comm	_INIT_PORT_MAX_GID_OFFSET,4,2   ## @INIT_PORT_MAX_GID_OFFSET
	.comm	_INIT_PORT_MAX_PKEY_OFFSET,4,2  ## @INIT_PORT_MAX_PKEY_OFFSET
	.comm	_INIT_PORT_MTU_OFFSET,4,2       ## @INIT_PORT_MTU_OFFSET
	.comm	_INIT_PORT_PORT_WIDTH_SHIFT,4,2 ## @INIT_PORT_PORT_WIDTH_SHIFT
	.comm	_INIT_PORT_VL_SHIFT,4,2         ## @INIT_PORT_VL_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_INIT_PORT                 ; -- Begin function mlx4_INIT_PORT
	.p2align	2
_mlx4_INIT_PORT:                        ; @mlx4_INIT_PORT
	.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	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MLX4_FLAG_OLD_PORT_CMDS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_FLAG_OLD_PORT_CMDS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_mlx4_alloc_cmd_mailbox
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.2:
	mov	x0, x21
	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
	b	_PTR_ERR
LBB0_3:
Lloh3:
	adrp	x8, _MLX4_CMD_INIT_PORT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX4_CMD_INIT_PORT@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
Lloh6:
	adrp	x8, _MLX4_CMD_TIME_CLASS_A@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLX4_CMD_TIME_CLASS_A@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
Lloh9:
	adrp	x8, _MLX4_CMD_WRAPPED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MLX4_CMD_WRAPPED@GOTPAGEOFF]
Lloh11:
	ldr	w6, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	mov	w3, #0
	bl	_mlx4_cmd
	mov	x20, x0
	cbnz	w20, LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_mlx4_hca_core_clock_update
LBB0_5:
	mov	x0, x20
	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
LBB0_6:
	ldr	x22, [x21]
	sbfiz	x23, x20, #2, #32
	ldp	x8, x9, [x19, #8]
	ldr	w8, [x8, x23]
	ubfiz	w1, w8, #4, #4
	ldr	w8, [x9, x23]
	bfi	w1, w8, #8, #4
	mov	x0, x22
	mov	w2, #0
	bl	_MLX4_PUT
	ldr	x8, [x19, #24]
	ldr	w8, [x8, x23]
	mov	w9, #128
	lsl	w1, w9, w8
	mov	x0, x22
	mov	w2, #4
	bl	_MLX4_PUT
	ldr	x8, [x19, #32]
	ldr	w1, [x8, x23]
	mov	x0, x22
	mov	w2, #6
	bl	_MLX4_PUT
	ldr	x8, [x19, #40]
	ldr	w1, [x8, x23]
	mov	x0, x22
	mov	w2, #10
	bl	_MLX4_PUT
	ldr	w1, [x21, #8]
Lloh12:
	adrp	x8, _MLX4_CMD_INIT_PORT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MLX4_CMD_INIT_PORT@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
Lloh15:
	adrp	x8, _MLX4_CMD_TIME_CLASS_A@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MLX4_CMD_TIME_CLASS_A@GOTPAGEOFF]
Lloh17:
	ldr	w5, [x8]
Lloh18:
	adrp	x8, _MLX4_CMD_NATIVE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MLX4_CMD_NATIVE@GOTPAGEOFF]
Lloh20:
	ldr	w6, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	w3, #0
	bl	_mlx4_cmd
	mov	x20, x0
	mov	x0, x19
	mov	x1, x21
	bl	_mlx4_free_cmd_mailbox
	cbnz	w20, LBB0_5
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_FLAG_OLD_PORT_CMDS,4,2    ; @MLX4_FLAG_OLD_PORT_CMDS
	.comm	_MLX4_CMD_INIT_PORT,4,2         ; @MLX4_CMD_INIT_PORT
	.comm	_MLX4_CMD_TIME_CLASS_A,4,2      ; @MLX4_CMD_TIME_CLASS_A
	.comm	_MLX4_CMD_NATIVE,4,2            ; @MLX4_CMD_NATIVE
	.comm	_MLX4_CMD_WRAPPED,4,2           ; @MLX4_CMD_WRAPPED
	.comm	_INIT_PORT_FLAGS_OFFSET,4,2     ; @INIT_PORT_FLAGS_OFFSET
	.comm	_INIT_PORT_MAX_GID_OFFSET,4,2   ; @INIT_PORT_MAX_GID_OFFSET
	.comm	_INIT_PORT_MAX_PKEY_OFFSET,4,2  ; @INIT_PORT_MAX_PKEY_OFFSET
	.comm	_INIT_PORT_MTU_OFFSET,4,2       ; @INIT_PORT_MTU_OFFSET
	.comm	_INIT_PORT_PORT_WIDTH_SHIFT,4,2 ; @INIT_PORT_PORT_WIDTH_SHIFT
	.comm	_INIT_PORT_VL_SHIFT,4,2         ; @INIT_PORT_VL_SHIFT
.subsections_via_symbols
