	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_symenc_sesskey
_write_symenc_sesskey:                  ## @write_symenc_sesskey
	.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
	subq	$1032, %rsp                     ## imm = 0x408
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	$4, -1056(%rbp)
	movl	24(%rdi), %eax
	movl	%eax, -1052(%rbp)
	movl	8(%rdi), %eax
	movl	%eax, -1048(%rbp)
	movl	20(%rdi), %ecx
	leaq	-1040(%rbp), %r15
	movl	%ecx, -1044(%rbp)
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	movl	16(%rbx), %esi
	movq	%r15, %rdi
	movl	$8, %edx
	callq	_memcpy
	cmpl	$3, 8(%rbx)
	jne	LBB0_2
## %bb.3:
	movl	12(%rbx), %eax
	leaq	-1004(%rbp), %r15
	movl	%eax, -1008(%rbp)
LBB0_4:
	cmpq	$0, (%rbx)
	jne	LBB0_5
	jmp	LBB0_7
LBB0_2:
	leaq	-1008(%rbp), %r15
	cmpq	$0, (%rbx)
	je	LBB0_7
LBB0_5:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_symencrypt_sesskey
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.6:
	movl	%ebx, %eax
	leaq	(%r15,%rax,4), %r15
LBB0_7:
	leaq	-1056(%rbp), %rax
	subq	%rax, %r15
	shrq	$2, %r15
	movq	_PGP_PKT_SYMENCRYPTED_SESSKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_write_normal_header
	testl	%eax, %eax
	js	LBB0_9
## %bb.8:
	leaq	-1056(%rbp), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_pushf_write
LBB0_9:
	movl	%eax, %ebx
	leaq	-1056(%rbp), %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_px_memset
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%ebx, %eax
	addq	$1032, %rsp                     ## imm = 0x408
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PGP_PKT_SYMENCRYPTED_SESSKEY,4,2 ## @PGP_PKT_SYMENCRYPTED_SESSKEY
	.no_dead_strip	_write_symenc_sesskey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_symenc_sesskey
_write_symenc_sesskey:                  ; @write_symenc_sesskey
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #1040
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	mov	w8, #4
	ldp	w10, w9, [x0, #20]
	stp	w8, w9, [sp, #8]
	ldr	w8, [x0, #8]
	add	x22, sp, #8
	add	x21, x22, #16
	stp	w8, w10, [sp, #16]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	ldr	w1, [x20, #16]
	mov	x0, x21
	mov	w2, #8
	bl	_memcpy
	ldr	w8, [x20, #8]
	cmp	w8, #3
	b.ne	LBB0_4
; %bb.2:
	ldr	w8, [x20, #12]
	add	x9, sp, #8
	add	x21, x9, #52
	str	w8, [sp, #56]
LBB0_3:
	ldr	x8, [x20]
	cbnz	x8, LBB0_5
	b	LBB0_7
LBB0_4:
	add	x21, x22, #48
	ldr	x8, [x20]
	cbz	x8, LBB0_7
LBB0_5:
	mov	x0, x20
	mov	x1, x21
	bl	_symencrypt_sesskey
	mov	x20, x0
	tbnz	w0, #31, LBB0_10
; %bb.6:
	add	x21, x21, w20, uxtw #2
LBB0_7:
	add	x8, sp, #8
	sub	x8, x21, x8
	lsr	x21, x8, #2
Lloh3:
	adrp	x8, _PGP_PKT_SYMENCRYPTED_SESSKEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PGP_PKT_SYMENCRYPTED_SESSKEY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_write_normal_header
	tbnz	w0, #31, LBB0_9
; %bb.8:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x21
	bl	_pushf_write
LBB0_9:
	mov	x20, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	x2, x21
	bl	_px_memset
LBB0_10:
	ldur	x8, [x29, #-56]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x20
	add	sp, sp, #1040
	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
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PGP_PKT_SYMENCRYPTED_SESSKEY,4,2 ; @PGP_PKT_SYMENCRYPTED_SESSKEY
	.no_dead_strip	_write_symenc_sesskey
.subsections_via_symbols
