	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_cmd_cleanup               ## -- Begin function mlx4_cmd_cleanup
	.p2align	4, 0x90
_mlx4_cmd_cleanup:                      ## @mlx4_cmd_cleanup
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_mlx4_priv
	movq	%rax, %rbx
	movq	16(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	_MLX4_CMD_CLEANUP_POOL@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_3
## %bb.2:
	callq	_dma_pool_destroy
	movq	$0, 16(%rbx)
LBB0_3:
	movq	%r15, %rdi
	callq	_mlx4_is_slave
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.5:
	movq	_MLX4_CMD_CLEANUP_HCR@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_7
## %bb.6:
	callq	_iounmap
	movq	$0, 8(%rbx)
LBB0_7:
	movq	%r15, %rdi
	callq	_mlx4_is_mfunc
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	24(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.9:
	movq	_MLX4_CMD_CLEANUP_VHCR@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_11
## %bb.10:
	movq	(%r15), %rax
	movq	(%rax), %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	32(%rbx), %ecx
	callq	_dma_free_coherent
	movq	$0, 24(%rbx)
LBB0_11:
	cmpq	$0, (%rbx)
	je	LBB0_14
## %bb.12:
	movq	_MLX4_CMD_CLEANUP_STRUCT@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_14
## %bb.13:
	movq	$0, (%rbx)
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_CMD_CLEANUP_POOL,4,2      ## @MLX4_CMD_CLEANUP_POOL
	.comm	_MLX4_CMD_CLEANUP_HCR,4,2       ## @MLX4_CMD_CLEANUP_HCR
	.comm	_MLX4_CMD_CLEANUP_VHCR,4,2      ## @MLX4_CMD_CLEANUP_VHCR
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_MLX4_CMD_CLEANUP_STRUCT,4,2    ## @MLX4_CMD_CLEANUP_STRUCT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_cmd_cleanup               ; -- Begin function mlx4_cmd_cleanup
	.p2align	2
_mlx4_cmd_cleanup:                      ; @mlx4_cmd_cleanup
	.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, x1
	mov	x21, x0
	bl	_mlx4_priv
	mov	x20, x0
	ldr	x0, [x0, #16]
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _MLX4_CMD_CLEANUP_POOL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_CMD_CLEANUP_POOL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_3
; %bb.2:
	bl	_dma_pool_destroy
	str	xzr, [x20, #16]
LBB0_3:
	mov	x0, x21
	bl	_mlx4_is_slave
	cbnz	w0, LBB0_7
; %bb.4:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_7
; %bb.5:
Lloh3:
	adrp	x8, _MLX4_CMD_CLEANUP_HCR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX4_CMD_CLEANUP_HCR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_7
; %bb.6:
	bl	_iounmap
	str	xzr, [x20, #8]
LBB0_7:
	mov	x0, x21
	bl	_mlx4_is_mfunc
	cbz	x0, LBB0_11
; %bb.8:
	ldr	x2, [x20, #24]
	cbz	x2, LBB0_11
; %bb.9:
Lloh6:
	adrp	x8, _MLX4_CMD_CLEANUP_VHCR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLX4_CMD_CLEANUP_VHCR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_11
; %bb.10:
	ldr	x8, [x21]
	ldr	x0, [x8]
Lloh9:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w3, [x20, #32]
	bl	_dma_free_coherent
	str	xzr, [x20, #24]
LBB0_11:
	ldr	x8, [x20]
	cbz	x8, LBB0_14
; %bb.12:
Lloh12:
	adrp	x8, _MLX4_CMD_CLEANUP_STRUCT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MLX4_CMD_CLEANUP_STRUCT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_14
; %bb.13:
	str	xzr, [x20]
LBB0_14:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_CMD_CLEANUP_POOL,4,2      ; @MLX4_CMD_CLEANUP_POOL
	.comm	_MLX4_CMD_CLEANUP_HCR,4,2       ; @MLX4_CMD_CLEANUP_HCR
	.comm	_MLX4_CMD_CLEANUP_VHCR,4,2      ; @MLX4_CMD_CLEANUP_VHCR
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_MLX4_CMD_CLEANUP_STRUCT,4,2    ; @MLX4_CMD_CLEANUP_STRUCT
.subsections_via_symbols
