	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_alloc                    ## -- Begin function mthca_alloc
	.p2align	4, 0x90
_mthca_alloc:                           ## @mthca_alloc
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	12(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %esi
	movl	16(%rbx), %edi
	movl	20(%rbx), %edx
	callq	_find_next_zero_bit
	movl	(%rbx), %esi
	cmpl	%esi, %eax
	jge	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	jmp	LBB0_3
LBB0_2:
	movl	4(%rbx), %eax
	addl	%esi, %eax
	andl	8(%rbx), %eax
	movl	%eax, 4(%rbx)
	movl	16(%rbx), %edi
	callq	_find_first_zero_bit
	movl	%eax, %r15d
	movl	(%rbx), %esi
LBB0_3:
	movl	$-1, %r12d
	cmpl	%esi, %r15d
	jge	LBB0_5
## %bb.4:
	movl	16(%rbx), %esi
	movl	%r15d, %edi
	callq	_set_bit
	orl	4(%rbx), %r15d
	movl	%r15d, %r12d
LBB0_5:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	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	_mthca_alloc                    ; -- Begin function mthca_alloc
	.p2align	2
_mthca_alloc:                           ; @mthca_alloc
	.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	x20, x0
	add	x19, x0, #12
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w1, [x20]
	ldp	w0, w2, [x20, #16]
	bl	_find_next_zero_bit
	ldr	w1, [x20]
	cmp	w0, w1
	b.ge	LBB0_3
; %bb.1:
	mov	x21, x0
	cmp	w21, w1
	b.lt	LBB0_4
LBB0_2:
	mov	w20, #-1
	b	LBB0_5
LBB0_3:
	ldp	w8, w9, [x20, #4]
	add	w8, w8, w1
	and	w8, w8, w9
	str	w8, [x20, #4]
	ldr	w0, [x20, #16]
	bl	_find_first_zero_bit
	mov	x21, x0
	ldr	w1, [x20]
	cmp	w21, w1
	b.ge	LBB0_2
LBB0_4:
	ldr	w1, [x20, #16]
	mov	x0, x21
	bl	_set_bit
	ldr	w8, [x20, #4]
	orr	w20, w8, w21
LBB0_5:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	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
