	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_activate_cq            ## -- Begin function mlx4_en_activate_cq
	.p2align	4, 0x90
_mlx4_en_activate_cq:                   ## @mlx4_en_activate_cq
	.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
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	48(%rdi), %r14
	movq	16(%r14), %rcx
	movl	(%rcx,%rax,4), %eax
	movl	%eax, 28(%rsi)
	movq	80(%rsi), %rax
	movq	%rax, 56(%rsi)
	leaq	8(%rax), %rcx
	movq	%rcx, 48(%rsi)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movl	104(%rsi), %edx
	movl	108(%rsi), %edi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	_memset
	cmpl	$130, (%rbx)
	jne	LBB0_5
## %bb.1:
	movq	(%r14), %rdi
	movq	(%r12), %rsi
	movl	20(%rbx), %edx
	callq	_mlx4_is_eq_vector_valid
	xorl	%r13d, %r13d
	testl	%eax, %eax
	je	LBB0_16
LBB0_2:
	movq	(%r14), %rdi
	movl	20(%rbx), %esi
	callq	_mlx4_eq_get_irq
	movl	%eax, %edi
	callq	_irq_to_desc
	movl	%eax, 100(%rbx)
	cmpl	$130, (%rbx)
	jne	LBB0_6
## %bb.3:
	movq	32(%r12), %rax
	movq	8(%rbx), %rcx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %eax
	movl	%eax, 96(%rbx)
	cmpq	$0, 16(%r12)
	jne	LBB0_7
LBB0_8:
	xorl	%r10d, %r10d
	jmp	LBB0_9
LBB0_5:
	movl	%r15d, %eax
	cltd
	idivl	8(%r12)
	movq	40(%r12), %rax
	movslq	%edx, %rcx
	movq	(%rax,%rcx,8), %rax
	movl	20(%rax), %eax
	movl	%eax, 20(%rbx)
LBB0_6:
	cmpq	$0, 24(%r12)
	je	LBB0_8
LBB0_7:
	movl	$1, %r10d
LBB0_9:
	leaq	32(%rbx), %r9
	movq	_MLX4_RES_USAGE_DRIVER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 40(%rbx)
	movq	(%r14), %rdi
	movl	96(%rbx), %esi
	leaq	88(%rbx), %rdx
	leaq	64(%rbx), %rax
	leaq	8(%r14), %rcx
	movl	20(%rbx), %r11d
	movl	72(%rbx), %r8d
	subq	$8, %rsp
	pushq	$0
	pushq	%rax
	pushq	%r10
	pushq	$0
	pushq	%r11
	callq	_mlx4_cq_alloc
	addq	$48, %rsp
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movl	%eax, %r15d
	testl	%r13d, %r13d
	je	LBB0_18
## %bb.11:
	movq	(%r14), %rdi
	movl	20(%rbx), %esi
	callq	_mlx4_release_eq
	jmp	LBB0_18
LBB0_12:
	movq	_mlx4_en_cq_event@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movl	(%rbx), %eax
	xorl	%r15d, %r15d
	cmpl	$128, %eax
	je	LBB0_20
## %bb.13:
	cmpl	$130, %eax
	je	LBB0_21
## %bb.14:
	cmpl	$129, %eax
	jne	LBB0_19
## %bb.15:
	movq	_mlx4_en_tx_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movl	28(%rbx), %edi
	addq	$24, %rbx
	movq	_mlx4_en_poll_tx_cq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_NAPI_POLL_WEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rsi
	callq	_netif_tx_napi_add
	jmp	LBB0_22
LBB0_16:
	leaq	20(%rbx), %r13
	movq	32(%r12), %rax
	movq	8(%rbx), %rcx
	movq	(%rax,%rcx,8), %rax
	movl	4(%rax), %edi
	callq	_cpumask_first
	movl	%eax, 20(%rbx)
	movq	(%r14), %rdi
	movq	(%r12), %rsi
	movq	%r13, %rdx
	callq	_mlx4_assign_eq
	testl	%eax, %eax
	je	LBB0_23
## %bb.17:
	movl	%eax, %r15d
	movl	(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_mlx4_err
LBB0_18:
	movq	(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
LBB0_19:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	$0, 16(%rbx)
	jmp	LBB0_19
LBB0_21:
	movq	_mlx4_en_rx_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movl	28(%rbx), %edi
	addq	$24, %rbx
	movq	_mlx4_en_poll_rx_cq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	movl	$64, %ecx
	callq	_netif_napi_add
LBB0_22:
	movq	%rbx, %rdi
	callq	_napi_enable
	jmp	LBB0_19
LBB0_23:
	movl	$1, %r13d
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed assigning an EQ to CQ vector %d\n"

	.comm	_MLX4_RES_USAGE_DRIVER,4,2      ## @MLX4_RES_USAGE_DRIVER
	.comm	_mlx4_en_cq_event,4,2           ## @mlx4_en_cq_event
	.comm	_mlx4_en_tx_irq,4,2             ## @mlx4_en_tx_irq
	.comm	_mlx4_en_poll_tx_cq,4,2         ## @mlx4_en_poll_tx_cq
	.comm	_NAPI_POLL_WEIGHT,4,2           ## @NAPI_POLL_WEIGHT
	.comm	_mlx4_en_rx_irq,4,2             ## @mlx4_en_rx_irq
	.comm	_mlx4_en_poll_rx_cq,4,2         ## @mlx4_en_poll_rx_cq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_activate_cq            ; -- Begin function mlx4_en_activate_cq
	.p2align	2
_mlx4_en_activate_cq:                   ; @mlx4_en_activate_cq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x20, [x0, #48]
	ldr	x8, [x20, #16]
	ldr	x9, [x0]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x1, #28]
	ldr	x8, [x1, #80]
	add	x9, x8, #8
	stp	x9, x8, [x1, #48]
	stp	xzr, xzr, [x8]
	ldp	w2, w0, [x1, #104]
	mov	w1, #0
	bl	_memset
	ldr	w8, [x19]
	cmp	w8, #130
	b.ne	LBB0_5
; %bb.1:
	ldr	x0, [x20]
	ldr	x1, [x21]
	mov	x23, x19
	ldr	w2, [x23, #20]!
	bl	_mlx4_is_eq_vector_valid
	cbz	w0, LBB0_15
; %bb.2:
	mov	w23, #0
LBB0_3:
	ldr	x0, [x20]
	ldr	w1, [x19, #20]
	bl	_mlx4_eq_get_irq
	bl	_irq_to_desc
	str	w0, [x19, #100]
	ldr	w8, [x19]
	cmp	w8, #130
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [x21, #32]
	ldr	x9, [x19, #8]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w8, [x8]
	str	w8, [x19, #96]
	ldr	x8, [x21, #16]
	cbnz	x8, LBB0_7
	b	LBB0_8
LBB0_5:
	mov	w23, #0
	ldr	w8, [x21, #8]
	sdiv	w9, w22, w8
	msub	w8, w9, w8, w22
	ldr	x9, [x21, #40]
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w8, [x8, #20]
	str	w8, [x19, #20]
LBB0_6:
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_8
LBB0_7:
	mov	w8, #1
LBB0_8:
	add	x5, x19, #32
Lloh0:
	adrp	x9, _MLX4_RES_USAGE_DRIVER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_RES_USAGE_DRIVER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	x3, x20
	ldr	x0, [x3], #8
	str	w9, [x19, #40]
	ldr	w1, [x19, #96]
	add	x2, x19, #88
	add	x9, x19, #64
	ldr	w4, [x19, #72]
	ldr	w6, [x19, #20]
	str	wzr, [sp, #16]
	str	x9, [sp, #8]
	str	w8, [sp]
	mov	w7, #0
	bl	_mlx4_cq_alloc
	cbz	w0, LBB0_11
; %bb.9:
	mov	x22, x0
	cbz	w23, LBB0_17
; %bb.10:
	ldr	x0, [x20]
	ldr	w1, [x19, #20]
	bl	_mlx4_release_eq
	b	LBB0_17
LBB0_11:
Lloh3:
	adrp	x8, _mlx4_en_cq_event@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mlx4_en_cq_event@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #36]
	ldr	w8, [x19]
	cmp	w8, #128
	b.eq	LBB0_18
; %bb.12:
	cmp	w8, #130
	b.eq	LBB0_19
; %bb.13:
	cmp	w8, #129
	b.ne	LBB0_21
; %bb.14:
Lloh6:
	adrp	x8, _mlx4_en_tx_irq@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mlx4_en_tx_irq@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	ldr	w0, [x19, #28]
	add	x19, x19, #24
Lloh9:
	adrp	x8, _mlx4_en_poll_tx_cq@GOTPAGE
Lloh10:
	ldr	x8, [x8, _mlx4_en_poll_tx_cq@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x8, _NAPI_POLL_WEIGHT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NAPI_POLL_WEIGHT@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x1, x19
	bl	_netif_tx_napi_add
	b	LBB0_20
LBB0_15:
	ldr	x8, [x21, #32]
	ldr	x9, [x19, #8]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w0, [x8, #4]
	bl	_cpumask_first
	str	w0, [x19, #20]
	ldr	x0, [x20]
	ldr	x1, [x21]
	mov	x2, x23
	bl	_mlx4_assign_eq
	cbz	w0, LBB0_23
; %bb.16:
	mov	x22, x0
	ldr	w2, [x23]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mlx4_err
LBB0_17:
	ldr	x8, [x20]
	ldr	w8, [x8]
	str	w8, [x19, #20]
	b	LBB0_22
LBB0_18:
	mov	w22, #0
	str	wzr, [x19, #16]
	b	LBB0_22
LBB0_19:
Lloh17:
	adrp	x8, _mlx4_en_rx_irq@GOTPAGE
Lloh18:
	ldr	x8, [x8, _mlx4_en_rx_irq@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	ldr	w0, [x19, #28]
	add	x19, x19, #24
Lloh20:
	adrp	x8, _mlx4_en_poll_rx_cq@GOTPAGE
Lloh21:
	ldr	x8, [x8, _mlx4_en_poll_rx_cq@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x1, x19
	mov	w3, #64
	bl	_netif_napi_add
LBB0_20:
	mov	x0, x19
	bl	_napi_enable
LBB0_21:
	mov	w22, #0
LBB0_22:
	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
	add	sp, sp, #96
	ret
LBB0_23:
	mov	w23, #1
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed assigning an EQ to CQ vector %d\n"

	.comm	_MLX4_RES_USAGE_DRIVER,4,2      ; @MLX4_RES_USAGE_DRIVER
	.comm	_mlx4_en_cq_event,4,2           ; @mlx4_en_cq_event
	.comm	_mlx4_en_tx_irq,4,2             ; @mlx4_en_tx_irq
	.comm	_mlx4_en_poll_tx_cq,4,2         ; @mlx4_en_poll_tx_cq
	.comm	_NAPI_POLL_WEIGHT,4,2           ; @NAPI_POLL_WEIGHT
	.comm	_mlx4_en_rx_irq,4,2             ; @mlx4_en_rx_irq
	.comm	_mlx4_en_poll_rx_cq,4,2         ; @mlx4_en_poll_rx_cq
.subsections_via_symbols
