	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function crypt_file
_crypt_file:                            ## @crypt_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ifname@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_get_file_size
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r14
	movl	(%r15), %edi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	callq	_read_file_to_buf
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	(%r15), %esi
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_9
LBB0_1:
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_ERR
	jmp	LBB0_10
LBB0_6:
	movq	_do_decrypt@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_crypt_key1@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_crypt_key2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	cmovel	%ecx, %edx
	cmovel	%eax, %ecx
	movq	%r14, %rdi
	movl	$512, %esi                      ## imm = 0x200
	callq	_crypt_header
	movq	_ofname@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_write_buf_to_file
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	(%r15), %esi
	leaq	L_.str.3(%rip), %rdi
LBB0_9:
	xorl	%eax, %eax
	callq	_ERR
LBB0_10:
	movl	$-1, %ebx
LBB0_11:
	movq	%r14, %rdi
	callq	_free
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ifname,4,2                     ## @ifname
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to get size of '%s'"

L_.str.1:                               ## @.str.1
	.asciz	"no memory for the buffer"

L_.str.2:                               ## @.str.2
	.asciz	"unable to read from file '%s'"

	.comm	_do_decrypt,8,3                 ## @do_decrypt
	.comm	_crypt_key2,4,2                 ## @crypt_key2
	.comm	_crypt_key1,4,2                 ## @crypt_key1
	.comm	_ofname,4,2                     ## @ofname
L_.str.3:                               ## @.str.3
	.asciz	"unable to write to file '%s'"

	.no_dead_strip	_crypt_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function crypt_file
_crypt_file:                            ; @crypt_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x21, _ifname@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ifname@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_get_file_size
	tbnz	x0, #63, LBB0_4
; %bb.1:
	mov	x20, x0
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w0, [x21]
	mov	x1, x19
	mov	x2, x20
	bl	_read_file_to_buf
	cbz	w0, LBB0_6
; %bb.3:
	ldr	w8, [x21]
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_4:
	ldr	w8, [x21]
	str	x8, [sp]
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ERR
	mov	x19, #0
	b	LBB0_9
LBB0_5:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_6:
Lloh8:
	adrp	x8, _do_decrypt@GOTPAGE
Lloh9:
	ldr	x8, [x8, _do_decrypt@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _crypt_key1@GOTPAGE
Lloh12:
	ldr	x9, [x9, _crypt_key1@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _crypt_key2@GOTPAGE
Lloh15:
	ldr	x10, [x10, _crypt_key2@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	cmp	x8, #0
	csel	w2, w9, w10, eq
	csel	w3, w10, w9, eq
	mov	x0, x19
	mov	w1, #512
	bl	_crypt_header
Lloh17:
	adrp	x21, _ofname@GOTPAGE
Lloh18:
	ldr	x21, [x21, _ofname@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x19
	mov	x2, x20
	bl	_write_buf_to_file
	cbz	w0, LBB0_11
; %bb.7:
	ldr	w8, [x21]
	str	x8, [sp]
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_8:
	bl	_ERR
LBB0_9:
	mov	w20, #-1
LBB0_10:
	mov	x0, x19
	bl	_free
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
LBB0_11:
	mov	w20, #0
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ifname,4,2                     ; @ifname
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to get size of '%s'"

l_.str.1:                               ; @.str.1
	.asciz	"no memory for the buffer"

l_.str.2:                               ; @.str.2
	.asciz	"unable to read from file '%s'"

	.comm	_do_decrypt,8,3                 ; @do_decrypt
	.comm	_crypt_key2,4,2                 ; @crypt_key2
	.comm	_crypt_key1,4,2                 ; @crypt_key1
	.comm	_ofname,4,2                     ; @ofname
l_.str.3:                               ; @.str.3
	.asciz	"unable to write to file '%s'"

	.no_dead_strip	_crypt_file
.subsections_via_symbols
