	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_mr
_alloc_mr:                              ## @alloc_mr
	.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
	movq	%rsi, %r15
                                        ## kill: def $edi killed $edi def $rdi
	movq	_IPATH_SEGSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leal	(%rdi,%rcx), %eax
	decl	%eax
	cltd
	idivl	%ecx
	movl	%eax, %r12d
	leal	32(,%r12,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_kmalloc
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	%rax, %r14
	testl	%r12d, %r12d
	jle	LBB0_6
## %bb.2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movl	$32, %edi
	callq	_kmalloc
	movq	8(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	8(%r14), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_3
## %bb.5:
	movl	%r12d, %ebx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_6:
	movl	%r12d, (%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ipath_alloc_lkey
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	16(%r14), %eax
	movl	%eax, 24(%r14)
	movl	%eax, 28(%r14)
	movq	%r14, %rbx
	jmp	LBB0_12
LBB0_8:
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.9:
	movl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	-8(%rax,%rbx,8), %rdi
	callq	_kfree
	decq	%rbx
	jne	LBB0_10
LBB0_11:
	movq	%r14, %rdi
	callq	_kfree
	xorl	%ebx, %ebx
LBB0_12:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPATH_SEGSZ,4,2                ## @IPATH_SEGSZ
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_alloc_mr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_mr
_alloc_mr:                              ; @alloc_mr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
Lloh0:
	adrp	x8, _IPATH_SEGSZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPATH_SEGSZ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w9, w0, w8
	sub	w9, w9, #1
	sdiv	w21, w9, w8
	lsl	w8, w21, #3
	add	w0, w8, #32
Lloh3:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_kmalloc
	mov	x19, x0
	cbz	x0, LBB0_13
; %bb.1:
	cmp	w21, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x22, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	w0, #32
	bl	_kmalloc
	ldr	x8, [x19, #8]
	lsl	x9, x22, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	cmp	x21, x22
	b.ne	LBB0_3
; %bb.5:
	mov	x22, x21
	b	LBB0_7
LBB0_6:
	mov	w22, #0
LBB0_7:
	str	w21, [x19]
	mov	x0, x20
	mov	x1, x19
	bl	_ipath_alloc_lkey
	cbz	w0, LBB0_9
; %bb.8:
	ldr	w8, [x19, #16]
	stp	w8, w8, [x19, #24]
	b	LBB0_13
LBB0_9:
	cbz	w22, LBB0_12
; %bb.10:
	mov	w8, w22
	lsl	x8, x8, #3
	sub	x20, x8, #8
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x20]
	bl	_kfree
	sub	x20, x20, #8
	cmn	x20, #8
	b.ne	LBB0_11
LBB0_12:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_13:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IPATH_SEGSZ,4,2                ; @IPATH_SEGSZ
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_alloc_mr
.subsections_via_symbols
