	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_save_key                       ## -- Begin function save_key
	.p2align	4, 0x90
_save_key:                              ## @save_key
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leal	(%r14,%r14,2), %eax
	xorl	%edi, %edi
	cmpl	$64, %eax
	setb	%dil
	callq	_assert
	movb	$0, -128(%rbp)
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.1:
	movzbl	(%r15), %edx
	leaq	L_.str(%rip), %rsi
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_sprintf
	leaq	-128(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_strcat
	cmpl	$1, %r14d
	je	LBB0_4
## %bb.2:
	movl	%r14d, %r14d
	movl	$1, %r12d
	leaq	-128(%rbp), %r13
	leaq	-64(%rbp), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcat
	movzbl	(%r15,%r12), %edx
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_sprintf
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_strcat
	incq	%r12
	cmpl	%r12d, %r14d
	jne	LBB0_3
LBB0_4:
	movq	_KEY_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_open
	movl	%eax, %r14d
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_6:
	leaq	L_.str.3(%rip), %rdi
	leaq	-128(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_printf
	movq	%rbx, %rdi
	callq	_strlen
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_write
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_8:
	leaq	-128(%rbp), %rdi
	callq	_strlen
	cmpl	%eax, %ebx
	je	LBB0_10
## %bb.9:
	leaq	-128(%rbp), %rdi
	callq	_strlen
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_errx
LBB0_10:
	movl	%r14d, %edi
	callq	_close
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%.2X"

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

	.comm	_KEY_FILE,4,2                   ## @KEY_FILE
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_CREAT,4,2                    ## @O_CREAT
L_.str.2:                               ## @.str.2
	.asciz	"open()"

L_.str.3:                               ## @.str.3
	.asciz	"\nKey: %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"write()"

L_.str.5:                               ## @.str.5
	.asciz	"write %d/%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_save_key                       ; -- Begin function save_key
	.p2align	2
_save_key:                              ; @save_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	add	w8, w1, w1, lsl #1
	cmp	w8, #64
	cset	w0, lo
	bl	_assert
	strb	wzr, [sp, #8]
	cbz	w20, LBB0_4
; %bb.1:
	sub	w21, w20, #1
	ldrb	w2, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	sub	x0, x29, #56
	bl	_sprintf
	add	x0, sp, #8
	sub	x1, x29, #56
	bl	_strcat
	cbz	w21, LBB0_4
; %bb.2:
	add	x22, x19, #1
Lloh5:
	adrp	x19, l_.str.1@PAGE
Lloh6:
	add	x19, x19, l_.str.1@PAGEOFF
Lloh7:
	adrp	x20, l_.str@PAGE
Lloh8:
	add	x20, x20, l_.str@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	mov	x1, x19
	bl	_strcat
	sub	w21, w21, #1
	ldrb	w2, [x22], #1
	sub	x0, x29, #56
	mov	x1, x20
	bl	_sprintf
	add	x0, sp, #8
	sub	x1, x29, #56
	bl	_strcat
	cbnz	w21, LBB0_3
LBB0_4:
Lloh9:
	adrp	x8, _KEY_FILE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KEY_FILE@GOTPAGEOFF]
Lloh11:
	adrp	x9, _O_WRONLY@GOTPAGE
Lloh12:
	ldr	x9, [x9, _O_WRONLY@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	ldr	w8, [x9]
Lloh15:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	w2, #420
	bl	_open
	mov	x19, x0
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	add	x1, sp, #8
	bl	_printf
	add	x0, sp, #8
	bl	_strlen
	mov	x2, x0
	add	x1, sp, #8
	mov	x0, x19
	bl	_write
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_8
; %bb.7:
Lloh22:
	adrp	x1, l_.str.4@PAGE
Lloh23:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_8:
	add	x0, sp, #8
	bl	_strlen
	cmp	w20, w0
	b.eq	LBB0_10
; %bb.9:
	add	x0, sp, #8
	bl	_strlen
	mov	x3, x0
Lloh24:
	adrp	x1, l_.str.5@PAGE
Lloh25:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	bl	_errx
LBB0_10:
	mov	x0, x19
	bl	_close
	ldur	x8, [x29, #-40]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%.2X"

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

	.comm	_KEY_FILE,4,2                   ; @KEY_FILE
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_CREAT,4,2                    ; @O_CREAT
l_.str.2:                               ; @.str.2
	.asciz	"open()"

l_.str.3:                               ; @.str.3
	.asciz	"\nKey: %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"write()"

l_.str.5:                               ; @.str.5
	.asciz	"write %d/%d\n"

.subsections_via_symbols
