	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_ib_alloc_diag_counters
_mlx4_ib_alloc_diag_counters:           ## @mlx4_ib_alloc_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	$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
	movq	8(%rdi), %rdi
	movq	16(%r15), %r14
	movq	_MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	(%rdi), %ebx
	callq	_mlx4_is_slave
	xorl	%r13d, %r13d
	testq	%rax, %rax
	jne	LBB0_12
## %bb.1:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_MLX4_DIAG_COUNTERS_TYPES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	movq	%r15, %r13
	jle	LBB0_8
## %bb.2:
	movl	%ebx, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	4(%rcx), %r12
	movabsq	$-4294967296, %r14              ## imm = 0xFFFFFFFF00000000
	xorl	%ebx, %ebx
	movabsq	$4294967296, %rsi               ## imm = 0x100000000
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	addq	%rsi, %r14
	addq	$12, %r12
	cmpq	%rcx, %rbx
	jge	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%edx, %edx
	je	LBB0_7
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	-4(%r12), %rdx
	leaq	4(%r12), %rcx
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%ebx, %r8d
	callq	___mlx4_ib_alloc_diag_counters
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-4(%r12), %edx
	movl	(%r12), %esi
	movq	%r13, %rdi
	movl	%ebx, %ecx
	callq	_mlx4_ib_fill_diag_counters
	movq	_MLX4_DIAG_COUNTERS_TYPES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movabsq	$4294967296, %rsi               ## imm = 0x100000000
	jmp	LBB0_7
LBB0_8:
	movq	_mlx4_ib_hw_stats_ops@GOTPCREL(%rip), %rsi
	movq	%r13, %rdi
	callq	_ib_set_device_ops
	xorl	%r13d, %r13d
	jmp	LBB0_12
LBB0_9:
	movl	%eax, %r15d
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.10:
	sarq	$32, %r14
	leaq	(%r14,%r14,2), %r14
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	4(%rbx,%r14,4), %edi
	callq	_kfree
	movl	(%rbx,%r14,4), %edi
	callq	_kfree
LBB0_11:
	movl	%r15d, %r13d
LBB0_12:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT,4,2 ## @MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT
	.comm	_MLX4_DIAG_COUNTERS_TYPES,4,2   ## @MLX4_DIAG_COUNTERS_TYPES
	.comm	_mlx4_ib_hw_stats_ops,4,2       ## @mlx4_ib_hw_stats_ops
	.no_dead_strip	_mlx4_ib_alloc_diag_counters
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_ib_alloc_diag_counters
_mlx4_ib_alloc_diag_counters:           ; @mlx4_ib_alloc_diag_counters
	.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	x19, x0
	ldp	x0, x23, [x0, #8]
	ldr	w21, [x0]
Lloh0:
	adrp	x8, _MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	bl	_mlx4_is_slave
	cbnz	x0, LBB0_9
; %bb.1:
Lloh3:
	adrp	x24, _MLX4_DIAG_COUNTERS_TYPES@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MLX4_DIAG_COUNTERS_TYPES@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.2:
	mov	x20, #0
	and	w25, w22, w21
	add	x21, x23, #4
	mov	x26, #-4294967296
	mov	x27, #4294967296
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	add	x26, x26, x27
	add	x21, x21, #12
	cmp	x20, w8, sxtw
	b.ge	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x20, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w25, LBB0_3
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	x2, x21, #4
	add	x3, x21, #4
	mov	x0, x19
	mov	x1, x21
	mov	x4, x20
	bl	___mlx4_ib_alloc_diag_counters
	cbnz	w0, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	w2, w1, [x21, #-4]
	mov	x0, x19
	mov	x3, x20
	bl	_mlx4_ib_fill_diag_counters
	ldr	w8, [x24]
	b	LBB0_3
LBB0_8:
Lloh5:
	adrp	x1, _mlx4_ib_hw_stats_ops@GOTPAGE
Lloh6:
	ldr	x1, [x1, _mlx4_ib_hw_stats_ops@GOTPAGEOFF]
	mov	x0, x19
	bl	_ib_set_device_ops
LBB0_9:
	mov	w22, #0
LBB0_10:
	mov	x0, x22
	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
LBB0_11:
	mov	x22, x0
	cbz	x20, LBB0_10
; %bb.12:
	asr	x8, x26, #32
	mov	w9, #12
	madd	x19, x8, x9, x23
	ldr	w0, [x19, #4]
	bl	_kfree
	ldr	w0, [x19]
	bl	_kfree
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT,4,2 ; @MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT
	.comm	_MLX4_DIAG_COUNTERS_TYPES,4,2   ; @MLX4_DIAG_COUNTERS_TYPES
	.comm	_mlx4_ib_hw_stats_ops,4,2       ; @mlx4_ib_hw_stats_ops
	.no_dead_strip	_mlx4_ib_alloc_diag_counters
.subsections_via_symbols
