	.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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -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
	movq	_IB_MGMT_BASE_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r15d, %r15d
	movl	$1, %esi
	xorl	%ecx, %ecx
	pushq	%rax
	pushq	%r14
	callq	_ib_create_send_mad
	addq	$16, %rsp
	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), %r15d
	jmp	LBB0_5
LBB0_1:
	addq	$4, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_5
LBB0_4:
	movl	(%rdi), %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	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	_IB_MGMT_BASE_VERSION,4,2       ## @IB_MGMT_BASE_VERSION
	.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]
Lloh6:
	adrp	x8, _IB_MGMT_BASE_VERSION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_MGMT_BASE_VERSION@GOTPAGEOFF]
Lloh8:
	ldr	w7, [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
Lloh9:
	adrp	x8, _free_sm_ah@GOTPAGE
Lloh10:
	ldr	x8, [x8, _free_sm_ah@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_kref_put
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	add	x0, x8, #4
	bl	_spin_unlock_irqrestore
Lloh14:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh15:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.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	_IB_MGMT_BASE_VERSION,4,2       ; @IB_MGMT_BASE_VERSION
	.comm	_free_sm_ah,4,2                 ; @free_sm_ah
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_alloc_mad
.subsections_via_symbols
