	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_mad
_alloc_mad:                             ## @alloc_mad
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	16(%rdi), %rdi
	addq	$4, %rdi
	callq	_spin_lock_irqsave
	movq	16(%rbx), %rdi
	movq	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	addq	$4, %rax
	movq	%rax, %rdi
	callq	_kref_get
	movq	16(%rbx), %rdi
	movq	8(%rdi), %rax
	movq	%rax, (%rbx)
	addq	$4, %rdi
	callq	_spin_unlock_irqrestore
	movq	(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	(%rcx), %edi
	movl	8(%rax), %edx
	movq	_IB_MGMT_SA_HDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_IB_MGMT_SA_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	%r14d, (%rsp)
	xorl	%r14d, %r14d
	movl	$1, %esi
	xorl	%ecx, %ecx
	callq	_ib_create_send_mad
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	addq	$4, %rdi
	movq	_free_sm_ah@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kref_put
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_1:
	addq	$4, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_4:
	movl	(%rdi), %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
LBB0_5:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_IB_MGMT_SA_HDR,4,2             ## @IB_MGMT_SA_HDR
	.comm	_IB_MGMT_SA_DATA,4,2            ## @IB_MGMT_SA_DATA
	.comm	_free_sm_ah,4,2                 ## @free_sm_ah
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_alloc_mad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_mad
_alloc_mad:                             ; @alloc_mad
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	add	x0, x8, #4
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #16]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_3
; %bb.1:
	add	x0, x9, #4
	bl	_kref_get
	ldr	x8, [x19, #16]
	ldr	x9, [x8, #8]
	str	x9, [x19]
	add	x0, x8, #4
	bl	_spin_unlock_irqrestore
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	ldr	x8, [x19]
	ldr	w2, [x8, #8]
Lloh0:
	adrp	x8, _IB_MGMT_SA_HDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_MGMT_SA_HDR@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
Lloh3:
	adrp	x8, _IB_MGMT_SA_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_MGMT_SA_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
	mov	w1, #1
	mov	w3, #0
	mov	x6, x20
	bl	_ib_create_send_mad
	str	x0, [x19, #8]
	bl	_IS_ERR
	ldr	x8, [x19]
	cbz	x0, LBB0_5
; %bb.2:
	add	x0, x8, #4
Lloh6:
	adrp	x8, _free_sm_ah@GOTPAGE
Lloh7:
	ldr	x8, [x8, _free_sm_ah@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_kref_put
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	add	x0, x8, #4
	bl	_spin_unlock_irqrestore
Lloh11:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	str	w8, [x9]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_IB_MGMT_SA_HDR,4,2             ; @IB_MGMT_SA_HDR
	.comm	_IB_MGMT_SA_DATA,4,2            ; @IB_MGMT_SA_DATA
	.comm	_free_sm_ah,4,2                 ; @free_sm_ah
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_alloc_mad
.subsections_via_symbols
