	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ibv_fork_init                  ## -- Begin function ibv_fork_init
	.p2align	4, 0x90
_ibv_fork_init:                         ## @ibv_fork_init
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_huge_page_enabled@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_2:
	movq	_mm_root@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	cmpq	$0, (%r12)
	jne	LBB0_17
## %bb.3:
	movq	_too_late@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_5:
	movq	__SC_PAGESIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sysconf
	movq	_page_size@GOTPCREL(%rip), %r14
	movq	%rax, (%r14)
	leaq	-40(%rbp), %rdi
	movq	%rax, %rsi
	movq	%rax, %rdx
	callq	_posix_memalign
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_7:
	movq	_huge_page_enabled@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_9
## %bb.8:
	movq	-40(%rbp), %rdi
	callq	_get_page_size
	movq	%rax, %r14
	movq	%rax, %r15
	negq	%r15
	andq	-40(%rbp), %r15
	jmp	LBB0_10
LBB0_9:
	movq	(%r14), %r14
	movq	-40(%rbp), %r15
LBB0_10:
	movq	_MADV_DONTFORK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_madvise
	testq	%rax, %rax
	je	LBB0_11
## %bb.14:
	movq	-40(%rbp), %rdi
	callq	_free
	jmp	LBB0_15
LBB0_11:
	movq	_MADV_DOFORK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_madvise
	movq	%rax, %r14
	movq	-40(%rbp), %rdi
	callq	_free
	testq	%r14, %r14
	je	LBB0_12
LBB0_15:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	$56, %edi
	callq	_malloc
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_6
## %bb.13:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rax)
	movq	$0, 48(%rax)
	movq	_IBV_BLACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 24(%rax)
	movq	$0, 16(%rax)
	movq	_UINTPTR_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movq	$0, (%rax)
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RDMAV_HUGEPAGES_SAFE"

	.comm	_huge_page_enabled,4,2          ## @huge_page_enabled
	.comm	_mm_root,8,3                    ## @mm_root
	.comm	_too_late,8,3                   ## @too_late
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	__SC_PAGESIZE,4,2               ## @_SC_PAGESIZE
	.comm	_page_size,8,3                  ## @page_size
	.comm	_errno,4,2                      ## @errno
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MADV_DONTFORK,4,2              ## @MADV_DONTFORK
	.comm	_MADV_DOFORK,4,2                ## @MADV_DOFORK
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_IBV_BLACK,4,2                  ## @IBV_BLACK
	.comm	_UINTPTR_MAX,4,2                ## @UINTPTR_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ibv_fork_init                  ; -- Begin function ibv_fork_init
	.p2align	2
_ibv_fork_init:                         ; @ibv_fork_init
	.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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _huge_page_enabled@GOTPAGE
Lloh3:
	ldr	x8, [x8, _huge_page_enabled@GOTPAGEOFF]
	mov	w9, #1
Lloh4:
	str	w9, [x8]
LBB0_2:
Lloh5:
	adrp	x21, _mm_root@GOTPAGE
Lloh6:
	ldr	x21, [x21, _mm_root@GOTPAGEOFF]
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_16
LBB0_4:
Lloh7:
	adrp	x8, _too_late@GOTPAGE
Lloh8:
	ldr	x8, [x8, _too_late@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.5:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_15
LBB0_6:
Lloh12:
	adrp	x8, __SC_PAGESIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, __SC_PAGESIZE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_sysconf
	mov	x1, x0
Lloh15:
	adrp	x19, _page_size@GOTPAGE
Lloh16:
	ldr	x19, [x19, _page_size@GOTPAGEOFF]
	str	x0, [x19]
	add	x0, sp, #8
	mov	x2, x1
	bl	_posix_memalign
	cbz	x0, LBB0_8
LBB0_7:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_15
LBB0_8:
Lloh19:
	adrp	x8, _huge_page_enabled@GOTPAGE
Lloh20:
	ldr	x8, [x8, _huge_page_enabled@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cbz	w8, LBB0_10
; %bb.9:
	ldr	x0, [sp, #8]
	bl	_get_page_size
	mov	x19, x0
	ldr	x8, [sp, #8]
	neg	x9, x0
	and	x20, x8, x9
	b	LBB0_11
LBB0_10:
	ldr	x19, [x19]
	ldr	x20, [sp, #8]
LBB0_11:
Lloh22:
	adrp	x8, _MADV_DONTFORK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MADV_DONTFORK@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_madvise
	cbz	x0, LBB0_13
; %bb.12:
	ldr	x0, [sp, #8]
	bl	_free
	b	LBB0_14
LBB0_13:
Lloh25:
	adrp	x8, _MADV_DOFORK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MADV_DOFORK@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_madvise
	mov	x19, x0
	ldr	x0, [sp, #8]
	bl	_free
	cbz	x19, LBB0_17
LBB0_14:
Lloh28:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
LBB0_15:
	ldr	w0, [x8]
LBB0_16:
	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_17:
	mov	w0, #56
	bl	_malloc
	str	x0, [x21]
	cbz	x0, LBB0_7
; %bb.18:
	mov	x8, x0
	mov	w0, #0
	stp	xzr, xzr, [x8, #32]
	str	xzr, [x8, #48]
Lloh30:
	adrp	x9, _IBV_BLACK@GOTPAGE
Lloh31:
	ldr	x9, [x9, _IBV_BLACK@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	str	w9, [x8, #24]
	str	xzr, [x8, #16]
Lloh33:
	adrp	x9, _UINTPTR_MAX@GOTPAGE
Lloh34:
	ldr	x9, [x9, _UINTPTR_MAX@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	str	w9, [x8, #8]
	str	xzr, [x8]
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RDMAV_HUGEPAGES_SAFE"

	.comm	_huge_page_enabled,4,2          ; @huge_page_enabled
	.comm	_mm_root,8,3                    ; @mm_root
	.comm	_too_late,8,3                   ; @too_late
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	__SC_PAGESIZE,4,2               ; @_SC_PAGESIZE
	.comm	_page_size,8,3                  ; @page_size
	.comm	_errno,4,2                      ; @errno
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MADV_DONTFORK,4,2              ; @MADV_DONTFORK
	.comm	_MADV_DOFORK,4,2                ; @MADV_DOFORK
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_IBV_BLACK,4,2                  ; @IBV_BLACK
	.comm	_UINTPTR_MAX,4,2                ; @UINTPTR_MAX
.subsections_via_symbols
