	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mem_open
_mem_open:                              ## @mem_open
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpb	$0, _mem_open.one(%rip)
	je	LBB0_1
## %bb.2:
	movq	_file@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_3
## %bb.6:
	cmpl	$0, 24(%rcx)
	je	LBB0_7
## %bb.8:
	cmpl	$0, 48(%rcx)
	je	LBB0_9
## %bb.10:
	movl	$-1, %eax
	cmpl	$0, 72(%rcx)
	je	LBB0_11
## %bb.5:
	popq	%rbp
	retq
LBB0_1:
	movb	$1, _mem_open.one(%rip)
	movq	_file@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	$0, (%rcx)
	movl	$0, 24(%rcx)
	movl	$0, 48(%rcx)
	movl	$0, 72(%rcx)
LBB0_3:
	xorl	%eax, %eax
LBB0_4:
	movl	%eax, %edx
	shlq	$3, %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movq	%rdi, 8(%rcx,%rdx)
	movq	_file@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%esi, (%rcx,%rdx)
	movq	$0, 16(%rcx,%rdx)
	addl	$1638, %eax                     ## imm = 0x666
	popq	%rbp
	retq
LBB0_7:
	movl	$1, %eax
	jmp	LBB0_4
LBB0_9:
	movl	$2, %eax
	jmp	LBB0_4
LBB0_11:
	movl	$3, %eax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_mem_open.one,1,2 ## @mem_open.one
	.comm	_file,8,3                       ## @file
	.no_dead_strip	_mem_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mem_open
_mem_open:                              ; @mem_open
	.cfi_startproc
; %bb.0:
	adrp	x9, _mem_open.one@PAGE
	ldrb	w10, [x9, _mem_open.one@PAGEOFF]
Lloh0:
	adrp	x8, _file@GOTPAGE
Lloh1:
	ldr	x8, [x8, _file@GOTPAGEOFF]
	tbz	w10, #0, LBB0_6
; %bb.1:
	ldr	x9, [x8]
	ldr	w10, [x9]
	cbz	w10, LBB0_7
; %bb.2:
	ldr	w10, [x9, #24]
	cbz	w10, LBB0_8
; %bb.3:
	ldr	w10, [x9, #48]
	cbz	w10, LBB0_9
; %bb.4:
	ldr	w10, [x9, #72]
	cbz	w10, LBB0_10
; %bb.5:
	mov	w0, #-1
	ret
LBB0_6:
	mov	w10, #0
	mov	w11, #1
	strb	w11, [x9, _mem_open.one@PAGEOFF]
	ldr	x9, [x8]
	str	wzr, [x9]
	str	wzr, [x9, #24]
	str	wzr, [x9, #48]
	str	wzr, [x9, #72]
LBB0_7:
	mov	w11, #24
	umaddl	x9, w10, w11, x9
	str	x0, [x9, #8]
	ldr	x8, [x8]
	umaddl	x8, w10, w11, x8
	str	w1, [x8]
	str	xzr, [x8, #16]
	add	w0, w10, #1638
	ret
LBB0_8:
	mov	w10, #1
	b	LBB0_7
LBB0_9:
	mov	w10, #2
	b	LBB0_7
LBB0_10:
	mov	w10, #3
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_mem_open.one,1,2 ; @mem_open.one
	.comm	_file,8,3                       ; @file
	.no_dead_strip	_mem_open
.subsections_via_symbols
