	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_db_free                   ## -- Begin function mlx4_db_free
	.p2align	4, 0x90
_mlx4_db_free:                          ## @mlx4_db_free
	.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
	movq	%rsi, %r12
	movq	%rdi, %r15
	callq	_mlx4_priv
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mutex_lock
	movl	(%r12), %ecx
	movl	4(%r12), %ebx
	testl	%ecx, %ecx
	jne	LBB0_4
## %bb.1:
	movl	%ebx, %r13d
	xorl	$1, %r13d
	movq	8(%r12), %rax
	movl	24(%rax), %esi
	movl	%r13d, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	8(%r12), %rax
	movl	24(%rax), %esi
	movl	%r13d, %edi
	callq	_clear_bit
	movl	$1, %ecx
	jmp	LBB0_4
LBB0_2:
	xorl	%ecx, %ecx
LBB0_4:
	sarl	%cl, %ebx
	movq	8(%r12), %rax
	movq	16(%rax), %rax
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %esi
	movl	%ebx, %edi
	callq	_set_bit
	movq	8(%r12), %rax
	movl	12(%rax), %edi
	movq	_MLX4_DB_PER_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	callq	_bitmap_full
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	(%r15), %rax
	movq	(%rax), %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r12), %rax
	movl	4(%rax), %ecx
	movl	8(%rax), %edx
	callq	_dma_free_coherent
	movq	8(%r12), %rdi
	callq	_list_del
	movq	8(%r12), %rdi
	callq	_kfree
LBB0_6:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_DB_PER_PAGE,4,2           ## @MLX4_DB_PER_PAGE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_db_free                   ; -- Begin function mlx4_db_free
	.p2align	2
_mlx4_db_free:                          ; @mlx4_db_free
	.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
	mov	x19, x0
	bl	_mutex_lock
	ldp	w8, w23, [x20]
	cbnz	w8, LBB0_4
; %bb.1:
	eor	w22, w23, #0x1
	ldr	x8, [x20, #8]
	ldr	w1, [x8, #24]
	mov	x0, x22
	bl	_test_bit
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	w1, [x8, #24]
	mov	x0, x22
	bl	_clear_bit
	mov	w8, #1
	b	LBB0_4
LBB0_3:
	mov	w8, #0
LBB0_4:
	asr	w0, w23, w8
	ldr	x9, [x20, #8]
	ldr	x9, [x9, #16]
	ldr	w1, [x9, w8, sxtw #2]
	bl	_set_bit
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #12]
Lloh0:
	adrp	x8, _MLX4_DB_PER_PAGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_DB_PER_PAGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	bl	_bitmap_full
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x8, [x21]
	ldr	x0, [x8]
Lloh3:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x8, [x20, #8]
	ldp	w3, w2, [x8, #4]
	bl	_dma_free_coherent
	ldr	x0, [x20, #8]
	bl	_list_del
	ldr	x0, [x20, #8]
	bl	_kfree
LBB0_6:
	mov	x0, x19
	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
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_DB_PER_PAGE,4,2           ; @MLX4_DB_PER_PAGE
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
.subsections_via_symbols
