	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c4iw_alloc_mw                  ## -- Begin function c4iw_alloc_mw
	.p2align	4, 0x90
_c4iw_alloc_mw:                         ## @c4iw_alloc_mw
	.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	$0, -44(%rbp)
	movq	_IB_MW_TYPE_1@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_1
## %bb.3:
	callq	_to_c4iw_pd
	movq	%rax, %r15
	movq	8(%rax), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movl	(%r13), %edi
	callq	_c4iw_alloc_wr_wait
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	_SGE_MAX_WR_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %esi
	callq	_alloc_skb
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	(%r15), %edx
	movl	(%rbx), %ecx
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_allocate_window
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:
	movq	%r14, 24(%rbx)
	movl	(%r15), %eax
	movl	%eax, 16(%rbx)
	movq	_FW_RI_STAG_MW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movl	-44(%rbp), %r15d
	movl	%r15d, 8(%rbx)
	movl	%r15d, 20(%rbx)
	sarl	$8, %r15d
	leaq	4(%r14), %rdi
	movl	(%r13), %ecx
	movl	%r15d, %esi
	movq	%rbx, %rdx
	callq	_xa_insert_irq
	testq	%rax, %rax
	je	LBB0_16
## %bb.11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movl	8(%rbx), %esi
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	callq	_deallocate_window
LBB0_12:
	movl	4(%rbx), %edi
	callq	_kfree_skb
	jmp	LBB0_13
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_14
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_13:
	movl	(%rbx), %edi
	callq	_c4iw_put_wr_wait
LBB0_14:
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r12d, %edi
	callq	_ERR_PTR
	movq	%rax, %r14
LBB0_15:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	%rbx, %r14
	addq	$20, %r14
	movl	-44(%rbp), %ecx
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	callq	_pr_debug
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_MW_TYPE_1,4,2               ## @IB_MW_TYPE_1
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SGE_MAX_WR_LEN,4,2             ## @SGE_MAX_WR_LEN
	.comm	_FW_RI_STAG_MW,4,2              ## @FW_RI_STAG_MW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mmid 0x%x mhp %p stag 0x%x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c4iw_alloc_mw                  ; -- Begin function c4iw_alloc_mw
	.p2align	2
_c4iw_alloc_mw:                         ; @c4iw_alloc_mw
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _IB_MW_TYPE_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_MW_TYPE_1@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_8
; %bb.1:
	bl	_to_c4iw_pd
	mov	x21, x0
	ldr	x20, [x0, #8]
Lloh3:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.2:
	mov	x19, x0
	ldr	w0, [x23]
	bl	_c4iw_alloc_wr_wait
	str	w0, [x19]
	cbz	w0, LBB0_11
; %bb.3:
Lloh5:
	adrp	x8, _SGE_MAX_WR_LEN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SGE_MAX_WR_LEN@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w1, [x23]
	bl	_alloc_skb
	str	w0, [x19, #4]
	cbz	w0, LBB0_12
; %bb.4:
	ldr	w2, [x21]
	ldr	w3, [x19]
	add	x1, sp, #12
	mov	x0, x20
	bl	_allocate_window
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.5:
	str	x20, [x19, #24]
	ldr	w8, [x21]
	str	w8, [x19, #16]
Lloh8:
	adrp	x8, _FW_RI_STAG_MW@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FW_RI_STAG_MW@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [sp, #12]
	stp	w9, w8, [x19, #8]
	asr	w22, w9, #8
	mov	x21, x19
	str	w9, [x21, #20]!
	add	x0, x20, #4
	ldr	w3, [x23]
	mov	x1, x22
	mov	x2, x19
	bl	_xa_insert_irq
	cbz	x0, LBB0_16
; %bb.6:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w22, w8
	ldp	w2, w1, [x19, #4]
	ldr	w3, [x19]
	mov	x0, x20
	bl	_deallocate_window
LBB0_7:
	ldr	w0, [x19, #4]
	bl	_kfree_skb
	b	LBB0_13
LBB0_8:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ERR_PTR
LBB0_11:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_14
LBB0_12:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_13:
	ldr	w0, [x19]
	bl	_c4iw_put_wr_wait
LBB0_14:
	mov	x0, x19
	bl	_kfree
	mov	x0, x22
	bl	_ERR_PTR
	mov	x21, x0
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_16:
	ldr	w3, [sp, #12]
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x19
	bl	_pr_debug
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_MW_TYPE_1,4,2               ; @IB_MW_TYPE_1
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SGE_MAX_WR_LEN,4,2             ; @SGE_MAX_WR_LEN
	.comm	_FW_RI_STAG_MW,4,2              ; @FW_RI_STAG_MW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mmid 0x%x mhp %p stag 0x%x\n"

.subsections_via_symbols
