	.file	"117329117.c"
	.intel_syntax noprefix
	.text
	.globl	cell
	.bss
	.align 8
	.type	cell, @object
	.size	cell, 8
cell:
	.zero	8
	.globl	start
	.align 8
	.type	start, @object
	.size	start, 8
start:
	.zero	8
	.globl	end
	.align 8
	.type	end, @object
	.size	end, 8
end:
	.zero	8
	.globl	m
	.align 4
	.type	m, @object
	.size	m, 4
m:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.text
	.globl	make_grid
	.type	make_grid, @function
make_grid:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	movsd	QWORD PTR -32[rbp], xmm0
	movsd	xmm1, QWORD PTR -32[rbp]
	movsd	xmm0, QWORD PTR .LC0[rip]
	mulsd	xmm0, xmm1
	cvttsd2si	eax, xmm0
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR m[rip], eax
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR n[rip], eax
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	eax, DWORD PTR -24[rbp]
	add	eax, 1
	imul	eax, edx
	add	eax, 1
	movsx	rdx, eax
	mov	rax, QWORD PTR start[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR start[rip], rax
	mov	rax, QWORD PTR start[rip]
	mov	QWORD PTR end[rip], rax
	mov	eax, DWORD PTR m[rip]
	add	eax, 1
	movsx	rdx, eax
	mov	rax, QWORD PTR start[rip]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rdx, QWORD PTR start[rip]
	mov	eax, DWORD PTR m[rip]
	cdqe
	add	rax, 1
	add	rax, rdx
	mov	QWORD PTR end[rip], rax
	mov	rax, QWORD PTR end[rip]
	mov	QWORD PTR cell[rip], rax
	mov	DWORD PTR -12[rbp], 0
	jmp	.L2
.L7:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L3
.L6:
	call	rand@PLT
	cmp	DWORD PTR -4[rbp], eax
	jle	.L4
	mov	ecx, 43
	jmp	.L5
.L4:
	mov	ecx, 46
.L5:
	mov	rax, QWORD PTR end[rip]
	lea	rdx, 1[rax]
	mov	QWORD PTR end[rip], rdx
	mov	BYTE PTR [rax], cl
	add	DWORD PTR -8[rbp], 1
.L3:
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -8[rbp], eax
	jl	.L6
	mov	rax, QWORD PTR end[rip]
	lea	rdx, 1[rax]
	mov	QWORD PTR end[rip], rdx
	mov	BYTE PTR [rax], 10
	add	DWORD PTR -12[rbp], 1
.L2:
	mov	eax, DWORD PTR n[rip]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L7
	mov	rax, QWORD PTR end[rip]
	sub	rax, 1
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR m[rip]
	add	eax, 1
	mov	DWORD PTR m[rip], eax
	mov	eax, DWORD PTR m[rip]
	mov	rdx, QWORD PTR end[rip]
	cdqe
	neg	rax
	add	rax, rdx
	mov	QWORD PTR end[rip], rax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	make_grid, .-make_grid
	.globl	ff
	.type	ff, @function
ff:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 43
	je	.L9
	mov	eax, 0
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 35
	mov	rax, QWORD PTR end[rip]
	cmp	QWORD PTR -8[rbp], rax
	jnb	.L11
	mov	eax, DWORD PTR m[rip]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	ff
	test	eax, eax
	jne	.L11
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 1
	mov	rdi, rax
	call	ff
	test	eax, eax
	jne	.L11
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, 1
	mov	rdi, rax
	call	ff
	test	eax, eax
	jne	.L11
	mov	eax, DWORD PTR m[rip]
	cdqe
	neg	rax
	mov	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	ff
	test	eax, eax
	je	.L12
.L11:
	mov	eax, 1
	jmp	.L10
.L12:
	mov	eax, 0
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	ff, .-ff
	.globl	percolate
	.type	percolate, @function
percolate:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], 0
	jmp	.L15
.L17:
	add	DWORD PTR -4[rbp], 1
.L15:
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -4[rbp], eax
	jge	.L16
	mov	rdx, QWORD PTR cell[rip]
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	add	rax, rdx
	mov	rdi, rax
	call	ff
	test	eax, eax
	je	.L17
.L16:
	mov	eax, DWORD PTR m[rip]
	cmp	DWORD PTR -4[rbp], eax
	setl	al
	movzx	eax, al
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	percolate, .-percolate
	.section	.rodata
.LC2:
	.string	"15x15 grid:"
	.align 8
.LC3:
	.string	"\nrunning 10,000 tests for each case:"
.LC6:
	.string	"p=%.1f:  %.4f\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR .LC1[rip]
	movq	xmm0, rax
	mov	esi, 15
	mov	edi, 15
	call	make_grid
	call	percolate
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	rax, QWORD PTR cell[rip]
	mov	rdi, rax
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	DWORD PTR -20[rbp], 0
	jmp	.L20
.L23:
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, DWORD PTR -20[rbp]
	movsd	xmm1, QWORD PTR .LC4[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	mov	DWORD PTR -16[rbp], 0
	mov	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L21
.L22:
	mov	rax, QWORD PTR -8[rbp]
	movq	xmm0, rax
	mov	esi, 15
	mov	edi, 15
	call	make_grid
	call	percolate
	add	DWORD PTR -12[rbp], eax
	add	DWORD PTR -16[rbp], 1
.L21:
	cmp	DWORD PTR -16[rbp], 9999
	jle	.L22
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, DWORD PTR -12[rbp]
	movsd	xmm1, QWORD PTR .LC5[rip]
	divsd	xmm0, xmm1
	mov	rax, QWORD PTR -8[rbp]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	lea	rdi, .LC6[rip]
	mov	eax, 2
	call	printf@PLT
	add	DWORD PTR -20[rbp], 1
.L20:
	cmp	DWORD PTR -20[rbp], 10
	jle	.L23
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC0:
	.long	-4194304
	.long	1105199103
	.align 8
.LC1:
	.long	0
	.long	1071644672
	.align 8
.LC4:
	.long	0
	.long	1076101120
	.align 8
.LC5:
	.long	0
	.long	1086556160
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"117329117.c"
	.text
	.comm	cell,4,4
	.comm	start,4,4
	.comm	end,4,4
	.comm	m,4,4
	.comm	n,4,4
	.global	__aeabi_dmul
	.global	__aeabi_d2iz
	.align	2
	.global	make_grid
	.syntax unified
	.arm
	.fpu softvfp
	.type	make_grid, %function
make_grid:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldr	r2, .L8
	ldr	r3, .L8+4
	sub	r1, fp, #36
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, .L8+8
	ldr	r3, [fp, #-24]
	str	r3, [r2]
	ldr	r2, .L8+12
	ldr	r3, [fp, #-28]
	str	r3, [r2]
	ldr	r3, .L8+16
	ldr	r0, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldr	r2, [fp, #-28]
	add	r2, r2, #1
	mul	r3, r2, r3
	add	r3, r3, #1
	mov	r1, r3
	bl	realloc
	mov	r3, r0
	ldr	r2, .L8+16
	str	r3, [r2]
	ldr	r3, .L8+16
	ldr	r3, [r3]
	ldr	r2, .L8+20
	str	r3, [r2]
	ldr	r3, .L8+16
	ldr	r0, [r3]
	ldr	r3, .L8+8
	ldr	r3, [r3]
	add	r3, r3, #1
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, .L8+16
	ldr	r2, [r3]
	ldr	r3, .L8+8
	ldr	r3, [r3]
	add	r3, r3, #1
	add	r3, r2, r3
	ldr	r2, .L8+20
	str	r3, [r2]
	ldr	r3, .L8+20
	ldr	r3, [r3]
	ldr	r2, .L8+24
	str	r3, [r2]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L2
.L7:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L3
.L6:
	bl	rand
	mov	r2, r0
	ldr	r3, [fp, #-8]
	cmp	r3, r2
	ble	.L4
	mov	r0, #43
	b	.L5
.L4:
	mov	r0, #46
.L5:
	ldr	r3, .L8+20
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L8+20
	str	r2, [r1]
	mov	r2, r0
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L3:
	ldr	r3, .L8+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	blt	.L6
	ldr	r3, .L8+20
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L8+20
	str	r2, [r1]
	mov	r2, #10
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L2:
	ldr	r3, .L8+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L7
	ldr	r3, .L8+20
	ldr	r3, [r3]
	sub	r3, r3, #1
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L8+8
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L8+8
	str	r3, [r2]
	ldr	r3, .L8+8
	ldr	r1, [r3]
	ldr	r3, .L8+20
	ldr	r2, [r3]
	mov	r3, r1
	rsb	r3, r3, #0
	add	r3, r2, r3
	ldr	r2, .L8+20
	str	r3, [r2]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	-4194304
	.word	1105199103
	.word	m
	.word	n
	.word	start
	.word	end
	.word	cell
	.size	make_grid, .-make_grid
	.align	2
	.global	ff
	.syntax unified
	.arm
	.fpu softvfp
	.type	ff, %function
ff:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #43
	beq	.L11
	mov	r3, #0
	b	.L12
.L11:
	ldr	r3, [fp, #-8]
	mov	r2, #35
	strb	r2, [r3]
	ldr	r3, .L16
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bcs	.L13
	ldr	r3, .L16+4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	mov	r0, r3
	bl	ff
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	mov	r0, r3
	bl	ff
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	mov	r0, r3
	bl	ff
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	ldr	r3, .L16+4
	ldr	r3, [r3]
	rsb	r3, r3, #0
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r0, r3
	bl	ff
	mov	r3, r0
	cmp	r3, #0
	beq	.L14
.L13:
	mov	r3, #1
	b	.L12
.L14:
	mov	r3, #0
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	end
	.word	m
	.size	ff, .-ff
	.align	2
	.global	percolate
	.syntax unified
	.arm
	.fpu softvfp
	.type	percolate, %function
percolate:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L19
.L21:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L19:
	ldr	r3, .L23
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L20
	ldr	r3, .L23+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	mov	r0, r3
	bl	ff
	mov	r3, r0
	cmp	r3, #0
	beq	.L21
.L20:
	ldr	r3, .L23
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	movlt	r3, #1
	movge	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	m
	.word	cell
	.size	percolate, .-percolate
	.section	.rodata
	.align	2
.LC0:
	.ascii	"15x15 grid:\000"
	.align	2
.LC1:
	.ascii	"\012running 10,000 tests for each case:\000"
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.align	2
.LC2:
	.ascii	"p=%.1f:  %.4f\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	mov	r2, #0
	ldr	r3, .L31
	mov	r1, #15
	mov	r0, #15
	bl	make_grid
	bl	percolate
	ldr	r0, .L31+4
	bl	puts
	ldr	r3, .L31+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	puts
	ldr	r0, .L31+12
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L26
.L29:
	ldr	r0, [fp, #-24]
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L31+16
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-12]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-16]
	b	.L27
.L28:
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	mov	r1, #15
	mov	r0, #15
	bl	make_grid
	bl	percolate
	mov	r2, r0
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L27:
	ldr	r3, [fp, #-20]
	ldr	r2, .L31+20
	cmp	r3, r2
	ble	.L28
	ldr	r0, [fp, #-16]
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L31+24
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	stm	sp, {r2-r3}
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	ldr	r0, .L31+28
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L26:
	ldr	r3, [fp, #-24]
	cmp	r3, #10
	ble	.L29
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	1071644672
	.word	.LC0
	.word	cell
	.word	.LC1
	.word	1076101120
	.word	9999
	.word	1086556160
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
