	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function secp256k1_scratch_create
_secp256k1_scratch_create:              ## @secp256k1_scratch_create
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	_ALIGNMENT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	leaq	23(%rcx), %r15
	movq	%r15, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_3
LBB0_1:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_3:
	subq	%rdx, %r15
	leaq	(%r15,%r14), %rsi
	callq	_checked_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	%rbx, %rax
	addq	%r15, %rax
	movq	%rax, 8(%rbx)
	movq	%r14, (%rbx)
LBB0_5:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ALIGNMENT,4,2                  ## @ALIGNMENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"scratch"

	.no_dead_strip	_secp256k1_scratch_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function secp256k1_scratch_create
_secp256k1_scratch_create:              ; @secp256k1_scratch_create
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
Lloh0:
	adrp	x8, _ALIGNMENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ALIGNMENT@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	add	x9, x8, #23
	udiv	x9, x9, x8
	mul	x21, x9, x8
	add	x1, x21, x1
	bl	_checked_malloc
	mov	x20, x0
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w0, [x20, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #8
	bl	_memcpy
	add	x8, x20, x21
	stp	x19, x8, [x20]
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ALIGNMENT,4,2                  ; @ALIGNMENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"scratch"

	.no_dead_strip	_secp256k1_scratch_create
.subsections_via_symbols
