	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_ib_close_sriov            ## -- Begin function mlx4_ib_close_sriov
	.p2align	4, 0x90
_mlx4_ib_close_sriov:                   ## @mlx4_ib_close_sriov
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	40(%rdi), %edi
	callq	_mlx4_is_mfunc
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	leaq	32(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	$1, 8(%r15)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	40(%r15), %edi
	callq	_mlx4_is_master
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	cmpl	$0, (%r15)
	jle	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movl	(%rax,%rbx), %edi
	callq	_flush_workqueue
	movq	24(%r15), %rax
	movq	(%rax,%rbx,2), %rdi
	callq	_mlx4_ib_free_sqp_ctx
	movq	24(%r15), %rax
	movq	(%rax,%rbx,2), %rdi
	callq	_kfree
	movq	24(%r15), %rax
	movq	$0, (%rax,%rbx,2)
	movq	16(%r15), %rdi
	addq	%rbx, %rdi
	callq	_mlx4_ib_free_demux_ctx
	incq	%r14
	movslq	(%r15), %rax
	addq	$4, %rbx
	cmpq	%rax, %r14
	jl	LBB0_4
LBB0_5:
	movq	%r15, %rdi
	movl	$-1, %esi
	callq	_mlx4_ib_cm_paravirt_clean
	movq	%r15, %rdi
	callq	_mlx4_ib_destroy_alias_guid_service
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx4_ib_device_unregister_sysfs ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_ib_close_sriov            ; -- Begin function mlx4_ib_close_sriov
	.p2align	2
_mlx4_ib_close_sriov:                   ; @mlx4_ib_close_sriov
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w0, [x0, #40]
	bl	_mlx4_is_mfunc
	cbz	w0, LBB0_6
; %bb.1:
	add	x20, x19, #32
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	w8, #1
	str	w8, [x19, #8]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #40]
	bl	_mlx4_is_master
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x20, #0
	mov	x21, #0
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x8, x21]
	bl	_flush_workqueue
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x20]
	bl	_mlx4_ib_free_sqp_ctx
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x20]
	bl	_kfree
	ldr	x8, [x19, #24]
	str	xzr, [x8, x20]
	ldr	x8, [x19, #16]
	add	x0, x8, x21
	bl	_mlx4_ib_free_demux_ctx
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x21, x21, #4
	add	x20, x20, #8
	cmp	x22, x8
	b.lt	LBB0_4
LBB0_5:
	mov	x0, x19
	mov	w1, #-1
	bl	_mlx4_ib_cm_paravirt_clean
	mov	x0, x19
	bl	_mlx4_ib_destroy_alias_guid_service
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mlx4_ib_device_unregister_sysfs
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
