	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgp_write_pubenc_sesskey       ## -- Begin function pgp_write_pubenc_sesskey
	.p2align	4, 0x90
_pgp_write_pubenc_sesskey:              ## @pgp_write_pubenc_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	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movl	$3, -40(%rbp)
	movq	$0, -32(%rbp)
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movl	(%r15), %eax
	movl	%eax, -36(%rbp)
	movq	_PGP_PKT_PUBENCRYPTED_SESSKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-32(%rbp), %rdx
	movq	%rsi, %rdi
	movl	%eax, %esi
	callq	_pgp_create_pkt_writer
	testl	%eax, %eax
	js	LBB0_12
## %bb.3:
	movq	-32(%rbp), %rdi
	leaq	-40(%rbp), %rsi
	movl	$1, %edx
	callq	_pushf_write
	testl	%eax, %eax
	js	LBB0_12
## %bb.4:
	movq	-32(%rbp), %rdi
	movq	8(%r15), %rsi
	movl	$8, %edx
	callq	_pushf_write
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	movq	-32(%rbp), %rdi
	leaq	-36(%rbp), %rsi
	movl	$1, %edx
	callq	_pushf_write
	testl	%eax, %eax
	js	LBB0_12
## %bb.6:
	movl	-36(%rbp), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_7
## %bb.9:
	movq	-32(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_encrypt_and_write_rsa
	jmp	LBB0_10
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_px_debug
	movq	_PXE_BUG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_15
LBB0_7:
	cmpl	$130, %eax
	jne	LBB0_11
## %bb.8:
	movq	-32(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_encrypt_and_write_elgamal
LBB0_10:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
LBB0_11:
	movq	-32(%rbp), %rdi
	callq	_pushf_flush
LBB0_12:
	movl	%eax, %ebx
LBB0_13:
	movq	-32(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:
	callq	_pushf_free
LBB0_15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no pubkey?\n"

	.comm	_PXE_BUG,4,2                    ## @PXE_BUG
	.comm	_PGP_PKT_PUBENCRYPTED_SESSKEY,4,2 ## @PGP_PKT_PUBENCRYPTED_SESSKEY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgp_write_pubenc_sesskey       ; -- Begin function pgp_write_pubenc_sesskey
	.p2align	2
_pgp_write_pubenc_sesskey:              ; @pgp_write_pubenc_sesskey
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	ldr	x19, [x0]
	mov	w8, #3
	str	w8, [sp, #28]
	str	xzr, [sp, #16]
	cbz	x19, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	w8, [x19]
	str	w8, [sp, #12]
Lloh0:
	adrp	x8, _PGP_PKT_PUBENCRYPTED_SESSKEY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PGP_PKT_PUBENCRYPTED_SESSKEY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	x2, sp, #16
	mov	x0, x1
	mov	x1, x8
	bl	_pgp_create_pkt_writer
	tbnz	w0, #31, LBB0_11
; %bb.2:
	ldr	x0, [sp, #16]
	add	x1, sp, #28
	mov	w2, #1
	bl	_pushf_write
	tbnz	w0, #31, LBB0_11
; %bb.3:
	ldr	x0, [sp, #16]
	ldr	x1, [x19, #8]
	mov	w2, #8
	bl	_pushf_write
	tbnz	w0, #31, LBB0_11
; %bb.4:
	ldr	x0, [sp, #16]
	add	x1, sp, #12
	mov	w2, #1
	bl	_pushf_write
	tbnz	w0, #31, LBB0_11
; %bb.5:
	ldr	w8, [sp, #12]
	sub	w9, w8, #128
	cmp	w9, #2
	b.hs	LBB0_8
; %bb.6:
	ldr	x2, [sp, #16]
	mov	x0, x20
	mov	x1, x19
	bl	_encrypt_and_write_rsa
	mov	x21, x0
	tbz	w0, #31, LBB0_10
	b	LBB0_12
LBB0_7:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_px_debug
Lloh5:
	adrp	x8, _PXE_BUG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PXE_BUG@GOTPAGEOFF]
Lloh7:
	ldr	w21, [x8]
	b	LBB0_14
LBB0_8:
	cmp	w8, #130
	b.ne	LBB0_10
; %bb.9:
	ldr	x2, [sp, #16]
	mov	x0, x20
	mov	x1, x19
	bl	_encrypt_and_write_elgamal
	mov	x21, x0
	tbnz	w0, #31, LBB0_12
LBB0_10:
	ldr	x0, [sp, #16]
	bl	_pushf_flush
LBB0_11:
	mov	x21, x0
LBB0_12:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_14
; %bb.13:
	bl	_pushf_free
LBB0_14:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no pubkey?\n"

	.comm	_PXE_BUG,4,2                    ; @PXE_BUG
	.comm	_PGP_PKT_PUBENCRYPTED_SESSKEY,4,2 ; @PGP_PKT_PUBENCRYPTED_SESSKEY
.subsections_via_symbols
