	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sharedmem940_init              ## -- Begin function sharedmem940_init
	.p2align	4, 0x90
_sharedmem940_init:                     ## @sharedmem940_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	%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	_shared_mem@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	jne	LBB0_7
## %bb.1:
	movq	_PROT_READ@GOTPCREL(%rip), %r14
	movq	_PROT_WRITE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	orl	(%r14), %edx
	movq	_MAP_SHARED@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	_memdev@GOTPCREL(%rip), %r13
	movl	(%r13), %r8d
	xorl	%edi, %edi
	movl	$2162688, %esi                  ## imm = 0x210000
	movl	$33554432, %r9d                 ## imm = 0x2000000
	callq	_mmap
	movq	%rax, (%rbx)
	movq	_MAP_FAILED@GOTPCREL(%rip), %rbx
	cmpq	%rax, (%rbx)
	je	LBB0_2
## %bb.4:
	leaq	1048576(%rax), %rcx
	movq	_shared_data@GOTPCREL(%rip), %rdx
	movq	%rcx, (%rdx)
	addq	$2097152, %rax                  ## imm = 0x200000
	movq	_shared_ctl@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_MP3_SIZE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	orl	(%r14), %edx
	movl	(%r12), %ecx
	movl	(%r13), %r8d
	xorl	%edi, %edi
	movl	$37748736, %r9d                 ## imm = 0x2400000
	callq	_mmap
	movq	_mp3_mem@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	cmpq	%rax, (%rbx)
	je	LBB0_5
## %bb.6:
	movq	_crashed_940@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_3
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
LBB0_3:
	callq	_printf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_shared_mem,8,3                 ## @shared_mem
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_memdev,4,2                     ## @memdev
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mmap(shared_data) failed with %i\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_shared_data,8,3                ## @shared_data
	.comm	_shared_ctl,8,3                 ## @shared_ctl
	.comm	_MP3_SIZE_MAX,4,2               ## @MP3_SIZE_MAX
	.comm	_mp3_mem,8,3                    ## @mp3_mem
L_.str.1:                               ## @.str.1
	.asciz	"mmap(mp3_mem) failed with %i\n"

	.comm	_crashed_940,4,2                ## @crashed_940
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sharedmem940_init              ; -- Begin function sharedmem940_init
	.p2align	2
_sharedmem940_init:                     ; @sharedmem940_init
	.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
Lloh0:
	adrp	x23, _shared_mem@GOTPAGE
Lloh1:
	ldr	x23, [x23, _shared_mem@GOTPAGEOFF]
	ldr	x8, [x23]
	cbnz	x8, LBB0_4
; %bb.1:
Lloh2:
	adrp	x19, _PROT_READ@GOTPAGE
Lloh3:
	ldr	x19, [x19, _PROT_READ@GOTPAGEOFF]
	ldr	w8, [x19]
Lloh4:
	adrp	x20, _PROT_WRITE@GOTPAGE
Lloh5:
	ldr	x20, [x20, _PROT_WRITE@GOTPAGEOFF]
	ldr	w9, [x20]
	orr	w2, w9, w8
Lloh6:
	adrp	x21, _MAP_SHARED@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MAP_SHARED@GOTPAGEOFF]
	ldr	w3, [x21]
Lloh8:
	adrp	x22, _memdev@GOTPAGE
Lloh9:
	ldr	x22, [x22, _memdev@GOTPAGEOFF]
	ldr	w4, [x22]
	mov	w0, #0
	mov	w1, #2162688
	mov	w5, #33554432
	bl	_mmap
	str	x0, [x23]
Lloh10:
	adrp	x23, _MAP_FAILED@GOTPAGE
Lloh11:
	ldr	x23, [x23, _MAP_FAILED@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, x0
	b.eq	LBB0_5
; %bb.2:
	add	x8, x0, #256, lsl #12           ; =1048576
Lloh12:
	adrp	x9, _shared_data@GOTPAGE
Lloh13:
	ldr	x9, [x9, _shared_data@GOTPAGEOFF]
Lloh14:
	str	x8, [x9]
	add	x8, x0, #512, lsl #12           ; =2097152
Lloh15:
	adrp	x9, _shared_ctl@GOTPAGE
Lloh16:
	ldr	x9, [x9, _shared_ctl@GOTPAGEOFF]
Lloh17:
	str	x8, [x9]
Lloh18:
	adrp	x8, _MP3_SIZE_MAX@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MP3_SIZE_MAX@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	ldr	w8, [x19]
	ldr	w9, [x20]
	orr	w2, w9, w8
	ldr	w3, [x21]
	ldr	w4, [x22]
	mov	w0, #0
	mov	w5, #37748736
	bl	_mmap
Lloh21:
	adrp	x8, _mp3_mem@GOTPAGE
Lloh22:
	ldr	x8, [x8, _mp3_mem@GOTPAGEOFF]
Lloh23:
	str	x0, [x8]
	ldr	x8, [x23]
	cmp	x8, x0
	b.eq	LBB0_6
; %bb.3:
Lloh24:
	adrp	x8, _crashed_940@GOTPAGE
Lloh25:
	ldr	x8, [x8, _crashed_940@GOTPAGEOFF]
	mov	w9, #1
Lloh26:
	str	w9, [x8]
LBB0_4:
	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
LBB0_5:
Lloh27:
	adrp	x8, _errno@GOTPAGE
Lloh28:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x0, l_.str@PAGE
Lloh31:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh32:
	adrp	x8, _errno@GOTPAGE
Lloh33:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
Lloh35:
	adrp	x0, l_.str.1@PAGE
Lloh36:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	bl	_printf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_shared_mem,8,3                 ; @shared_mem
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_memdev,4,2                     ; @memdev
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mmap(shared_data) failed with %i\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_shared_data,8,3                ; @shared_data
	.comm	_shared_ctl,8,3                 ; @shared_ctl
	.comm	_MP3_SIZE_MAX,4,2               ; @MP3_SIZE_MAX
	.comm	_mp3_mem,8,3                    ; @mp3_mem
l_.str.1:                               ; @.str.1
	.asciz	"mmap(mp3_mem) failed with %i\n"

	.comm	_crashed_940,4,2                ; @crashed_940
.subsections_via_symbols
