	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_assign_eq                 ## -- Begin function mlx4_assign_eq
	.p2align	4, 0x90
_mlx4_assign_eq:                        ## @mlx4_assign_eq
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_mlx4_priv
	movq	%rax, %rbx
	movl	(%r15), %edi
	callq	_MLX4_CQ_TO_EQ_VECTOR
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	leal	-1(%r14), %edx
	testl	%r13d, %r13d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	js	LBB0_10
## %bb.1:
	movl	%r13d, %ebx
	cmpl	16(%r12), %r13d
	jg	LBB0_10
## %bb.2:
	movq	_MLX4_EQ_ASYNC@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_10
## %bb.3:
	movq	8(%rdi), %rax
	movl	%ebx, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	movl	16(%rax,%rcx,8), %esi
	movl	%edx, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_5:
	cmpl	$2, %r14d
	jl	LBB0_8
## %bb.6:
	movl	$1, %esi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leal	1(%rsi), %r13d
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_mlx4_get_eqs_per_port
	addl	%eax, %ebx
	movl	%r13d, %esi
	cmpl	%r13d, %r14d
	jne	LBB0_7
LBB0_8:
	cmpl	16(%r12), %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	jg	LBB0_10
## %bb.9:
	movq	8(%rdi), %rax
	movslq	%ebx, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movl	16(%rax,%rcx,8), %esi
	movl	%edx, %edi
	callq	_test_bit
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rax, %rax
	jne	LBB0_17
LBB0_10:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	movq	$-1, %r14
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%r15
	addq	$24, %rbx
	testq	%r14, %r14
	movq	%r13, %r12
	je	LBB0_16
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movslq	16(%r12), %rax
	cmpq	%rax, %r15
	jg	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r12, %r13
	movq	8(%rdi), %r12
	cmpq	(%r12,%rbx), %r14
	jle	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	16(%r12,%rbx), %esi
	movl	%edx, %edi
	callq	_test_bit
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_11
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r12,%rbx), %r14
	movl	%r15d, %eax
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_11
LBB0_16:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	js	LBB0_24
LBB0_17:
	movl	4(%rdi), %esi
	movl	%ebx, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_20
LBB0_18:
	testl	%ebx, %ebx
	js	LBB0_23
## %bb.19:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	8(%rdi), %rax
	movl	%ebx, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	incq	(%rax,%rcx,8)
	callq	_mutex_unlock
	movl	%ebx, %edi
	callq	_MLX4_EQ_TO_CQ_VECTOR
	movl	%eax, %r14d
	xorl	%r12d, %r12d
	jmp	LBB0_26
LBB0_20:
	movq	_MLX4_FLAG_MSI_X@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_18
## %bb.21:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	4(%r13), %esi
	movl	%ebx, %edi
	callq	_set_bit
	movq	_MLX4_IRQNAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	imull	%ebx, %eax
	movl	%ebx, %r14d
	movslq	%eax, %rbx
	shlq	$2, %rbx
	addq	16(%r13), %rbx
	movq	8(%r12), %rax
	movq	(%rax), %rdi
	callq	_dev_name
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %ecx
	movq	%rax, %r8
	callq	_snprintf
	movq	8(%r13), %rax
	movslq	%r14d, %rbx
	leaq	(%rbx,%rbx,2), %rcx
	leaq	(%rax,%rcx,8), %r8
	movl	12(%rax,%rcx,8), %edi
	movq	_mlx4_msi_x_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	shll	$5, %r14d
	movslq	%r14d, %rcx
	shlq	$2, %rcx
	addq	16(%r13), %rcx
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_27
## %bb.22:
	movl	%eax, %r12d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	4(%rbx), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_clear_bit
	movq	%rbx, %rdi
	jmp	LBB0_25
LBB0_23:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	jmp	LBB0_26
LBB0_24:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_25:
	callq	_mutex_unlock
LBB0_26:
	movl	%r14d, (%r15)
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	shlq	$3, %rbx
	leaq	(%rbx,%rbx,2), %r14
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	8(%rbx), %rdi
	addq	%r14, %rdi
	movl	$1, %esi
	callq	_eq_set_ci
	movq	8(%rbx), %rax
	movl	$1, 8(%rax,%r14)
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_EQ_ASYNC,4,2              ## @MLX4_EQ_ASYNC
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_MLX4_FLAG_MSI_X,4,2            ## @MLX4_FLAG_MSI_X
	.comm	_MLX4_IRQNAME_SIZE,4,2          ## @MLX4_IRQNAME_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mlx4-%d@%s"

	.comm	_mlx4_msi_x_interrupt,4,2       ## @mlx4_msi_x_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_assign_eq                 ; -- Begin function mlx4_assign_eq
	.p2align	2
_mlx4_assign_eq:                        ; @mlx4_assign_eq
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x24, x1
	mov	x22, x0
	bl	_mlx4_priv
	mov	x20, x0
	ldr	w0, [x19]
	bl	_MLX4_CQ_TO_EQ_VECTOR
	mov	x21, x0
	mov	x0, x20
	bl	_mutex_lock
	sub	w23, w24, #1
	tbnz	w21, #31, LBB0_8
; %bb.1:
	ldr	w8, [x22, #16]
Lloh0:
	adrp	x9, _MLX4_EQ_ASYNC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_EQ_ASYNC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w21, w8
	ccmp	w21, w9, #4, le
	b.eq	LBB0_8
; %bb.2:
	ldr	x8, [x20, #8]
	mov	w9, #24
	umaddl	x8, w21, w9, x8
	ldr	w1, [x8, #16]
	mov	x0, x23
	bl	_test_bit
	cbnz	x0, LBB0_15
; %bb.3:
	cmp	w24, #2
	b.lt	LBB0_6
; %bb.4:
	mov	w1, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	w25, w1, #1
	mov	x0, x22
	bl	_mlx4_get_eqs_per_port
	add	w21, w21, w0
	mov	x1, x25
	cmp	w24, w25
	b.ne	LBB0_5
LBB0_6:
	ldr	w8, [x22, #16]
	cmp	w21, w8
	b.gt	LBB0_8
; %bb.7:
	ldr	x8, [x20, #8]
	mov	w9, #24
	smaddl	x8, w21, w9, x8
	ldr	w1, [x8, #16]
	mov	x0, x23
	bl	_test_bit
	cbnz	x0, LBB0_15
LBB0_8:
	mov	x24, #0
	mov	x25, #0
	mov	w21, #-1
	mov	x26, #-1
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x25, x25, #1
	add	x24, x24, #24
	cbz	x26, LBB0_14
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x22, #16]
	cmp	x25, x8
	b.gt	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x27, [x20, #8]
	ldr	x8, [x27, x24]
	cmp	x26, x8
	b.le	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x8, x27, x24
	ldr	w1, [x8, #16]
	mov	x0, x23
	bl	_test_bit
	cbz	x0, LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x26, [x27, x24]
	mov	x21, x25
	b	LBB0_9
LBB0_14:
	tbnz	w21, #31, LBB0_22
LBB0_15:
	ldr	w1, [x20, #4]
	mov	x0, x21
	bl	_test_bit
	cbz	x0, LBB0_18
LBB0_16:
	tbnz	w21, #31, LBB0_21
; %bb.17:
	ldr	x8, [x20, #8]
	mov	w9, #24
	umull	x9, w21, w9
	ldr	x10, [x8, x9]
	add	x10, x10, #1
	str	x10, [x8, x9]
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x21
	bl	_MLX4_EQ_TO_CQ_VECTOR
	mov	w22, #0
	b	LBB0_25
LBB0_18:
	ldr	w8, [x22]
Lloh3:
	adrp	x9, _MLX4_FLAG_MSI_X@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLX4_FLAG_MSI_X@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_16
; %bb.19:
	ldr	w1, [x20, #4]
	mov	x0, x21
	bl	_set_bit
Lloh6:
	adrp	x8, _MLX4_IRQNAME_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLX4_IRQNAME_SIZE@GOTPAGEOFF]
	ldr	x9, [x20, #16]
Lloh8:
	ldr	w23, [x8]
	mul	w8, w23, w21
	add	x24, x9, w8, sxtw #2
	ldr	x8, [x22, #8]
	ldr	x0, [x8]
	bl	_dev_name
	mov	x4, x0
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x24
	mov	x1, x23
	mov	x3, x21
	bl	_snprintf
	mov	w8, #24
	ldp	x9, x10, [x20, #8]
	smaddl	x4, w21, w8, x9
	ldr	w0, [x4, #12]
Lloh11:
	adrp	x8, _mlx4_msi_x_interrupt@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mlx4_msi_x_interrupt@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	lsl	w8, w21, #5
	add	x3, x10, w8, sxtw #2
	mov	w2, #0
	bl	_request_irq
	cbz	w0, LBB0_26
; %bb.20:
	mov	x22, x0
	ldr	w1, [x20, #4]
	mov	x0, x21
	bl	_clear_bit
	b	LBB0_23
LBB0_21:
	mov	x0, x20
	bl	_mutex_unlock
	mov	w22, #0
	b	LBB0_24
LBB0_22:
Lloh14:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_23:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_24:
	mov	w0, #0
LBB0_25:
	str	w0, [x19]
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_26:
	sxtw	x8, w21
	ldr	x9, [x20, #8]
	add	x8, x8, x8, lsl #1
	lsl	x22, x8, #3
	add	x0, x9, x22
	mov	w23, #1
	mov	w1, #1
	bl	_eq_set_ci
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	str	w23, [x8, #8]
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_EQ_ASYNC,4,2              ; @MLX4_EQ_ASYNC
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_MLX4_FLAG_MSI_X,4,2            ; @MLX4_FLAG_MSI_X
	.comm	_MLX4_IRQNAME_SIZE,4,2          ; @MLX4_IRQNAME_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mlx4-%d@%s"

	.comm	_mlx4_msi_x_interrupt,4,2       ; @mlx4_msi_x_interrupt
.subsections_via_symbols
