	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r13d
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_diag_basic@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	movq	%rax, %rbx
	movq	(%r14), %rax
	movq	_MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_diag_ext@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	addq	%rax, %rbx
LBB0_2:
	testl	%r13d, %r13d
	jne	LBB0_4
## %bb.3:
	movq	_diag_device_only@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ARRAY_SIZE
	addq	%rax, %rbx
LBB0_4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	movq	(%r12), %rdi
	callq	_kfree
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_diag_basic,4,2                 ## @diag_basic
	.comm	_MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT,4,2 ## @MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT
	.comm	_diag_ext,4,2                   ## @diag_ext
	.comm	_diag_device_only,4,2           ## @diag_device_only
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x23, x4
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _diag_basic@GOTPAGE
Lloh1:
	ldr	x8, [x8, _diag_basic@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ARRAY_SIZE
	mov	x22, x0
	ldr	x8, [x24]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _diag_ext@GOTPAGE
Lloh7:
	ldr	x8, [x8, _diag_ext@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_ARRAY_SIZE
	add	x22, x0, x22
LBB0_2:
	cbnz	w23, LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _diag_device_only@GOTPAGE
Lloh10:
	ldr	x8, [x8, _diag_device_only@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_ARRAY_SIZE
	add	x22, x0, x22
LBB0_4:
Lloh12:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh13:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x22
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x20]
	cbz	x0, LBB0_8
; %bb.5:
	ldr	w2, [x23]
	mov	x0, x22
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x21]
	cbz	x0, LBB0_7
; %bb.6:
	mov	w0, #0
	str	x22, [x19]
	b	LBB0_9
LBB0_7:
	ldr	x0, [x20]
	bl	_kfree
LBB0_8:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_diag_basic,4,2                 ; @diag_basic
	.comm	_MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT,4,2 ; @MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT
	.comm	_diag_ext,4,2                   ; @diag_ext
	.comm	_diag_device_only,4,2           ; @diag_device_only
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	___mlx4_ib_alloc_diag_counters
.subsections_via_symbols
