	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_generate_wc            ## -- Begin function mlx5_ib_generate_wc
	.p2align	4, 0x90
_mlx5_ib_generate_wc:                   ## @mlx5_ib_generate_wc
	.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	%rsi, %r14
	callq	_to_mcq
	movq	%rax, %r12
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	(%r14), %rax
	movq	%rax, 8(%rbx)
	leaq	8(%r12), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	leaq	16(%r12), %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	movq	(%r12), %rax
	movq	_IB_CQ_NEXT_COMP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	(%r14), %rax
	movq	_IB_WC_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
LBB0_4:
	movq	$0, (%r12)
	addq	$12, %r12
	movq	%r12, %rdi
	callq	_schedule_work
LBB0_5:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IB_CQ_NEXT_COMP,8,3            ## @IB_CQ_NEXT_COMP
	.comm	_IB_WC_SUCCESS,8,3              ## @IB_WC_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_ib_generate_wc            ; -- Begin function mlx5_ib_generate_wc
	.p2align	2
_mlx5_ib_generate_wc:                   ; @mlx5_ib_generate_wc
	.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, x1
	bl	_to_mcq
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x22, x0
	ldr	x8, [x20]
	str	x8, [x0, #8]
	add	x21, x19, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	add	x1, x19, #16
	mov	x0, x22
	bl	_list_add_tail
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _IB_CQ_NEXT_COMP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IB_CQ_NEXT_COMP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.2:
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _IB_WC_SUCCESS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IB_WC_SUCCESS@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
LBB0_3:
	str	xzr, [x19], #12
	mov	x0, x19
	bl	_schedule_work
LBB0_4:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IB_CQ_NEXT_COMP,8,3            ; @IB_CQ_NEXT_COMP
	.comm	_IB_WC_SUCCESS,8,3              ; @IB_WC_SUCCESS
.subsections_via_symbols
