	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fpm_shm_alloc                  ## -- Begin function fpm_shm_alloc
	.p2align	4, 0x90
_fpm_shm_alloc:                         ## @fpm_shm_alloc
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_MAP_ANONYMOUS@GOTPCREL(%rip), %rax
	movq	_MAP_SHARED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	xorl	%edi, %edi
	movq	%r14, %rsi
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_fpm_shm_size@GOTPCREL(%rip), %rax
	addq	%r14, (%rax)
	jmp	LBB0_3
LBB0_1:
	movq	_ZLOG_SYSERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_zlog
LBB0_3:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_ANONYMOUS,4,2              ## @MAP_ANONYMOUS
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_ZLOG_SYSERROR,4,2              ## @ZLOG_SYSERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to allocate %zu bytes in shared memory"

	.comm	_fpm_shm_size,8,3               ## @fpm_shm_size
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fpm_shm_alloc                  ; -- Begin function fpm_shm_alloc
	.p2align	2
_fpm_shm_alloc:                         ; @fpm_shm_alloc
	.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	x19, x0
Lloh0:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _MAP_ANONYMOUS@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MAP_ANONYMOUS@GOTPAGEOFF]
	orr	w2, w9, w8
Lloh8:
	ldr	w8, [x10]
Lloh9:
	adrp	x9, _MAP_SHARED@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAP_SHARED@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	w0, #0
	mov	x1, x19
	mov	w4, #-1
	mov	w5, #0
	bl	_mmap
	mov	x20, x0
	cbz	x0, LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _fpm_shm_size@GOTPAGE
Lloh13:
	ldr	x8, [x8, _fpm_shm_size@GOTPAGEOFF]
	ldr	x9, [x8]
	add	x9, x9, x19
	str	x9, [x8]
	b	LBB0_3
LBB0_2:
Lloh14:
	adrp	x8, _ZLOG_SYSERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ZLOG_SYSERROR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_zlog
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_ANONYMOUS,4,2              ; @MAP_ANONYMOUS
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_ZLOG_SYSERROR,4,2              ; @ZLOG_SYSERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to allocate %zu bytes in shared memory"

	.comm	_fpm_shm_size,8,3               ; @fpm_shm_size
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
