	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_slave_cmd
_mlx4_slave_cmd:                        ## @mlx4_slave_cmd
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r12d
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %r13
	callq	_mlx4_priv
	movq	8(%rax), %rbx
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_mutex_lock
	movl	%r14d, %edi
	callq	_cpu_to_be64
	movq	%rax, 48(%rbx)
	testq	%r15, %r15
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movl	(%r15), %edi
	callq	_cpu_to_be64
	jmp	LBB0_3
LBB0_2:
	xorl	%eax, %eax
LBB0_3:
	movq	%rax, 16(%rbx)
	movl	%r12d, %edi
	callq	_cpu_to_be32
	movl	%eax, 40(%rbx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	shll	$12, %eax
	movl	16(%rbp), %r14d
	movl	%r14d, %edi
	andl	$4095, %edi                     ## imm = 0xFFF
	orl	%eax, %edi
	callq	_cpu_to_be16
	movq	%rax, 32(%rbx)
	movq	_CMD_POLL_TOKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be16
	movq	%rax, 24(%rbx)
	movq	$0, 8(%rbx)
	xorl	%eax, %eax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	cmpl	$0, 4(%r15)
	setne	%al
	shll	$6, %eax
	movl	%eax, (%rbx)
	movq	%r13, %rdi
	callq	_mlx4_is_master
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	movl	8(%r13), %esi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	callq	_mlx4_master_process_vhcr
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.5:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_16
## %bb.6:
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	testq	%r15, %r15
	je	LBB0_14
## %bb.7:
	movq	16(%rbx), %rdi
	callq	_be64_to_cpu
	movl	%eax, (%r15)
	jmp	LBB0_15
LBB0_8:
	movq	24(%rbp), %r8
	movq	_MLX4_COMM_CMD_VHCR_POST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MLX4_COMM_TIME@GOTPCREL(%rip), %rax
	addq	(%rax), %r8
	movq	%r13, %rdi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	callq	_mlx4_comm_cmd
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	%eax, %r12d
	movq	(%r13), %rax
	movq	_MLX4_DEVICE_STATE_INTERNAL_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_18
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_mlx4_err
	jmp	LBB0_24
LBB0_11:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_22
## %bb.12:
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	testq	%r15, %r15
	je	LBB0_20
## %bb.13:
	movq	16(%rbx), %rdi
	callq	_be64_to_cpu
	movl	%eax, (%r15)
	jmp	LBB0_21
LBB0_14:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_mlx4_err
	movq	_CMD_STAT_BAD_PARAM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
LBB0_15:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_16:
	movq	8(%rbx), %rdi
	callq	_mlx4_status_to_errno
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_19
LBB0_17:
	movq	(%r13), %rax
	movq	_MLX4_DEVICE_STATE_INTERNAL_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_24
LBB0_18:
	movq	%r13, %rdi
	movl	%r14d, %esi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_mlx4_internal_err_ret_value
	jmp	LBB0_23
LBB0_19:
	xorl	%r12d, %r12d
	jmp	LBB0_24
LBB0_20:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	callq	_mlx4_err
	movq	_CMD_STAT_BAD_PARAM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
LBB0_21:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_22:
	movq	8(%rbx), %rdi
	callq	_mlx4_status_to_errno
LBB0_23:
	movl	%eax, %r12d
LBB0_24:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_POLL_TOKEN,4,2             ## @CMD_POLL_TOKEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"response expected while output mailbox is NULL for command 0x%x\n"

	.comm	_CMD_STAT_BAD_PARAM,8,3         ## @CMD_STAT_BAD_PARAM
	.comm	_MLX4_DEVICE_STATE_INTERNAL_ERROR,4,2 ## @MLX4_DEVICE_STATE_INTERNAL_ERROR
	.comm	_MLX4_COMM_CMD_VHCR_POST,4,2    ## @MLX4_COMM_CMD_VHCR_POST
	.comm	_MLX4_COMM_TIME,8,3             ## @MLX4_COMM_TIME
L_.str.1:                               ## @.str.1
	.asciz	"failed execution of VHCR_POST command opcode 0x%x\n"

	.no_dead_strip	_mlx4_slave_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_slave_cmd
_mlx4_slave_cmd:                        ; @mlx4_slave_cmd
	.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	x26, x7
	mov	x20, x6
	mov	x22, x5
	mov	x27, x4
	mov	x25, x3
	mov	x24, x2
	mov	x28, x1
	mov	x21, x0
	bl	_mlx4_priv
	mov	x19, x0
	ldr	x23, [x0, #8]
	bl	_mutex_lock
	mov	x0, x28
	bl	_cpu_to_be64
	str	x0, [x23, #48]
	cbz	x24, LBB0_2
; %bb.1:
	ldr	w0, [x24]
	bl	_cpu_to_be64
	b	LBB0_3
LBB0_2:
	mov	x0, #0
LBB0_3:
	str	x0, [x23, #16]
	mov	x0, x27
	bl	_cpu_to_be32
	str	w0, [x23, #40]
	mov	x0, x20
	bfi	w0, w22, #12, #20
	bl	_cpu_to_be16
	str	x0, [x23, #32]
Lloh0:
	adrp	x8, _CMD_POLL_TOKEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_POLL_TOKEN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_cpu_to_be16
	str	x0, [x23, #24]
	str	xzr, [x23, #8]
	ldr	w8, [x19, #4]
	cmp	w8, #0
	cset	w8, ne
	lsl	w8, w8, #6
	str	w8, [x23]
	mov	x0, x21
	bl	_mlx4_is_master
	cbz	x0, LBB0_8
; %bb.4:
	ldr	w1, [x21, #8]
	mov	x0, x21
	mov	x2, x23
	bl	_mlx4_master_process_vhcr
	mov	x26, x0
	cbnz	w0, LBB0_16
; %bb.5:
	cbz	w25, LBB0_15
; %bb.6:
	cbz	x24, LBB0_14
; %bb.7:
	ldr	x0, [x23, #16]
	bl	_be64_to_cpu
	str	w0, [x24]
	b	LBB0_15
LBB0_8:
Lloh3:
	adrp	x8, _MLX4_COMM_CMD_VHCR_POST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX4_COMM_CMD_VHCR_POST@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _MLX4_COMM_TIME@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLX4_COMM_TIME@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	add	x4, x8, x26
	mov	x0, x21
	mov	w2, #0
	mov	x3, x20
	bl	_mlx4_comm_cmd
	cbz	w0, LBB0_11
; %bb.9:
	ldr	x8, [x21]
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _MLX4_DEVICE_STATE_INTERNAL_ERROR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MLX4_DEVICE_STATE_INTERNAL_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_17
; %bb.10:
	mov	x26, x0
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_mlx4_err
	b	LBB0_21
LBB0_11:
	cbz	w25, LBB0_19
; %bb.12:
	cbz	x24, LBB0_18
; %bb.13:
	ldr	x0, [x23, #16]
	bl	_be64_to_cpu
	str	w0, [x24]
	b	LBB0_19
LBB0_14:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_mlx4_err
Lloh16:
	adrp	x8, _CMD_STAT_BAD_PARAM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CMD_STAT_BAD_PARAM@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x23, #8]
LBB0_15:
	ldr	x0, [x23, #8]
	bl	_mlx4_status_to_errno
	mov	x26, x0
	cbz	w0, LBB0_21
LBB0_16:
	ldr	x8, [x21]
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _MLX4_DEVICE_STATE_INTERNAL_ERROR@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MLX4_DEVICE_STATE_INTERNAL_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
LBB0_17:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_mlx4_internal_err_ret_value
	b	LBB0_20
LBB0_18:
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_mlx4_err
Lloh24:
	adrp	x8, _CMD_STAT_BAD_PARAM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CMD_STAT_BAD_PARAM@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [x23, #8]
LBB0_19:
	ldr	x0, [x23, #8]
	bl	_mlx4_status_to_errno
LBB0_20:
	mov	x26, x0
LBB0_21:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x26
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_POLL_TOKEN,4,2             ; @CMD_POLL_TOKEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"response expected while output mailbox is NULL for command 0x%x\n"

	.comm	_CMD_STAT_BAD_PARAM,8,3         ; @CMD_STAT_BAD_PARAM
	.comm	_MLX4_DEVICE_STATE_INTERNAL_ERROR,4,2 ; @MLX4_DEVICE_STATE_INTERNAL_ERROR
	.comm	_MLX4_COMM_CMD_VHCR_POST,4,2    ; @MLX4_COMM_CMD_VHCR_POST
	.comm	_MLX4_COMM_TIME,8,3             ; @MLX4_COMM_TIME
l_.str.1:                               ; @.str.1
	.asciz	"failed execution of VHCR_POST command opcode 0x%x\n"

	.no_dead_strip	_mlx4_slave_cmd
.subsections_via_symbols
