	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_comm_cmd_poll
_mlx4_comm_cmd_poll:                    ## @mlx4_comm_cmd_poll
	.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
	movq	%rcx, %r13
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r12
	callq	_mlx4_priv
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_comm_pending
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_mlx4_warn
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_2:
	movq	%r14, %rdi
	callq	_down
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_mlx4_comm_cmd_post
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_CMD_STAT_INTERNAL_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mlx4_status_to_errno
	movl	%eax, %ebx
LBB0_14:
	movq	%r14, %rdi
	callq	_up
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r13, %rdi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	movq	_jiffies@GOTPCREL(%rip), %r13
	addq	(%r13), %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_comm_pending
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r13), %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_cond_resched
	jmp	LBB0_5
LBB0_8:
	movq	%r12, %rdi
	callq	_comm_pending
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	_MLX4_COMM_CMD_RESET@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_12
## %bb.11:
	movq	_MLX4_DELAY_RESET_SLAVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_14
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_12:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_mlx4_warn
	movq	_CMD_STAT_INTERNAL_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mlx4_status_to_errno
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	%eax, %r15d
	movl	(%r12), %edi
	callq	_mlx4_enter_error_state
	movl	%r15d, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Communication channel is not idle - my toggle is %d (cmd:0x%x)\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_CMD_STAT_INTERNAL_ERR,4,2      ## @CMD_STAT_INTERNAL_ERR
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_MLX4_COMM_CMD_RESET,4,2        ## @MLX4_COMM_CMD_RESET
	.comm	_MLX4_DELAY_RESET_SLAVE,4,2     ## @MLX4_DELAY_RESET_SLAVE
L_.str.1:                               ## @.str.1
	.asciz	"Communication channel command 0x%x timed out\n"

	.no_dead_strip	_mlx4_comm_cmd_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_comm_cmd_poll
_mlx4_comm_cmd_poll:                    ; @mlx4_comm_cmd_poll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x3
	mov	x23, x2
	mov	x21, x1
	mov	x20, x0
	bl	_mlx4_priv
	mov	x19, x0
	mov	x0, x20
	bl	_comm_pending
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w2, [x19, #4]
	str	x21, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mlx4_warn
Lloh2:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_down
	mov	x0, x20
	mov	x1, x21
	mov	x2, x23
	bl	_mlx4_comm_cmd_post
	cbz	x0, LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _CMD_STAT_INTERNAL_ERR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CMD_STAT_INTERNAL_ERR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_mlx4_status_to_errno
	mov	x21, x0
LBB0_4:
	mov	x0, x19
	bl	_up
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	mov	x0, x22
	bl	_msecs_to_jiffies
	mov	x22, x0
Lloh8:
	adrp	x23, _jiffies@GOTPAGE
Lloh9:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x24, [x23]
	mov	x0, x20
	bl	_comm_pending
	cbz	w0, LBB0_10
; %bb.7:
	add	x22, x24, x22
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23]
	mov	x1, x22
	bl	_time_before
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	bl	_cond_resched
	mov	x0, x20
	bl	_comm_pending
	cbnz	w0, LBB0_8
LBB0_10:
	mov	x0, x20
	bl	_comm_pending
	cbz	w0, LBB0_13
; %bb.11:
Lloh10:
	adrp	x8, _MLX4_COMM_CMD_RESET@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MLX4_COMM_CMD_RESET@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_14
; %bb.12:
Lloh13:
	adrp	x8, _MLX4_DELAY_RESET_SLAVE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MLX4_DELAY_RESET_SLAVE@GOTPAGEOFF]
Lloh15:
	ldr	w21, [x8]
	b	LBB0_4
LBB0_13:
	mov	w21, #0
	b	LBB0_4
LBB0_14:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_mlx4_warn
Lloh18:
	adrp	x8, _CMD_STAT_INTERNAL_ERR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CMD_STAT_INTERNAL_ERR@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_mlx4_status_to_errno
	mov	x21, x0
	cbz	w0, LBB0_4
; %bb.15:
	ldr	w0, [x20]
	bl	_mlx4_enter_error_state
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Communication channel is not idle - my toggle is %d (cmd:0x%x)\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_CMD_STAT_INTERNAL_ERR,4,2      ; @CMD_STAT_INTERNAL_ERR
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_MLX4_COMM_CMD_RESET,4,2        ; @MLX4_COMM_CMD_RESET
	.comm	_MLX4_DELAY_RESET_SLAVE,4,2     ; @MLX4_DELAY_RESET_SLAVE
l_.str.1:                               ; @.str.1
	.asciz	"Communication channel command 0x%x timed out\n"

	.no_dead_strip	_mlx4_comm_cmd_poll
.subsections_via_symbols
