	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_decrypt_transaction            ## -- Begin function decrypt_transaction
	.p2align	4, 0x90
_decrypt_transaction:                   ## @decrypt_transaction
	.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	%r8d, -92(%rbp)                 ## 4-byte Spill
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movl	%edx, %r15d
	movl	%esi, -96(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	16(%rbp), %rcx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%r9, -120(%rbp)                 ## 8-byte Spill
	movq	$0, (%r9)
	movl	$-1, (%rcx)
	movq	_PATH_MAX@GOTPCREL(%rip), %r13
	movl	(%r13), %r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_public_key_prefix@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%r15d, %r8d
	callq	_snprintf
	xorl	%edi, %edi
	cmpl	(%r13), %eax
	setl	%dil
	callq	_assert
	leaq	-88(%rbp), %rsi
	movq	%r14, %rdi
	callq	_stat
	testq	%rax, %rax
	js	LBB0_5
## %bb.1:
	leaq	-88(%rbp), %rsi
	movq	%r14, %rdi
	movl	$3, %edx
	callq	_check_file_permissions
	testq	%rax, %rax
	js	LBB0_6
## %bb.2:
	subq	$8, %rsp
	leaq	-112(%rbp), %r8
	leaq	-84(%rbp), %r9
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	movl	-96(%rbp), %ecx                 ## 4-byte Reload
	pushq	$1
	callq	_rsa_decrypt
	addq	$16, %rsp
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:
	movl	-84(%rbp), %ebx
	testb	$3, %bl
	je	LBB0_12
## %bb.4:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_kprintf
	movq	_COPYEXEC_ERR_ALIGN@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movl	$3, %edi
	movq	%r14, %rdx
	callq	_vkprintf
	movq	_COPYEXEC_ERR_STAT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	movq	_COPYEXEC_ERR_PUBKEY_PERMISSIONS@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_kprintf
LBB0_8:
	movq	_COPYEXEC_ERR_DECRYPT@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_24
## %bb.11:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	-112(%rbp), %r15
	cmpl	$27, %ebx
	jg	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	callq	_free
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_kprintf
	movq	_COPYEXEC_ERR_SIZE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_14:
	cmpl	16(%r15), %ebx
	jne	LBB0_19
## %bb.15:
	movl	-92(%rbp), %r14d                ## 4-byte Reload
	cmpl	%r14d, (%r15)
	movq	-104(%rbp), %r12                ## 8-byte Reload
	jne	LBB0_21
## %bb.16:
	cmpq	%r12, 8(%r15)
	jne	LBB0_22
## %bb.17:
	leal	-20(%rbx), %esi
	leaq	-80(%rbp), %r14
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_SHA1
	movl	-20(%r15,%rbx), %esi
	movq	%r14, %rdi
	movl	$20, %edx
	callq	_memcmp
	movq	-112(%rbp), %rdi
	testq	%rax, %rax
	je	LBB0_23
## %bb.18:
	callq	_free
	leaq	L_.str.8(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_kprintf
	movq	_COPYEXEC_ERR_SHA1@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_19:
	movq	%r15, %rdi
	callq	_free
	leaq	L_.str.5(%rip), %rdi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
LBB0_20:
	xorl	%eax, %eax
	callq	_kprintf
	jmp	LBB0_8
LBB0_21:
	movq	%r15, %rdi
	callq	_free
	leaq	L_.str.6(%rip), %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_kprintf
	jmp	LBB0_8
LBB0_22:
	movq	%r15, %rdi
	callq	_free
	leaq	L_.str.7(%rip), %rdi
	movq	%r12, %rsi
	jmp	LBB0_20
LBB0_23:
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movq	%rdi, (%rax)
	movl	-84(%rbp), %eax
	movq	16(%rbp), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%d"

	.comm	_public_key_prefix,8,3          ## @public_key_prefix
L_.str.1:                               ## @.str.1
	.asciz	"stat (\"%s\") failed. %m\n"

	.comm	_COPYEXEC_ERR_STAT,4,2          ## @COPYEXEC_ERR_STAT
	.comm	_COPYEXEC_ERR_PUBKEY_PERMISSIONS,4,2 ## @COPYEXEC_ERR_PUBKEY_PERMISSIONS
L_.str.2:                               ## @.str.2
	.asciz	"rsa_decrypt returns error code %d.\n"

	.comm	_COPYEXEC_ERR_DECRYPT,4,2       ## @COPYEXEC_ERR_DECRYPT
L_.str.3:                               ## @.str.3
	.asciz	"decrypted transaction len isn't aligned.\n"

	.comm	_COPYEXEC_ERR_ALIGN,4,2         ## @COPYEXEC_ERR_ALIGN
L_.str.4:                               ## @.str.4
	.asciz	"decrypted transaction len too short.\n"

	.comm	_COPYEXEC_ERR_SIZE,4,2          ## @COPYEXEC_ERR_SIZE
L_.str.5:                               ## @.str.5
	.asciz	"rsa_decrypted olen didn't match to transaction header size field (position: %lld).\n"

L_.str.6:                               ## @.str.6
	.asciz	"transaction_id didn't match, expected %d. (position: %lld).\n"

L_.str.7:                               ## @.str.7
	.asciz	"transaction pos didn't match (position: %lld).\n"

L_.str.8:                               ## @.str.8
	.asciz	"transaction sha1 didn't match (position: %lld).\n"

	.comm	_COPYEXEC_ERR_SHA1,4,2          ## @COPYEXEC_ERR_SHA1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_decrypt_transaction            ; -- Begin function decrypt_transaction
	.p2align	2
_decrypt_transaction:                   ; @decrypt_transaction
	.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
	sub	sp, sp, #48
	mov	x20, x6
	mov	x21, x5
	mov	x22, x4
	mov	x19, x3
	mov	x4, x2
	mov	x23, x1
	mov	x24, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	str	xzr, [x5]
	mov	w8, #-1
	str	w8, [x6]
Lloh3:
	adrp	x26, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x26, [x26, _PATH_MAX@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x9, x1
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x9, x9, #0x1fffffff0
	sub	x25, x8, x9
	mov	sp, x25
Lloh7:
	adrp	x8, _public_key_prefix@GOTPAGE
Lloh8:
	ldr	x8, [x8, _public_key_prefix@GOTPAGEOFF]
Lloh9:
	ldr	x3, [x8]
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x25
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_snprintf
	ldr	w8, [x26]
	cmp	w0, w8
	cset	w0, lt
	bl	_assert
	sub	x1, x29, #96
	mov	x0, x25
	bl	_stat
	tbnz	x0, #63, LBB0_5
; %bb.1:
	sub	x1, x29, #96
	mov	x0, x25
	mov	w2, #3
	bl	_check_file_permissions
	tbnz	x0, #63, LBB0_6
; %bb.2:
	sub	x4, x29, #104
	sub	x5, x29, #108
	mov	x0, x25
	mov	w1, #1
	mov	x2, x24
	mov	x3, x23
	mov	w6, #1
	bl	_rsa_decrypt
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldur	w8, [x29, #-108]
	tst	w8, #0x3
	b.eq	LBB0_12
; %bb.4:
Lloh12:
	adrp	x0, l_.str.3@PAGE
Lloh13:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_kprintf
Lloh14:
	adrp	x8, _COPYEXEC_ERR_ALIGN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _COPYEXEC_ERR_ALIGN@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #3
	mov	x2, x25
	bl	_vkprintf
Lloh18:
	adrp	x8, _COPYEXEC_ERR_STAT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _COPYEXEC_ERR_STAT@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
Lloh20:
	adrp	x8, _COPYEXEC_ERR_PUBKEY_PERMISSIONS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _COPYEXEC_ERR_PUBKEY_PERMISSIONS@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	str	x0, [sp, #-16]!
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	bl	_kprintf
	add	sp, sp, #16
Lloh24:
	adrp	x8, _COPYEXEC_ERR_DECRYPT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _COPYEXEC_ERR_DECRYPT@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
LBB0_10:
	ldur	x8, [x29, #-72]
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_23
; %bb.11:
	sub	sp, x29, #64
	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_12:
	ldur	x0, [x29, #-104]
	cmp	w8, #27
	b.gt	LBB0_14
; %bb.13:
	bl	_free
Lloh29:
	adrp	x0, l_.str.4@PAGE
Lloh30:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_kprintf
Lloh31:
	adrp	x8, _COPYEXEC_ERR_SIZE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _COPYEXEC_ERR_SIZE@GOTPAGEOFF]
	b	LBB0_9
LBB0_14:
	ldr	w9, [x0, #16]
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.15:
	ldr	w9, [x0]
	cmp	w9, w22
	b.ne	LBB0_20
; %bb.16:
	ldr	x9, [x0, #8]
	cmp	x9, x19
	b.ne	LBB0_21
; %bb.17:
	add	x22, x0, x8
	sub	w1, w8, #20
	sub	x2, x29, #92
	bl	_SHA1
	ldur	w1, [x22, #-20]
	sub	x0, x29, #92
	mov	w2, #20
	bl	_memcmp
	ldur	x8, [x29, #-104]
	cbz	x0, LBB0_22
; %bb.18:
	mov	x0, x8
	bl	_free
	str	x19, [sp, #-16]!
Lloh33:
	adrp	x0, l_.str.8@PAGE
Lloh34:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_kprintf
	add	sp, sp, #16
Lloh35:
	adrp	x8, _COPYEXEC_ERR_SHA1@GOTPAGE
Lloh36:
	ldr	x8, [x8, _COPYEXEC_ERR_SHA1@GOTPAGEOFF]
	b	LBB0_9
LBB0_19:
	bl	_free
	str	x19, [sp, #-16]!
Lloh37:
	adrp	x0, l_.str.5@PAGE
Lloh38:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_8
LBB0_20:
	bl	_free
	stp	x22, x19, [sp, #-16]!
Lloh39:
	adrp	x0, l_.str.6@PAGE
Lloh40:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_8
LBB0_21:
	bl	_free
	str	x19, [sp, #-16]!
Lloh41:
	adrp	x0, l_.str.7@PAGE
Lloh42:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_8
LBB0_22:
	str	x8, [x21]
	ldur	w8, [x29, #-108]
	str	w8, [x20]
	b	LBB0_10
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%d"

	.comm	_public_key_prefix,8,3          ; @public_key_prefix
l_.str.1:                               ; @.str.1
	.asciz	"stat (\"%s\") failed. %m\n"

	.comm	_COPYEXEC_ERR_STAT,4,2          ; @COPYEXEC_ERR_STAT
	.comm	_COPYEXEC_ERR_PUBKEY_PERMISSIONS,4,2 ; @COPYEXEC_ERR_PUBKEY_PERMISSIONS
l_.str.2:                               ; @.str.2
	.asciz	"rsa_decrypt returns error code %d.\n"

	.comm	_COPYEXEC_ERR_DECRYPT,4,2       ; @COPYEXEC_ERR_DECRYPT
l_.str.3:                               ; @.str.3
	.asciz	"decrypted transaction len isn't aligned.\n"

	.comm	_COPYEXEC_ERR_ALIGN,4,2         ; @COPYEXEC_ERR_ALIGN
l_.str.4:                               ; @.str.4
	.asciz	"decrypted transaction len too short.\n"

	.comm	_COPYEXEC_ERR_SIZE,4,2          ; @COPYEXEC_ERR_SIZE
l_.str.5:                               ; @.str.5
	.asciz	"rsa_decrypted olen didn't match to transaction header size field (position: %lld).\n"

l_.str.6:                               ; @.str.6
	.asciz	"transaction_id didn't match, expected %d. (position: %lld).\n"

l_.str.7:                               ; @.str.7
	.asciz	"transaction pos didn't match (position: %lld).\n"

l_.str.8:                               ; @.str.8
	.asciz	"transaction sha1 didn't match (position: %lld).\n"

	.comm	_COPYEXEC_ERR_SHA1,4,2          ; @COPYEXEC_ERR_SHA1
.subsections_via_symbols
