	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ib_uverbs_alloc_mw
_ib_uverbs_alloc_mw:                    ## @ib_uverbs_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	-64(%rbp), %rsi
	movl	$16, %edx
	callq	_uverbs_request
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	movq	_UVERBS_OBJECT_MW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-72(%rbp), %rdx
	movq	%r12, %rsi
	callq	_uobj_alloc
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_15
LBB0_3:
	movq	_UVERBS_OBJECT_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-56(%rbp), %edx
	movq	%r12, %rcx
	callq	_uobj_get_obj_read
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	-64(%rbp), %rsi
	movq	_IB_MW_TYPE_1@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_8
## %bb.6:
	movq	_IB_MW_TYPE_2@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_8
## %bb.7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_8:
	movq	8(%r15), %rax
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	*(%rax)
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_13
LBB0_10:
	movq	8(%r15), %rax
	movq	%rax, 32(%r13)
	movq	%r15, 24(%r13)
	movq	%r14, 16(%r13)
	movq	%r15, %rdi
	callq	_atomic_inc
	movq	%r13, 8(%r14)
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	4(%r13), %eax
	movl	%eax, -44(%rbp)
	movl	(%r14), %eax
	movl	%eax, -48(%rbp)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	_uverbs_response
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_uverbs_dealloc_mw
LBB0_13:
	movq	%r15, %rdi
	callq	_uobj_put_obj_read
LBB0_14:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_uobj_alloc_abort
LBB0_15:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r15, %rdi
	callq	_uobj_put_obj_read
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_uobj_alloc_commit
	movl	%eax, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_UVERBS_OBJECT_MW,4,2           ## @UVERBS_OBJECT_MW
	.comm	_UVERBS_OBJECT_PD,4,2           ## @UVERBS_OBJECT_PD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IB_MW_TYPE_1,8,3               ## @IB_MW_TYPE_1
	.comm	_IB_MW_TYPE_2,8,3               ## @IB_MW_TYPE_2
	.no_dead_strip	_ib_uverbs_alloc_mw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ib_uverbs_alloc_mw
_ib_uverbs_alloc_mw:                    ; @ib_uverbs_alloc_mw
	.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	x19, x0
	add	x1, sp, #16
	mov	w2, #16
	bl	_uverbs_request
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.1:
Lloh0:
	adrp	x8, _UVERBS_OBJECT_MW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UVERBS_OBJECT_MW@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x2, sp
	mov	x1, x19
	bl	_uobj_alloc
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_11
LBB0_3:
Lloh3:
	adrp	x8, _UVERBS_OBJECT_PD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UVERBS_OBJECT_PD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [sp, #24]
	mov	x3, x19
	bl	_uobj_get_obj_read
	cbz	x0, LBB0_7
; %bb.4:
	mov	x21, x0
	ldr	x1, [sp, #16]
Lloh6:
	adrp	x8, _IB_MW_TYPE_1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_MW_TYPE_1@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _IB_MW_TYPE_2@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IB_MW_TYPE_2@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x1, x8
	ccmp	x1, x9, #4, ne
	b.ne	LBB0_8
; %bb.5:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	mov	x0, x21
	mov	x2, x19
	blr	x8
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.6:
	mov	x0, x23
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_8:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x21
	bl	_uobj_put_obj_read
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	bl	_uobj_alloc_abort
LBB0_11:
	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_12:
	ldr	x8, [x21, #8]
	stp	x21, x8, [x23, #24]
	str	x20, [x23, #16]
	mov	x0, x21
	bl	_atomic_inc
	str	x23, [x20, #8]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w8, [x23, #4]
	str	w8, [sp, #12]
	ldr	w8, [x20]
	str	w8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #8
	bl	_uverbs_response
	cbz	w0, LBB0_14
; %bb.13:
	mov	x22, x0
	mov	x0, x23
	bl	_uverbs_dealloc_mw
	b	LBB0_9
LBB0_14:
	mov	x0, x21
	bl	_uobj_put_obj_read
	mov	x0, x20
	mov	x1, x19
	bl	_uobj_alloc_commit
	mov	x22, x0
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_UVERBS_OBJECT_MW,4,2           ; @UVERBS_OBJECT_MW
	.comm	_UVERBS_OBJECT_PD,4,2           ; @UVERBS_OBJECT_PD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IB_MW_TYPE_1,8,3               ; @IB_MW_TYPE_1
	.comm	_IB_MW_TYPE_2,8,3               ; @IB_MW_TYPE_2
	.no_dead_strip	_ib_uverbs_alloc_mw
.subsections_via_symbols
