	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r13
	callq	_mlx4_priv
	movq	8(%rax), %r14
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_mutex_lock
	movl	%ebx, %edi
	callq	_cpu_to_be64
	movq	%rax, 48(%r14)
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movl	(%r15), %edi
	callq	_cpu_to_be64
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, 16(%r14)
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be32
	movl	%eax, 40(%r14)
	shll	$12, %r12d
	movl	16(%rbp), %edi
	andl	$4095, %edi                     ## imm = 0xFFF
	orl	%r12d, %edi
	callq	_cpu_to_be16
	movq	%rax, 32(%r14)
	movq	_CMD_POLL_TOKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be16
	movq	%rax, 24(%r14)
	movq	$0, 8(%r14)
	xorl	%eax, %eax
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	cmpl	$0, 4(%r15)
	setne	%al
	shll	$6, %eax
	movl	%eax, (%r14)
	movq	%r13, %rdi
	callq	_mlx4_is_master
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movl	(%r13), %esi
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_mlx4_master_process_vhcr
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
	jmp	LBB0_5
LBB0_10:
	movq	24(%rbp), %rcx
	movq	_MLX4_COMM_CMD_VHCR_POST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MLX4_COMM_TIME@GOTPCREL(%rip), %rax
	addq	(%rax), %rcx
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_mlx4_comm_cmd
	testl	%eax, %eax
	je	LBB0_5
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	16(%rbp), %edx
	callq	_mlx4_err
	jmp	LBB0_12
LBB0_5:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_9
## %bb.6:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.7:
	movq	16(%r14), %rdi
	callq	_be64_to_cpu
	movl	%eax, (%rbx)
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	16(%rbp), %edx
	callq	_mlx4_err
	movq	_CMD_STAT_BAD_PARAM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
LBB0_9:
	movq	8(%r14), %rdi
	callq	_mlx4_status_to_errno
	movl	%eax, %ebx
LBB0_12:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %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 whileoutput mailbox is NULL for command 0x%x\n"

	.comm	_CMD_STAT_BAD_PARAM,8,3         ## @CMD_STAT_BAD_PARAM
	.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 commandopcode 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	x25, x7
	mov	x21, x6
	mov	x26, x5
	mov	x27, x4
	mov	x24, x3
	mov	x22, x2
	mov	x28, x1
	mov	x23, x0
	bl	_mlx4_priv
	mov	x19, x0
	ldr	x20, [x0, #8]
	bl	_mutex_lock
	mov	x0, x28
	bl	_cpu_to_be64
	str	x0, [x20, #48]
	cbz	x22, LBB0_2
; %bb.1:
	ldr	w0, [x22]
	bl	_cpu_to_be64
	b	LBB0_3
LBB0_2:
	mov	x0, #0
LBB0_3:
	str	x0, [x20, #16]
	mov	x0, x27
	bl	_cpu_to_be32
	str	w0, [x20, #40]
	mov	x0, x21
	bfi	w0, w26, #12, #20
	bl	_cpu_to_be16
	str	x0, [x20, #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, [x20, #24]
	str	xzr, [x20, #8]
	ldr	w8, [x19, #4]
	cmp	w8, #0
	cset	w8, ne
	lsl	w8, w8, #6
	str	w8, [x20]
	mov	x0, x23
	bl	_mlx4_is_master
	cbz	x0, LBB0_8
; %bb.4:
	ldr	w1, [x23]
	mov	x0, x23
	mov	x2, x20
	bl	_mlx4_master_process_vhcr
	mov	x25, x0
	cbnz	w0, LBB0_14
; %bb.5:
	cbz	w24, LBB0_13
; %bb.6:
	cbz	x22, LBB0_12
LBB0_7:
	ldr	x0, [x20, #16]
	bl	_be64_to_cpu
	str	w0, [x22]
	b	LBB0_13
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	x3, x8, x25
	mov	x0, x23
	mov	w2, #0
	bl	_mlx4_comm_cmd
	cbz	w0, LBB0_10
; %bb.9:
	mov	x25, x0
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	mov	x2, x21
	bl	_mlx4_err
	b	LBB0_14
LBB0_10:
	cbz	w24, LBB0_13
; %bb.11:
	cbnz	x22, LBB0_7
LBB0_12:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x21
	bl	_mlx4_err
Lloh13:
	adrp	x8, _CMD_STAT_BAD_PARAM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CMD_STAT_BAD_PARAM@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	str	x8, [x20, #8]
LBB0_13:
	ldr	x0, [x20, #8]
	bl	_mlx4_status_to_errno
	mov	x25, x0
LBB0_14:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x25
	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 AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_POLL_TOKEN,4,2             ; @CMD_POLL_TOKEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"response expected whileoutput mailbox is NULL for command 0x%x\n"

	.comm	_CMD_STAT_BAD_PARAM,8,3         ; @CMD_STAT_BAD_PARAM
	.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 commandopcode 0x%x\n"

	.no_dead_strip	_mlx4_slave_cmd
.subsections_via_symbols
