	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_init_slave
_mlx4_init_slave:                       ## @mlx4_init_slave
	.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, %r15
	callq	_mlx4_priv
	movq	%rax, %r12
	movl	16(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_NUM_OF_RESET_RETRIES@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r13d
	leaq	4(%r12), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movl	$1, (%r12)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_mlx4_warn
	movq	_MLX4_COMM_CMD_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MLX4_COMM_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_mlx4_comm_cmd
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movq	_MLX4_DELAY_RESET_SLAVE@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jne	LBB0_8
## %bb.2:
	movq	_SLEEP_TIME_IN_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.3:
	movl	$1, %r14d
	subl	%r13d, %r14d
	leaq	L_.str.1(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edx
	addl	%r14d, %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	xorl	%eax, %eax
	callq	_mlx4_warn
	movq	_MLX4_COMM_CMD_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MLX4_COMM_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_mlx4_comm_cmd
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	1(%r14), %eax
	testl	%r14d, %r14d
	movl	%eax, %r14d
	jne	LBB0_4
LBB0_6:
	movq	8(%r12), %rdi
	callq	_readl
	movl	%eax, %edi
	callq	_swab32
	movl	%eax, %r12d
	xorl	%eax, %eax
	callq	_mlx4_comm_get_version
	movl	%eax, %edi
	callq	_MLX4_COMM_GET_IF_REV
	movq	%rax, %rbx
	movl	%r12d, %edi
	callq	_MLX4_COMM_GET_IF_REV
	cmpq	%rax, %rbx
	jne	LBB0_7
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_mlx4_warn
	movq	_MLX4_COMM_CMD_VHCR0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MLX4_COMM_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_mlx4_comm_cmd
	testl	%eax, %eax
	jne	LBB0_8
## %bb.10:
	movq	_MLX4_COMM_CMD_VHCR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MLX4_COMM_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_mlx4_comm_cmd
	testl	%eax, %eax
	jne	LBB0_8
## %bb.11:
	movq	_MLX4_COMM_CMD_VHCR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	sarl	$16, %edx
	movq	_MLX4_COMM_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_mlx4_comm_cmd
	testl	%eax, %eax
	jne	LBB0_8
## %bb.12:
	movq	_MLX4_COMM_CMD_VHCR_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MLX4_COMM_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_mlx4_comm_cmd
	testl	%eax, %eax
	jne	LBB0_8
## %bb.13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_mlx4_err
LBB0_8:
	movq	_MLX4_COMM_CMD_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_mlx4_comm_cmd
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_OF_RESET_RETRIES,4,2       ## @NUM_OF_RESET_RETRIES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Sending reset\n"

	.comm	_MLX4_COMM_CMD_RESET,4,2        ## @MLX4_COMM_CMD_RESET
	.comm	_MLX4_COMM_TIME,4,2             ## @MLX4_COMM_TIME
	.comm	_MLX4_DELAY_RESET_SLAVE,4,2     ## @MLX4_DELAY_RESET_SLAVE
	.comm	_SLEEP_TIME_IN_RESET,4,2        ## @SLEEP_TIME_IN_RESET
L_.str.1:                               ## @.str.1
	.asciz	"slave is currently in themiddle of FLR. retrying...(try num:%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"slave driver version is not supported by the master\n"

L_.str.3:                               ## @.str.3
	.asciz	"Sending vhcr0\n"

	.comm	_MLX4_COMM_CMD_VHCR0,4,2        ## @MLX4_COMM_CMD_VHCR0
	.comm	_MLX4_COMM_CMD_VHCR1,4,2        ## @MLX4_COMM_CMD_VHCR1
	.comm	_MLX4_COMM_CMD_VHCR2,4,2        ## @MLX4_COMM_CMD_VHCR2
	.comm	_MLX4_COMM_CMD_VHCR_EN,4,2      ## @MLX4_COMM_CMD_VHCR_EN
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_mlx4_init_slave
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_init_slave
_mlx4_init_slave:                       ; @mlx4_init_slave
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x0
	bl	_mlx4_priv
	mov	x22, x0
	ldr	w21, [x0, #16]
Lloh0:
	adrp	x26, _NUM_OF_RESET_RETRIES@GOTPAGE
Lloh1:
	ldr	x26, [x26, _NUM_OF_RESET_RETRIES@GOTPAGEOFF]
	ldr	w23, [x26]
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	mov	w8, #1
	str	w8, [x22]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mlx4_warn
Lloh4:
	adrp	x24, _MLX4_COMM_CMD_RESET@GOTPAGE
Lloh5:
	ldr	x24, [x24, _MLX4_COMM_CMD_RESET@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh6:
	adrp	x25, _MLX4_COMM_TIME@GOTPAGE
Lloh7:
	ldr	x25, [x25, _MLX4_COMM_TIME@GOTPAGEOFF]
	ldr	w3, [x25]
	mov	x0, x20
	mov	w2, #0
	bl	_mlx4_comm_cmd
	cbz	w0, LBB0_5
; %bb.1:
Lloh8:
	adrp	x8, _MLX4_DELAY_RESET_SLAVE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MLX4_DELAY_RESET_SLAVE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ne	LBB0_12
; %bb.2:
Lloh11:
	adrp	x8, _SLEEP_TIME_IN_RESET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SLEEP_TIME_IN_RESET@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_msleep
	cbz	w23, LBB0_5
; %bb.3:
	mov	w8, #1
	sub	w27, w8, w23
Lloh14:
	adrp	x23, l_.str.1@PAGE
Lloh15:
	add	x23, x23, l_.str.1@PAGEOFF
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x26]
	add	w8, w27, w8
	str	x8, [sp]
	mov	x0, x20
	mov	x1, x23
	bl	_mlx4_warn
	ldr	w1, [x24]
	ldr	w3, [x25]
	mov	x0, x20
	mov	w2, #0
	bl	_mlx4_comm_cmd
	cmp	w0, #0
	ccmp	w27, #0, #4, ne
	add	w27, w27, #1
	b.ne	LBB0_4
LBB0_5:
	ldr	x0, [x22, #8]
	bl	_readl
	bl	_swab32
	mov	x22, x0
	bl	_mlx4_comm_get_version
	bl	_MLX4_COMM_GET_IF_REV
	mov	x23, x0
	mov	x0, x22
	bl	_MLX4_COMM_GET_IF_REV
	cmp	x23, x0
	b.ne	LBB0_11
; %bb.6:
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_mlx4_warn
Lloh18:
	adrp	x8, _MLX4_COMM_CMD_VHCR0@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MLX4_COMM_CMD_VHCR0@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w3, [x25]
	mov	x0, x20
	bl	_mlx4_comm_cmd
	cbnz	w0, LBB0_12
; %bb.7:
Lloh21:
	adrp	x8, _MLX4_COMM_CMD_VHCR1@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MLX4_COMM_CMD_VHCR1@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	ldr	w3, [x25]
	mov	x0, x20
	bl	_mlx4_comm_cmd
	cbnz	w0, LBB0_12
; %bb.8:
Lloh24:
	adrp	x8, _MLX4_COMM_CMD_VHCR2@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MLX4_COMM_CMD_VHCR2@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	asr	w2, w21, #16
	ldr	w3, [x25]
	mov	x0, x20
	bl	_mlx4_comm_cmd
	cbnz	w0, LBB0_12
; %bb.9:
Lloh27:
	adrp	x8, _MLX4_COMM_CMD_VHCR_EN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MLX4_COMM_CMD_VHCR_EN@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	ldr	w3, [x25]
	mov	x0, x20
	mov	x2, x21
	bl	_mlx4_comm_cmd
	cbnz	w0, LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_13
LBB0_11:
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_mlx4_err
LBB0_12:
	ldr	w1, [x24]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_mlx4_comm_cmd
	mov	x0, x19
	bl	_mutex_unlock
Lloh32:
	adrp	x8, _EIO@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_OF_RESET_RETRIES,4,2       ; @NUM_OF_RESET_RETRIES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Sending reset\n"

	.comm	_MLX4_COMM_CMD_RESET,4,2        ; @MLX4_COMM_CMD_RESET
	.comm	_MLX4_COMM_TIME,4,2             ; @MLX4_COMM_TIME
	.comm	_MLX4_DELAY_RESET_SLAVE,4,2     ; @MLX4_DELAY_RESET_SLAVE
	.comm	_SLEEP_TIME_IN_RESET,4,2        ; @SLEEP_TIME_IN_RESET
l_.str.1:                               ; @.str.1
	.asciz	"slave is currently in themiddle of FLR. retrying...(try num:%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"slave driver version is not supported by the master\n"

l_.str.3:                               ; @.str.3
	.asciz	"Sending vhcr0\n"

	.comm	_MLX4_COMM_CMD_VHCR0,4,2        ; @MLX4_COMM_CMD_VHCR0
	.comm	_MLX4_COMM_CMD_VHCR1,4,2        ; @MLX4_COMM_CMD_VHCR1
	.comm	_MLX4_COMM_CMD_VHCR2,4,2        ; @MLX4_COMM_CMD_VHCR2
	.comm	_MLX4_COMM_CMD_VHCR_EN,4,2      ; @MLX4_COMM_CMD_VHCR_EN
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_mlx4_init_slave
.subsections_via_symbols
