	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_ib_alloc_xrcd
_mlx4_ib_alloc_xrcd:                    ## @mlx4_ib_alloc_xrcd
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$0, -32(%rbp)
	callq	_to_mdev
	movq	(%rax), %rax
	movq	_MLX4_DEV_CAP_FLAG_XRC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_1
## %bb.3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_to_mdev
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	callq	_mlx4_xrcd_alloc
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ib_alloc_pd
	movl	%eax, 4(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	4(%rbx), %edi
	callq	_PTR_ERR
	movl	%eax, %r15d
	jmp	LBB0_10
LBB0_1:
	movq	_ENOSYS@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	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_8:
	movl	$1, -32(%rbp)
	leaq	-32(%rbp), %r8
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	callq	_ib_create_cq
	movl	%eax, 12(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movl	12(%rbx), %edi
	callq	_PTR_ERR
	movl	%eax, %r15d
	movl	4(%rbx), %edi
	callq	_ib_dealloc_pd
LBB0_10:
	movq	%r14, %rdi
	callq	_to_mdev
	movq	(%rax), %rdi
	movl	(%rbx), %esi
	callq	_mlx4_xrcd_free
LBB0_11:
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r15d, %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
LBB0_12:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	addq	$8, %rbx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_DEV_CAP_FLAG_XRC,4,2      ## @MLX4_DEV_CAP_FLAG_XRC
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mlx4_ib_alloc_xrcd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_ib_alloc_xrcd
_mlx4_ib_alloc_xrcd:                    ; @mlx4_ib_alloc_xrcd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	str	wzr, [sp, #8]
	bl	_to_mdev
	ldr	x8, [x0]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _MLX4_DEV_CAP_FLAG_XRC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG_XRC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	mov	x0, x19
	bl	_to_mdev
	ldr	x0, [x0]
	mov	x1, x20
	bl	_mlx4_xrcd_alloc
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.3:
	mov	x0, x19
	mov	w1, #0
	bl	_ib_alloc_pd
	str	w0, [x20, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.4:
	ldr	w0, [x20, #4]
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_10
LBB0_5:
Lloh6:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_ERR_PTR
LBB0_8:
	mov	w8, #1
	str	w8, [sp, #8]
	add	x4, sp, #8
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	mov	x3, x20
	bl	_ib_create_cq
	str	w0, [x20, #12]
	bl	_IS_ERR
	cbz	x0, LBB0_13
; %bb.9:
	ldr	w0, [x20, #12]
	bl	_PTR_ERR
	mov	x21, x0
	ldr	w0, [x20, #4]
	bl	_ib_dealloc_pd
LBB0_10:
	mov	x0, x19
	bl	_to_mdev
	ldr	x0, [x0]
	ldr	w1, [x20]
	bl	_mlx4_xrcd_free
LBB0_11:
	mov	x0, x20
	bl	_kfree
	mov	x0, x21
	bl	_ERR_PTR
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_13:
	add	x0, x20, #8
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_DEV_CAP_FLAG_XRC,4,2      ; @MLX4_DEV_CAP_FLAG_XRC
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mlx4_ib_alloc_xrcd
.subsections_via_symbols
