	.file	"extr_sqrt.c_bc_sqrt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	bc_sqrt
	.type	bc_sqrt, @function
bc_sqrt:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	edi, DWORD PTR _zero_[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	BCG@PLT
	mov	rdi, QWORD PTR [r12]
	mov	rsi, rax
	call	bc_compare@PLT
	mov	r8d, eax
	xor	eax, eax
	test	r8d, r8d
	js	.L1
	je	.L21
	mov	edi, DWORD PTR _one_[rip]
	call	BCG@PLT
	mov	rdi, QWORD PTR [r12]
	mov	rsi, rax
	call	bc_compare@PLT
	mov	ebx, eax
	test	eax, eax
	je	.L22
	mov	rax, QWORD PTR [r12]
	mov	edi, ebp
	lea	rbp, 24[rsp]
	lea	r13, 32[rsp]
	lea	r14, 48[rsp]
	mov	esi, DWORD PTR [rax]
	call	MAX@PLT
	mov	rdi, rbp
	mov	DWORD PTR 8[rsp], eax
	call	bc_init_num@PLT
	mov	rdi, r13
	call	bc_init_num@PLT
	mov	rdi, r14
	call	bc_init_num@PLT
	mov	esi, 1
	mov	edi, 1
	call	bc_new_num@PLT
	mov	QWORD PTR 40[rsp], rax
	mov	rax, QWORD PTR 8[rax]
	mov	DWORD PTR 4[rax], 5
	test	ebx, ebx
	js	.L23
	mov	esi, 10
	mov	rdi, rbp
	mov	ebx, 3
	call	bc_int2num@PLT
	mov	rax, QWORD PTR [r12]
	mov	rdi, r13
	mov	esi, DWORD PTR 16[rax]
	call	bc_int2num@PLT
	mov	rsi, QWORD PTR 40[rsp]
	xor	ecx, ecx
	mov	rdx, r13
	mov	rdi, QWORD PTR 32[rsp]
	call	bc_multiply@PLT
	mov	rsi, QWORD PTR 32[rsp]
	xor	ecx, ecx
	mov	rdx, rbp
	mov	rdi, QWORD PTR 24[rsp]
	mov	DWORD PTR [rsi], 0
	call	bc_raise@PLT
	mov	rdi, r13
	call	bc_free_num@PLT
.L6:
	mov	eax, DWORD PTR 8[rsp]
	mov	edx, DWORD PTR FALSE[rip]
	lea	r15d, 1[rbx]
	add	eax, 1
	mov	DWORD PTR 12[rsp], eax
	test	edx, edx
	jne	.L8
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, r13
	call	bc_free_num@PLT
	mov	rdi, QWORD PTR 24[rsp]
	call	bc_copy_num@PLT
	mov	rsi, QWORD PTR 24[rsp]
	mov	rdi, QWORD PTR [r12]
	mov	ecx, ebx
	mov	rdx, rbp
	mov	QWORD PTR 32[rsp], rax
	call	bc_divide@PLT
	mov	rsi, QWORD PTR 32[rsp]
	xor	ecx, ecx
	mov	rdx, rbp
	mov	rdi, QWORD PTR 24[rsp]
	call	bc_add@PLT
	mov	rsi, QWORD PTR 40[rsp]
	mov	ecx, ebx
	mov	rdx, rbp
	mov	rdi, QWORD PTR 24[rsp]
	call	bc_multiply@PLT
	mov	rsi, QWORD PTR 32[rsp]
	mov	ecx, r15d
	mov	rdx, r14
	mov	rdi, QWORD PTR 24[rsp]
	call	bc_sub@PLT
	mov	rdi, QWORD PTR 48[rsp]
	mov	esi, ebx
	call	bc_is_near_zero@PLT
	test	rax, rax
	je	.L9
	cmp	DWORD PTR 8[rsp], ebx
	jge	.L24
	mov	eax, DWORD PTR TRUE[rip]
	test	eax, eax
	je	.L9
.L8:
	mov	rdi, r12
	call	bc_free_num@PLT
	mov	edi, DWORD PTR _one_[rip]
	call	BCG@PLT
	mov	ecx, DWORD PTR 8[rsp]
	mov	rdi, QWORD PTR 24[rsp]
	mov	rdx, r12
	mov	rsi, rax
	call	bc_divide@PLT
	mov	rdi, rbp
	call	bc_free_num@PLT
	mov	rdi, r13
	call	bc_free_num@PLT
	lea	rdi, 40[rsp]
	call	bc_free_num@PLT
	mov	rdi, r14
	call	bc_free_num@PLT
	mov	eax, 1
.L1:
	mov	rdx, QWORD PTR 56[rsp]
	xor	rdx, QWORD PTR fs:40
	jne	.L25
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	mov	rdi, r12
	call	bc_free_num@PLT
	mov	edi, DWORD PTR _zero_[rip]
.L19:
	call	BCG@PLT
	mov	rdi, rax
	call	bc_copy_num@PLT
	mov	QWORD PTR [r12], rax
	mov	eax, 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L23:
	mov	edi, DWORD PTR _one_[rip]
	call	BCG@PLT
	mov	rdi, rax
	call	bc_copy_num@PLT
	mov	QWORD PTR 24[rsp], rax
	mov	rax, QWORD PTR [r12]
	mov	ebx, DWORD PTR [rax]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L24:
	mov	esi, DWORD PTR 12[rsp]
	lea	edi, [rbx+rbx*2]
	call	MIN@PLT
	mov	ebx, eax
	lea	r15d, 1[rax]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rdi, r12
	call	bc_free_num@PLT
	mov	edi, DWORD PTR _one_[rip]
	jmp	.L19
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	bc_sqrt, .-bc_sqrt
	.comm	_zero_,4,4
	.comm	_one_,4,4
	.comm	TRUE,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_sqrt.c_bc_sqrt.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	bc_sqrt
	.syntax unified
	.arm
	.fpu softvfp
	.type	bc_sqrt, %function
bc_sqrt:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r4, .L25
	ldr	r3, .L25+4
	ldr	r6, [r0]
	sub	sp, sp, #24
	mov	r5, r0
	ldr	r0, [r4]
	mov	r7, r1
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	BCG
	mov	r1, r0
	mov	r0, r6
	bl	bc_compare
	cmp	r0, #0
	movlt	r0, #0
	blt	.L1
	beq	.L20
	ldr	r8, .L25+8
	ldr	r4, [r5]
	ldr	r0, [r8]
	bl	BCG
	mov	r1, r0
	mov	r0, r4
	bl	bc_compare
	subs	r4, r0, #0
	beq	.L21
	ldr	r3, [r5]
	mov	r0, r7
	ldr	r1, [r3]
	bl	MAX
	mov	r7, r0
	add	r0, sp, #4
	bl	bc_init_num
	add	r0, sp, #8
	bl	bc_init_num
	add	r0, sp, #16
	bl	bc_init_num
	mov	r1, #1
	mov	r0, r1
	bl	bc_new_num
	mov	r2, #5
	ldr	r3, [r0, #4]
	cmp	r4, #0
	str	r0, [sp, #12]
	str	r2, [r3, #4]
	blt	.L22
	mov	r1, #10
	add	r0, sp, #4
	bl	bc_int2num
	ldr	r3, [r5]
	add	r0, sp, #8
	ldr	r1, [r3, #8]
	bl	bc_int2num
	mov	r3, #0
	ldr	r1, [sp, #12]
	add	r2, sp, #8
	ldr	r0, [sp, #8]
	bl	bc_multiply
	mov	r3, #0
	ldr	r1, [sp, #8]
	add	r2, sp, #4
	str	r3, [r1]
	ldr	r0, [sp, #4]
	bl	bc_raise
	add	r0, sp, #8
	bl	bc_free_num
	mov	r4, #3
.L6:
	ldr	r3, .L25+12
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L8
	ldr	r9, .L25+16
	add	r6, r4, #1
	add	r10, r7, #1
.L9:
	add	r0, sp, #8
	bl	bc_free_num
	ldr	r0, [sp, #4]
	bl	bc_copy_num
	mov	ip, r0
	mov	r3, r4
	ldr	r1, [sp, #4]
	add	r2, sp, #4
	ldr	r0, [r5]
	str	ip, [sp, #8]
	bl	bc_divide
	ldmib	sp, {r0, r1}
	mov	r3, #0
	add	r2, sp, #4
	bl	bc_add
	mov	r3, r4
	ldr	r1, [sp, #12]
	add	r2, sp, #4
	ldr	r0, [sp, #4]
	bl	bc_multiply
	ldmib	sp, {r0, r1}
	mov	r3, r6
	add	r2, sp, #16
	bl	bc_sub
	mov	r1, r4
	ldr	r0, [sp, #16]
	bl	bc_is_near_zero
	cmp	r0, #0
	beq	.L9
	cmp	r7, r4
	bge	.L23
	ldr	r3, [r9]
	cmp	r3, #0
	beq	.L9
.L8:
	mov	r0, r5
	bl	bc_free_num
	ldr	r0, [r8]
	ldr	r4, [sp, #4]
	bl	BCG
	mov	r3, r7
	mov	r1, r0
	mov	r2, r5
	mov	r0, r4
	bl	bc_divide
	add	r0, sp, #4
	bl	bc_free_num
	add	r0, sp, #8
	bl	bc_free_num
	add	r0, sp, #12
	bl	bc_free_num
	add	r0, sp, #16
	bl	bc_free_num
	mov	r0, #1
.L1:
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L20:
	mov	r0, r5
	bl	bc_free_num
	ldr	r0, [r4]
.L18:
	bl	BCG
	bl	bc_copy_num
	mov	r3, r0
	mov	r0, #1
	str	r3, [r5]
	b	.L1
.L22:
	ldr	r0, [r8]
	bl	BCG
	bl	bc_copy_num
	ldr	r3, [r5]
	str	r0, [sp, #4]
	ldr	r4, [r3]
	b	.L6
.L23:
	add	r0, r4, r4, lsl #1
	mov	r1, r10
	bl	MIN
	mov	r4, r0
	add	r6, r0, #1
	b	.L9
.L21:
	mov	r0, r5
	bl	bc_free_num
	ldr	r0, [r8]
	b	.L18
.L24:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	_zero_
	.word	.LC0
	.word	_one_
	.word	FALSE
	.word	TRUE
	.size	bc_sqrt, .-bc_sqrt
	.comm	_zero_,4,4
	.comm	_one_,4,4
	.comm	TRUE,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
