	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ec_GF2m_simple_point2oct       ## -- Begin function ec_GF2m_simple_point2oct
	.p2align	4, 0x90
_ec_GF2m_simple_point2oct:              ## @ec_GF2m_simple_point2oct
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_POINT_CONVERSION_COMPRESSED@GOTPCREL(%rip), %r13
	movq	_POINT_CONVERSION_UNCOMPRESSED@GOTPCREL(%rip), %rdx
	movq	_POINT_CONVERSION_HYBRID@GOTPCREL(%rip), %rax
	cmpb	%bl, (%r13)
	je	LBB0_5
## %bb.1:
	cmpb	%bl, (%rdx)
	je	LBB0_5
## %bb.2:
	cmpb	%bl, (%rax)
	je	LBB0_5
## %bb.3:
	movq	_EC_F_EC_GF2M_SIMPLE_POINT2OCT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EC_R_INVALID_FORM@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	callq	_ECerr
	xorl	%edi, %edi
LBB0_41:
	callq	_BN_CTX_free
LBB0_42:
	xorl	%r13d, %r13d
LBB0_43:
	movq	%r13, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_EC_POINT_is_at_infinity
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movl	$1, %r13d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_43
## %bb.7:
	testq	%r15, %r15
	je	LBB0_8
## %bb.9:
	movb	$0, (%rax)
	jmp	LBB0_43
LBB0_10:
	movq	%r14, %rdi
	callq	_EC_GROUP_get_degree
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %ecx
	addl	$14, %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$3, %eax
	movslq	%eax, %rcx
	leaq	1(%rcx), %rax
	cmpb	%bl, (%r13)
	leaq	1(%rcx,%rcx), %r13
	cmoveq	%rax, %r13
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_11
## %bb.12:
	cmpq	%r15, %r13
	jbe	LBB0_14
## %bb.13:
	movq	_EC_F_EC_GF2M_SIMPLE_POINT2OCT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EC_R_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_8:
	movq	_EC_F_EC_GF2M_SIMPLE_POINT2OCT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EC_R_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
	jmp	LBB0_42
LBB0_11:
	xorl	%edi, %edi
	callq	_BN_CTX_free
	jmp	LBB0_43
LBB0_14:
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	testq	%r15, %r15
	je	LBB0_16
## %bb.15:
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_16:
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_42
LBB0_17:
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%r15, %rdi
	callq	_BN_CTX_start
	movq	%r15, %rdi
	callq	_BN_CTX_get
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_BN_CTX_get
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_BN_CTX_get
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_40
## %bb.18:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%r15, %r8
	callq	_EC_POINT_get_affine_coordinates
	testl	%eax, %eax
	je	LBB0_40
## %bb.19:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movb	%bl, (%rax)
	movq	_POINT_CONVERSION_UNCOMPRESSED@GOTPCREL(%rip), %rax
	cmpb	%bl, (%rax)
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_24
## %bb.20:
	movq	%r15, %rdi
	callq	_BN_is_zero
	testl	%eax, %eax
	je	LBB0_21
LBB0_24:
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	leaq	(%r14,%r14), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_BN_num_bytes
	movq	%r14, %rcx
	cmpq	%r14, %rax
	ja	LBB0_39
## %bb.25:
	movq	%rax, %r14
	movl	$1, %r12d
	je	LBB0_27
## %bb.26:
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	subq	%r14, %rsi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	1(%rax), %rdi
	callq	___bzero
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	subq	%r14, %r12
LBB0_27:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r12), %rsi
	movq	%r15, %rdi
	callq	_BN_bn2bin
	addq	%rax, %r12
	cmpq	-56(%rbp), %r12                 ## 8-byte Folded Reload
	jne	LBB0_39
## %bb.28:
	movq	%rax, %r15
	movq	_POINT_CONVERSION_UNCOMPRESSED@GOTPCREL(%rip), %rax
	cmpb	%bl, (%rax)
	je	LBB0_31
## %bb.29:
	movq	_POINT_CONVERSION_HYBRID@GOTPCREL(%rip), %rax
	cmpb	%bl, (%rax)
	je	LBB0_31
## %bb.30:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_36
LBB0_21:
	movq	(%r14), %rax
	movq	%r14, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%r15, %rcx
	movq	%r15, %r14
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %r8
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_40
## %bb.22:
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_is_odd
	testq	%rax, %rax
	movq	%r14, %r15
	je	LBB0_24
## %bb.23:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incb	(%rax)
	jmp	LBB0_24
LBB0_31:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_num_bytes
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	cmpq	%rsi, %rax
	ja	LBB0_39
## %bb.32:
	jne	LBB0_34
## %bb.33:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_35
LBB0_34:
	movq	%rax, %rbx
	subq	%rax, %rsi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	%r12, %rdi
	callq	___bzero
	movq	%r12, %rsi
	addq	-80(%rbp), %r15                 ## 8-byte Folded Reload
	addq	%rbx, %r14
	subq	%r14, %r15
	incq	%r15
LBB0_35:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addq	%r15, %rsi
	callq	_BN_bn2bin
	addq	%rax, %r15
LBB0_36:
	cmpq	%r13, %r15
	jne	LBB0_39
## %bb.37:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_CTX_end
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_BN_CTX_free
	jmp	LBB0_43
LBB0_39:
	movq	_EC_F_EC_GF2M_SIMPLE_POINT2OCT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
	movq	-72(%rbp), %r15                 ## 8-byte Reload
LBB0_40:
	movq	%r15, %rdi
	callq	_BN_CTX_end
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	jmp	LBB0_41
	.cfi_endproc
                                        ## -- End function
	.comm	_POINT_CONVERSION_COMPRESSED,1,0 ## @POINT_CONVERSION_COMPRESSED
	.comm	_POINT_CONVERSION_UNCOMPRESSED,1,0 ## @POINT_CONVERSION_UNCOMPRESSED
	.comm	_POINT_CONVERSION_HYBRID,1,0    ## @POINT_CONVERSION_HYBRID
	.comm	_EC_F_EC_GF2M_SIMPLE_POINT2OCT,4,2 ## @EC_F_EC_GF2M_SIMPLE_POINT2OCT
	.comm	_EC_R_INVALID_FORM,4,2          ## @EC_R_INVALID_FORM
	.comm	_EC_R_BUFFER_TOO_SMALL,4,2      ## @EC_R_BUFFER_TOO_SMALL
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ## @ERR_R_INTERNAL_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ec_GF2m_simple_point2oct       ; -- Begin function ec_GF2m_simple_point2oct
	.p2align	2
_ec_GF2m_simple_point2oct:              ; @ec_GF2m_simple_point2oct
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x20, _POINT_CONVERSION_COMPRESSED@GOTPAGE
Lloh1:
	ldr	x20, [x20, _POINT_CONVERSION_COMPRESSED@GOTPAGEOFF]
	ldrb	w8, [x20]
Lloh2:
	adrp	x26, _POINT_CONVERSION_UNCOMPRESSED@GOTPAGE
Lloh3:
	ldr	x26, [x26, _POINT_CONVERSION_UNCOMPRESSED@GOTPAGEOFF]
	ldrb	w9, [x26]
Lloh4:
	adrp	x24, _POINT_CONVERSION_HYBRID@GOTPAGE
Lloh5:
	ldr	x24, [x24, _POINT_CONVERSION_HYBRID@GOTPAGEOFF]
	ldrb	w10, [x24]
	cmp	w8, w2
	ccmp	w9, w2, #4, ne
	ccmp	w10, w2, #4, ne
	b.ne	LBB0_5
; %bb.1:
	mov	x19, x5
	mov	x22, x4
	mov	x21, x3
	mov	x23, x2
	mov	x27, x1
	mov	x25, x0
	bl	_EC_POINT_is_at_infinity
	cbz	x0, LBB0_10
; %bb.2:
	cbz	x21, LBB0_13
; %bb.3:
	cbz	x22, LBB0_14
; %bb.4:
	strb	wzr, [x21]
	mov	w20, #1
	b	LBB0_9
LBB0_5:
Lloh6:
	adrp	x8, _EC_F_EC_GF2M_SIMPLE_POINT2OCT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EC_F_EC_GF2M_SIMPLE_POINT2OCT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _EC_R_INVALID_FORM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EC_R_INVALID_FORM@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	bl	_ECerr
	mov	x22, #0
LBB0_7:
	mov	x0, x22
	bl	_BN_CTX_free
LBB0_8:
	mov	x20, #0
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_10:
	mov	x0, x25
	bl	_EC_GROUP_get_degree
	add	w8, w0, #7
	add	w9, w0, #14
	cmp	w8, #0
	csel	w10, w9, w8, lt
	sbfx	x28, x10, #3, #29
	ldrb	w8, [x20]
	mov	w9, #1
	bfi	x9, x28, #1, #63
	cmp	w8, w23
	csinc	x20, x9, x28, ne
	cbz	x21, LBB0_15
; %bb.11:
	cmp	x20, x22
	b.ls	LBB0_17
; %bb.12:
Lloh11:
	adrp	x8, _EC_F_EC_GF2M_SIMPLE_POINT2OCT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EC_F_EC_GF2M_SIMPLE_POINT2OCT@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _EC_R_BUFFER_TOO_SMALL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EC_R_BUFFER_TOO_SMALL@GOTPAGEOFF]
	b	LBB0_6
LBB0_13:
	mov	w20, #1
	b	LBB0_9
LBB0_14:
Lloh16:
	adrp	x8, _EC_F_EC_GF2M_SIMPLE_POINT2OCT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EC_F_EC_GF2M_SIMPLE_POINT2OCT@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x8, _EC_R_BUFFER_TOO_SMALL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EC_R_BUFFER_TOO_SMALL@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_ECerr
	b	LBB0_8
LBB0_15:
	mov	x22, #0
LBB0_16:
	mov	x0, x22
	bl	_BN_CTX_free
	b	LBB0_9
LBB0_17:
	str	x10, [sp, #8]                   ; 8-byte Folded Spill
	cbz	x19, LBB0_19
; %bb.18:
	mov	x22, #0
	b	LBB0_20
LBB0_19:
	bl	_BN_CTX_new
	mov	x22, x0
	mov	x19, x0
	cbz	x0, LBB0_8
LBB0_20:
	mov	x0, x19
	bl	_BN_CTX_start
	mov	x0, x19
	bl	_BN_CTX_get
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	mov	x0, x19
	bl	_BN_CTX_get
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	mov	x0, x19
	bl	_BN_CTX_get
	str	x0, [sp]                        ; 8-byte Folded Spill
	cbz	x0, LBB0_38
; %bb.21:
	mov	x0, x25
	mov	x1, x27
	ldp	x3, x2, [sp, #16]               ; 16-byte Folded Reload
	mov	x4, x19
	bl	_EC_POINT_get_affine_coordinates
	cbz	w0, LBB0_38
; %bb.22:
	strb	w23, [x21]
	ldrb	w8, [x26]
	cmp	w8, w23
	ldr	x27, [sp, #24]                  ; 8-byte Folded Reload
	b.eq	LBB0_24
; %bb.23:
	mov	x0, x27
	bl	_BN_is_zero
	cbz	w0, LBB0_39
LBB0_24:
	mov	x0, x27
	bl	_BN_num_bytes
	cmp	x0, x28
	b.hi	LBB0_37
; %bb.25:
	mov	x25, x0
	add	x27, x28, #1
	str	x0, [sp]                        ; 8-byte Folded Spill
	b.ne	LBB0_27
; %bb.26:
	mov	w25, #1
	b	LBB0_28
LBB0_27:
	sub	x1, x28, x25
	add	x0, x21, #1
	bl	_bzero
	sub	x25, x27, x25
LBB0_28:
	add	x1, x21, x25
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_BN_bn2bin
	add	x8, x0, x25
	cmp	x8, x27
	ldr	x25, [sp]                       ; 8-byte Folded Reload
	b.ne	LBB0_37
; %bb.29:
	ldrb	w8, [x26]
	cmp	w8, w23
	b.eq	LBB0_31
; %bb.30:
	ldrb	w8, [x24]
	cmp	w8, w23
	b.ne	LBB0_35
LBB0_31:
	mov	x24, x0
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_BN_num_bytes
	cmp	x0, x28
	b.hi	LBB0_37
; %bb.32:
	b.eq	LBB0_34
; %bb.33:
	mov	x23, x0
	mov	x9, x24
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	asr	w8, w8, #3
	sbfiz	x24, x8, #1, #32
	sub	x1, x28, x0
	mov	x26, x9
	add	x0, x21, x27
	bl	_bzero
	add	x8, x26, x24
	add	x9, x25, x23
	sub	x8, x8, x9
	add	x27, x8, #1
LBB0_34:
	add	x1, x21, x27
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_BN_bn2bin
	add	x27, x0, x27
LBB0_35:
	cmp	x27, x20
	b.ne	LBB0_37
; %bb.36:
	mov	x0, x19
	bl	_BN_CTX_end
	b	LBB0_16
LBB0_37:
Lloh22:
	adrp	x8, _EC_F_EC_GF2M_SIMPLE_POINT2OCT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EC_F_EC_GF2M_SIMPLE_POINT2OCT@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x8, _ERR_R_INTERNAL_ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ERR_R_INTERNAL_ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	bl	_ECerr
LBB0_38:
	mov	x0, x19
	bl	_BN_CTX_end
	b	LBB0_7
LBB0_39:
	ldr	x8, [x25]
	ldr	x8, [x8]
	mov	x0, x25
	ldr	x1, [sp]                        ; 8-byte Folded Reload
	ldr	x2, [sp, #16]                   ; 8-byte Folded Reload
	mov	x3, x27
	mov	x4, x19
	blr	x8
	cbz	w0, LBB0_38
; %bb.40:
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_BN_is_odd
	cbz	x0, LBB0_24
; %bb.41:
	ldrb	w8, [x21]
	add	w8, w8, #1
	strb	w8, [x21]
	b	LBB0_24
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_POINT_CONVERSION_COMPRESSED,1,0 ; @POINT_CONVERSION_COMPRESSED
	.comm	_POINT_CONVERSION_UNCOMPRESSED,1,0 ; @POINT_CONVERSION_UNCOMPRESSED
	.comm	_POINT_CONVERSION_HYBRID,1,0    ; @POINT_CONVERSION_HYBRID
	.comm	_EC_F_EC_GF2M_SIMPLE_POINT2OCT,4,2 ; @EC_F_EC_GF2M_SIMPLE_POINT2OCT
	.comm	_EC_R_INVALID_FORM,4,2          ; @EC_R_INVALID_FORM
	.comm	_EC_R_BUFFER_TOO_SMALL,4,2      ; @EC_R_BUFFER_TOO_SMALL
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ; @ERR_R_INTERNAL_ERROR
.subsections_via_symbols
