	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_decrypt_buf                    ## -- Begin function decrypt_buf
	.p2align	4, 0x90
_decrypt_buf:                           ## @decrypt_buf
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ENC_MAGIC_LEN@GOTPCREL(%rip), %r14
	movslq	(%r14), %r12
	movl	$-1, %r15d
	cmpq	%rdx, %r12
	ja	LBB0_13
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_check_magic
	testl	%eax, %eax
	jne	LBB0_13
## %bb.2:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rdi
	movl	(%r14), %edx
	movq	%r13, %rsi
	callq	_memcpy
	cmpq	%rbx, %r12
	je	LBB0_3
## %bb.4:
	movb	(%r13,%r12), %al
	movb	%al, 8(%r15)
	movq	%r12, %rax
	notq	%rax
	addq	%rbx, %rax
	cmpq	$4, %rax
	jae	LBB0_6
LBB0_3:
	movl	$-1, %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%r13), %rbx
	incq	%rbx
	movq	%rbx, %rdi
	callq	_get_be32
	movq	%rax, %r14
	movq	_ENC_PRODUCT_LEN@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	movl	$-1, %r15d
	jl	LBB0_13
## %bb.7:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addq	$-4, %rcx
	movslq	%r14d, %r12
	subq	%r12, %rcx
	jb	LBB0_13
## %bb.8:
	leaq	4(%rbx), %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rdi
	movl	%r14d, %edx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	callq	_memcpy
	cmpq	$4, -48(%rbp)                   ## 8-byte Folded Reload
	jb	LBB0_13
## %bb.9:
	addq	%r12, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_get_be32
	movq	_ENC_VERSION_LEN@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	jl	LBB0_13
## %bb.10:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addq	$-4, %rcx
	movslq	%eax, %r12
	subq	%r12, %rcx
	jb	LBB0_13
## %bb.11:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	addq	$4, %rbx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	24(%rdx), %rdi
	movq	%rbx, %rsi
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdx
                                        ## kill: def $edx killed $edx killed $rdx
	movq	%rcx, %r14
	callq	_memcpy
	movq	%r14, %rax
	cmpq	$4, %r14
	jb	LBB0_13
## %bb.12:
	leaq	(%rbx,%r12), %rdi
	callq	_get_be32
	movq	%r14, %rcx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, 32(%r14)
	addq	$-4, %rcx
	movslq	%eax, %rdx
	subq	%rdx, %rcx
	jb	LBB0_13
## %bb.14:
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	addq	%r12, %rbx
	addq	$4, %rbx
	movq	24(%r14), %rcx
	movzbl	(%rcx), %edi
	movl	44(%r14), %esi
	movl	40(%r14), %r9d
	movq	%rbx, %rdx
	movq	%r13, %rcx
	movl	%eax, %r8d
	callq	_bcrypt_buf
	testl	%eax, %eax
	jne	LBB0_13
## %bb.15:
	cmpq	$4, -48(%rbp)                   ## 8-byte Folded Reload
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	jb	LBB0_13
## %bb.16:
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_get_be32
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 36(%rbx)
	movl	32(%rbx), %edi
	movq	%r13, %rsi
	movl	%edi, %edx
	callq	_buffalo_csum
	cmpl	36(%rbx), %eax
	jne	LBB0_13
## %bb.17:
	movq	16(%rbx), %rax
	movq	24(%rbx), %rcx
	movzbl	(%rax), %edi
	movl	44(%rbx), %esi
	movl	40(%rbx), %r9d
	movq	%rcx, %rdx
	movq	-80(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_bcrypt_buf
	testl	%eax, %eax
	jne	LBB0_13
## %bb.18:
	movzbl	8(%rbx), %edi
	movl	44(%rbx), %esi
	movq	16(%rbx), %rcx
	movl	40(%rbx), %r9d
	movq	%rcx, %rdx
	movq	-72(%rbp), %r8                  ## 8-byte Reload
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_bcrypt_buf
	xorl	%r15d, %r15d
	negl	%eax
	sbbl	%r15d, %r15d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ENC_MAGIC_LEN,4,2              ## @ENC_MAGIC_LEN
	.comm	_ENC_PRODUCT_LEN,4,2            ## @ENC_PRODUCT_LEN
	.comm	_ENC_VERSION_LEN,4,2            ## @ENC_VERSION_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_decrypt_buf                    ; -- Begin function decrypt_buf
	.p2align	2
_decrypt_buf:                           ; @decrypt_buf
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x22, _ENC_MAGIC_LEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ENC_MAGIC_LEN@GOTPAGEOFF]
	ldrsw	x23, [x22]
	cmp	x23, x2
	b.hi	LBB0_11
; %bb.1:
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_check_magic
	cbnz	w0, LBB0_11
; %bb.2:
	ldr	x0, [x19]
	ldr	w2, [x22]
	mov	x1, x20
	bl	_memcpy
	cmp	x23, x21
	b.eq	LBB0_11
; %bb.3:
	add	x22, x20, x23
	ldrb	w8, [x22], #1
	strb	w8, [x19, #8]
	mvn	x8, x23
	add	x8, x8, x21
	subs	x23, x8, #4
	b.lo	LBB0_11
; %bb.4:
	mov	x0, x22
	bl	_get_be32
	mov	x21, x0
Lloh2:
	adrp	x8, _ENC_PRODUCT_LEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENC_PRODUCT_LEN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w21
	b.lt	LBB0_11
; %bb.5:
	sxtw	x25, w21
	subs	x23, x23, x25
	b.lo	LBB0_11
; %bb.6:
	add	x22, x22, #4
	ldr	x0, [x19, #16]
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
	subs	x24, x23, #4
	b.lo	LBB0_11
; %bb.7:
	add	x23, x22, x25
	mov	x0, x23
	bl	_get_be32
	mov	x22, x0
Lloh5:
	adrp	x8, _ENC_VERSION_LEN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENC_VERSION_LEN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w22
	b.lt	LBB0_11
; %bb.8:
	sxtw	x25, w22
	subs	x24, x24, x25
	b.lo	LBB0_11
; %bb.9:
	add	x23, x23, #4
	ldr	x0, [x19, #24]
	mov	x1, x23
	mov	x2, x22
	bl	_memcpy
	subs	x26, x24, #4
	b.lo	LBB0_11
; %bb.10:
	add	x23, x23, x25
	mov	x0, x23
	bl	_get_be32
	mov	x4, x0
	str	w4, [x19, #32]
	sxtw	x24, w0
	subs	x25, x26, x24
	b.hs	LBB0_13
LBB0_11:
	mov	w0, #-1
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	add	x23, x23, #4
	ldr	x8, [x19, #24]
	ldrb	w0, [x8]
	ldp	w5, w1, [x19, #40]
	mov	x2, x23
	mov	x3, x20
                                        ; kill: def $w4 killed $w4 killed $x4
	bl	_bcrypt_buf
	mov	x8, x0
	mov	w0, #-1
	cbnz	w8, LBB0_12
; %bb.14:
	cmp	x25, #4
	b.lo	LBB0_12
; %bb.15:
	add	x0, x23, x24
	bl	_get_be32
	str	w0, [x19, #36]
	ldr	w0, [x19, #32]
	mov	x1, x20
	mov	x2, x0
	bl	_buffalo_csum
	ldr	w8, [x19, #36]
	cmp	w0, w8
	b.ne	LBB0_11
; %bb.16:
	ldp	x8, x2, [x19, #16]
	ldrb	w0, [x8]
	ldp	w5, w1, [x19, #40]
	mov	x3, x2
	mov	x4, x22
	bl	_bcrypt_buf
	cbnz	w0, LBB0_11
; %bb.17:
	ldrb	w0, [x19, #8]
	ldr	x2, [x19, #16]
	ldp	w5, w1, [x19, #40]
	mov	x3, x2
	mov	x4, x21
	bl	_bcrypt_buf
	cmp	w0, #0
	csetm	w0, ne
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENC_MAGIC_LEN,4,2              ; @ENC_MAGIC_LEN
	.comm	_ENC_PRODUCT_LEN,4,2            ; @ENC_PRODUCT_LEN
	.comm	_ENC_VERSION_LEN,4,2            ; @ENC_VERSION_LEN
.subsections_via_symbols
