	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_save_file
_open_save_file:                        ## @open_save_file
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_strlen
	cmpl	$4, %eax
	jl	LBB0_2
## %bb.1:
	movl	%eax, %eax
	leaq	(%rbx,%rax), %rdi
	addq	$-3, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_5
LBB0_2:
	testl	%r14d, %r14d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %rbx
	xorl	%edi, %edi
	callq	_set_cbs
	jmp	LBB0_9
LBB0_5:
	testl	%r14d, %r14d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	%rbx, %rdi
	callq	_gzopen
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%rax, %rbx
	movl	$1, %edi
	callq	_set_cbs
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.7:
	movq	_Z_DEFAULT_STRATEGY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$9, %esi
	callq	_gzsetparams
	jmp	LBB0_9
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".gz"

L_.str.1:                               ## @.str.1
	.asciz	"wb"

L_.str.2:                               ## @.str.2
	.asciz	"rb"

	.comm	_Z_DEFAULT_STRATEGY,4,2         ## @Z_DEFAULT_STRATEGY
	.no_dead_strip	_open_save_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_save_file
_open_save_file:                        ; @open_save_file
	.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, x1
	mov	x20, x0
	bl	_strlen
	cmp	w0, #4
	b.lt	LBB0_2
; %bb.1:
	add	x8, x20, w0, uxtw
	sub	x0, x8, #3
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_5
LBB0_2:
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh4:
	adrp	x9, l_.str.2@PAGE
Lloh5:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x1, x9, x8, eq
	mov	x0, x20
	bl	_fopen
	mov	x20, x0
	cbz	x0, LBB0_4
; %bb.3:
	mov	w0, #0
	bl	_set_cbs
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh6:
	adrp	x8, l_.str.1@PAGE
Lloh7:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh8:
	adrp	x9, l_.str.2@PAGE
Lloh9:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x1, x9, x8, eq
	mov	x0, x20
	bl	_gzopen
	mov	x20, x0
	cbz	x0, LBB0_4
; %bb.6:
	mov	w0, #1
	bl	_set_cbs
	cbz	w19, LBB0_4
; %bb.7:
Lloh10:
	adrp	x8, _Z_DEFAULT_STRATEGY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _Z_DEFAULT_STRATEGY@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #9
	bl	_gzsetparams
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".gz"

l_.str.1:                               ; @.str.1
	.asciz	"wb"

l_.str.2:                               ; @.str.2
	.asciz	"rb"

	.comm	_Z_DEFAULT_STRATEGY,4,2         ; @Z_DEFAULT_STRATEGY
	.no_dead_strip	_open_save_file
.subsections_via_symbols
