	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_query_diag_counters       ## -- Begin function mlx4_query_diag_counters
	.p2align	4, 0x90
_mlx4_query_diag_counters:              ## @mlx4_query_diag_counters
	.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
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movq	%r8, %r15
	movq	%rcx, %rbx
	movq	%rdx, %r12
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r14
	callq	_mlx4_alloc_cmd_mailbox
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	movq	%r13, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edx
	movq	_MLX4_CMD_DIAG_RPRT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_CMD_TIME_CLASS_A@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MLX4_CMD_NATIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	pushq	%rbx
	pushq	%rax
	callq	_mlx4_cmd_box
	addq	$16, %rsp
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_2
LBB0_8:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_mlx4_free_cmd_mailbox
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	$0, %r12d
	testq	%r15, %r15
	je	LBB0_8
## %bb.3:
	xorl	%ebx, %ebx
	movq	_MLX4_MAILBOX_SIZE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rbx,8), %rdx
	cmpq	(%r12), %rdx
	jg	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rbx,8), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_MLX4_GET
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_4
## %bb.7:
	xorl	%r12d, %r12d
	jmp	LBB0_8
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_CMD_DIAG_RPRT,4,2         ## @MLX4_CMD_DIAG_RPRT
	.comm	_MLX4_CMD_TIME_CLASS_A,4,2      ## @MLX4_CMD_TIME_CLASS_A
	.comm	_MLX4_CMD_NATIVE,4,2            ## @MLX4_CMD_NATIVE
	.comm	_MLX4_MAILBOX_SIZE,8,3          ## @MLX4_MAILBOX_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_query_diag_counters       ; -- Begin function mlx4_query_diag_counters
	.p2align	2
_mlx4_query_diag_counters:              ; @mlx4_query_diag_counters
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x25, x5
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x26, x1
	mov	x19, x0
	bl	_mlx4_alloc_cmd_mailbox
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_2:
	ldr	x24, [x20, #8]
	ldr	w2, [x20]
Lloh0:
	adrp	x8, _MLX4_CMD_DIAG_RPRT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_CMD_DIAG_RPRT@GOTPAGEOFF]
Lloh2:
	ldr	w5, [x8]
Lloh3:
	adrp	x8, _MLX4_CMD_TIME_CLASS_A@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX4_CMD_TIME_CLASS_A@GOTPAGEOFF]
Lloh5:
	ldr	w6, [x8]
Lloh6:
	adrp	x8, _MLX4_CMD_NATIVE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLX4_CMD_NATIVE@GOTPAGEOFF]
Lloh8:
	ldr	w7, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	x3, x25
	mov	x4, x26
	bl	_mlx4_cmd_box
	mov	x25, x0
	cbnz	w0, LBB0_9
; %bb.3:
	cbz	x21, LBB0_7
; %bb.4:
Lloh9:
	adrp	x25, _MLX4_MAILBOX_SIZE@GOTPAGE
Lloh10:
	ldr	x25, [x25, _MLX4_MAILBOX_SIZE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x2, [x23]
	ldr	x8, [x25]
	cmp	x2, x8
	b.gt	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x22], #8
	mov	x1, x24
	bl	_MLX4_GET
	add	x23, x23, #8
	subs	x21, x21, #1
	b.ne	LBB0_5
LBB0_7:
	mov	w25, #0
	b	LBB0_9
LBB0_8:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_mlx4_free_cmd_mailbox
	mov	x0, x25
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_CMD_DIAG_RPRT,4,2         ; @MLX4_CMD_DIAG_RPRT
	.comm	_MLX4_CMD_TIME_CLASS_A,4,2      ; @MLX4_CMD_TIME_CLASS_A
	.comm	_MLX4_CMD_NATIVE,4,2            ; @MLX4_CMD_NATIVE
	.comm	_MLX4_MAILBOX_SIZE,8,3          ; @MLX4_MAILBOX_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
