	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_secp256k1_ec_pubkey_serialize  ## -- Begin function secp256k1_ec_pubkey_serialize
	.p2align	4, 0x90
_secp256k1_ec_pubkey_serialize:         ## @secp256k1_ec_pubkey_serialize
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movq	%rcx, %rbx
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rax
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_VERIFY_CHECK
	xorl	%edi, %edi
	testq	%r12, %r12
	setne	%dil
	callq	_ARG_CHECK
	movq	_SECP256K1_FLAGS_BIT_COMPRESSION@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	movl	(%rcx), %ecx
	andl	%r14d, %ecx
	sete	%al
	shlq	$5, %rax
	addq	$33, %rax
	xorl	%edi, %edi
	cmpq	%rax, (%r12)
	setae	%dil
	callq	_ARG_CHECK
	movq	(%r12), %r13
	movq	%r13, -56(%rbp)
	movq	$0, (%r12)
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_ARG_CHECK
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_memset
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_ARG_CHECK
	movq	_SECP256K1_FLAGS_TYPE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	movq	_SECP256K1_FLAGS_TYPE_COMPRESSION@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	sete	%dil
	callq	_ARG_CHECK
	leaq	-44(%rbp), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_secp256k1_pubkey_load
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_SECP256K1_FLAGS_BIT_COMPRESSION@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	leaq	-44(%rbp), %rdi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rsi
	movl	%r14d, %ecx
	callq	_secp256k1_eckey_pubkey_serialize
	testl	%eax, %eax
	movl	$0, %ecx
	je	LBB0_4
## %bb.3:
	movq	-56(%rbp), %rcx
	movq	%rcx, (%r12)
	movl	%eax, %ecx
	jmp	LBB0_4
LBB0_1:
	xorl	%ecx, %ecx
LBB0_4:
	movl	%ecx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SECP256K1_FLAGS_BIT_COMPRESSION,4,2 ## @SECP256K1_FLAGS_BIT_COMPRESSION
	.comm	_SECP256K1_FLAGS_TYPE_MASK,4,2  ## @SECP256K1_FLAGS_TYPE_MASK
	.comm	_SECP256K1_FLAGS_TYPE_COMPRESSION,4,2 ## @SECP256K1_FLAGS_TYPE_COMPRESSION
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_secp256k1_ec_pubkey_serialize  ; -- Begin function secp256k1_ec_pubkey_serialize
	.p2align	2
_secp256k1_ec_pubkey_serialize:         ; @secp256k1_ec_pubkey_serialize
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x4
	mov	x22, x3
	mov	x19, x2
	mov	x20, x1
	mov	x23, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_VERIFY_CHECK
	cmp	x19, #0
	cset	w0, ne
	bl	_ARG_CHECK
	ldr	x8, [x19]
Lloh0:
	adrp	x25, _SECP256K1_FLAGS_BIT_COMPRESSION@GOTPAGE
Lloh1:
	ldr	x25, [x25, _SECP256K1_FLAGS_BIT_COMPRESSION@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w21
	mov	w9, #33
	mov	w10, #65
	csel	x9, x10, x9, eq
	cmp	x8, x9
	cset	w0, hs
	bl	_ARG_CHECK
	ldr	x24, [x19]
	str	x24, [sp]
	str	xzr, [x19]
	cmp	x20, #0
	cset	w0, ne
	bl	_ARG_CHECK
	mov	x0, x20
	mov	w1, #0
	mov	x2, x24
	bl	_memset
	cmp	x22, #0
	cset	w0, ne
	bl	_ARG_CHECK
Lloh2:
	adrp	x8, _SECP256K1_FLAGS_TYPE_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SECP256K1_FLAGS_TYPE_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w8, w8, w21
Lloh5:
	adrp	x9, _SECP256K1_FLAGS_TYPE_COMPRESSION@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SECP256K1_FLAGS_TYPE_COMPRESSION@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, eq
	bl	_ARG_CHECK
	add	x1, sp, #12
	mov	x0, x23
	mov	x2, x22
	bl	_secp256k1_pubkey_load
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x25]
	and	w3, w8, w21
	add	x0, sp, #12
	mov	x2, sp
	mov	x1, x20
	bl	_secp256k1_eckey_pubkey_serialize
	cbz	w0, LBB0_3
; %bb.2:
	ldr	x8, [sp]
	str	x8, [x19]
LBB0_3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SECP256K1_FLAGS_BIT_COMPRESSION,4,2 ; @SECP256K1_FLAGS_BIT_COMPRESSION
	.comm	_SECP256K1_FLAGS_TYPE_MASK,4,2  ; @SECP256K1_FLAGS_TYPE_MASK
	.comm	_SECP256K1_FLAGS_TYPE_COMPRESSION,4,2 ; @SECP256K1_FLAGS_TYPE_COMPRESSION
.subsections_via_symbols
