	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_free_resource_tracker     ## -- Begin function mlx4_free_resource_tracker
	.p2align	4, 0x90
_mlx4_free_resource_tracker:            ## @mlx4_free_resource_tracker
	.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	%esi, %r14d
	movq	%rdi, %r12
	callq	_mlx4_priv
	cmpq	$0, (%rax)
	je	LBB0_14
## %bb.1:
	movq	%rax, %r15
	movq	_RES_TR_FREE_STRUCTS_ONLY@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_9
## %bb.2:
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.3:
	xorl	%ebx, %ebx
	movq	_RES_TR_FREE_ALL@GOTPCREL(%rip), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_mlx4_delete_all_resources_for_slave
	movl	(%r12), %eax
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	incl	%ebx
	cmpl	%eax, %ebx
	jge	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r14d, (%r13)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	4(%r12), %ebx
	jne	LBB0_6
	jmp	LBB0_7
LBB0_8:
	movslq	4(%r12), %r13
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_mlx4_reset_roce_gids
	movq	%r13, %rbx
	shlq	$2, %rbx
	movq	(%r15), %rdi
	addq	%rbx, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_rem_slave_vlans
	addq	(%r15), %rbx
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_9:
	movq	_RES_TR_FREE_SLAVES_ONLY@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_14
## %bb.10:
	movq	_MLX4_NUM_OF_RESOURCE_TYPE@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_13
## %bb.11:
	movq	8(%r15), %rax
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%rax,%rbx), %rdi
	callq	_kfree
	movq	8(%r15), %rax
	movq	$0, 16(%rax,%rbx)
	movq	8(%rax,%rbx), %rdi
	callq	_kfree
	movq	8(%r15), %rax
	movq	$0, 8(%rax,%rbx)
	movq	(%rax,%rbx), %rdi
	callq	_kfree
	movq	8(%r15), %rax
	movq	$0, (%rax,%rbx)
	incq	%r12
	movslq	(%r14), %rcx
	addq	$24, %rbx
	cmpq	%rcx, %r12
	jl	LBB0_12
LBB0_13:
	movq	(%r15), %rdi
	callq	_kfree
	movq	$0, (%r15)
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RES_TR_FREE_STRUCTS_ONLY,4,2   ## @RES_TR_FREE_STRUCTS_ONLY
	.comm	_RES_TR_FREE_ALL,4,2            ## @RES_TR_FREE_ALL
	.comm	_RES_TR_FREE_SLAVES_ONLY,4,2    ## @RES_TR_FREE_SLAVES_ONLY
	.comm	_MLX4_NUM_OF_RESOURCE_TYPE,4,2  ## @MLX4_NUM_OF_RESOURCE_TYPE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_free_resource_tracker     ; -- Begin function mlx4_free_resource_tracker
	.p2align	2
_mlx4_free_resource_tracker:            ; @mlx4_free_resource_tracker
	.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	x20, x1
	mov	x21, x0
	bl	_mlx4_priv
	ldr	x8, [x0]
	cbz	x8, LBB0_14
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _RES_TR_FREE_STRUCTS_ONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RES_TR_FREE_STRUCTS_ONLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.eq	LBB0_9
; %bb.2:
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	w22, #0
Lloh3:
	adrp	x23, _RES_TR_FREE_ALL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _RES_TR_FREE_ALL@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_mlx4_delete_all_resources_for_slave
	ldr	w8, [x21]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w22, w22, #1
	cmp	w22, w8
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x23]
	cmp	w9, w20
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x21, #4]
	cmp	w22, w9
	b.ne	LBB0_4
	b	LBB0_5
LBB0_8:
	ldrsw	x22, [x21, #4]
	mov	x0, x21
	mov	x1, x22
	bl	_mlx4_reset_roce_gids
	ldr	x8, [x19]
	lsl	x23, x22, #2
	add	x0, x8, x23
	bl	_mutex_lock
	mov	x0, x21
	mov	x1, x22
	bl	_rem_slave_vlans
	ldr	x8, [x19]
	add	x0, x8, x23
	bl	_mutex_unlock
LBB0_9:
Lloh5:
	adrp	x8, _RES_TR_FREE_SLAVES_ONLY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RES_TR_FREE_SLAVES_ONLY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w20
	b.eq	LBB0_14
; %bb.10:
Lloh8:
	adrp	x20, _MLX4_NUM_OF_RESOURCE_TYPE@GOTPAGE
Lloh9:
	ldr	x20, [x20, _MLX4_NUM_OF_RESOURCE_TYPE@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x21, #0
	mov	x22, #0
	ldr	x8, [x19, #8]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x21
	ldr	x0, [x8, #16]
	bl	_kfree
	ldr	x8, [x19, #8]
	add	x8, x8, x21
	str	xzr, [x8, #16]
	ldr	x0, [x8, #8]
	bl	_kfree
	ldr	x8, [x19, #8]
	add	x8, x8, x21
	str	xzr, [x8, #8]
	ldr	x0, [x8]
	bl	_kfree
	ldr	x8, [x19, #8]
	str	xzr, [x8, x21]
	add	x22, x22, #1
	ldrsw	x9, [x20]
	add	x21, x21, #24
	cmp	x22, x9
	b.lt	LBB0_12
LBB0_13:
	ldr	x0, [x19]
	bl	_kfree
	str	xzr, [x19]
LBB0_14:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_RES_TR_FREE_STRUCTS_ONLY,4,2   ; @RES_TR_FREE_STRUCTS_ONLY
	.comm	_RES_TR_FREE_ALL,4,2            ; @RES_TR_FREE_ALL
	.comm	_RES_TR_FREE_SLAVES_ONLY,4,2    ; @RES_TR_FREE_SLAVES_ONLY
	.comm	_MLX4_NUM_OF_RESOURCE_TYPE,4,2  ; @MLX4_NUM_OF_RESOURCE_TYPE
.subsections_via_symbols
