	.file	"925607.c"
	.intel_syntax noprefix
	.text
	.type	sndup, @function
sndup:
.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	QWORD PTR -24[rbp], rdi
	mov	edi, 32
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	and	eax, 2
	test	eax, eax
	je	.L2
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	sndup
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	or	edx, 8
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	sndup
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	or	edx, 16
	mov	DWORD PTR [rax], edx
.L3:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sndup, .-sndup
	.type	freeSnailfishNumber, @function
freeSnailfishNumber:
.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]
	mov	eax, DWORD PTR [rax]
	and	eax, 4
	test	eax, eax
	je	.L6
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	freeSnailfishNumber
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	freeSnailfishNumber
.L6:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	freeSnailfishNumber, .-freeSnailfishNumber
	.type	createNumber, @function
createNumber:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	edi, 32
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 2
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	createNumber, .-createNumber
	.type	parseSnailfishNumber, @function
parseSnailfishNumber:
.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	QWORD PTR -24[rbp], rdi
	mov	edi, 32
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 4
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 91
	jne	.L10
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	parseSnailfishNumber
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	or	edx, 8
	mov	DWORD PTR [rax], edx
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	mov	edi, eax
	call	createNumber
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	or	edx, 8
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
.L11:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	or	edx, 8
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 91
	jne	.L12
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	parseSnailfishNumber
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	or	edx, 16
	mov	DWORD PTR [rax], edx
	jmp	.L13
.L12:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	mov	edi, eax
	call	createNumber
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	or	edx, 16
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
.L13:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	or	edx, 16
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	parseSnailfishNumber, .-parseSnailfishNumber
	.type	getNextLeaf, @function
getNextLeaf:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
.L20:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	and	eax, 8
	test	eax, eax
	je	.L16
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L17
.L18:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
.L17:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	and	eax, 2
	test	eax, eax
	je	.L18
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L19
.L16:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L20
	mov	eax, 0
.L19:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	getNextLeaf, .-getNextLeaf
	.type	getPreviousLeaf, @function
getPreviousLeaf:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
.L26:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	and	eax, 16
	test	eax, eax
	je	.L22
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L23
.L24:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
.L23:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	and	eax, 2
	test	eax, eax
	je	.L24
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L25
.L22:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L26
	mov	eax, 0
.L25:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	getPreviousLeaf, .-getPreviousLeaf
	.type	explode, @function
explode:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax]
	and	eax, 2
	test	eax, eax
	je	.L28
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	and	eax, 2
	test	eax, eax
	je	.L28
	cmp	DWORD PTR -44[rbp], 3
	jle	.L28
	mov	edi, 0
	call	createNumber
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -24[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	and	eax, 8
	test	eax, eax
	je	.L29
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 24[rdx]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR 8[rax]
	or	edx, 8
	mov	DWORD PTR [rax], edx
	jmp	.L30
.L29:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 24[rdx]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR 16[rax]
	or	edx, 16
	mov	DWORD PTR [rax], edx
.L30:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	getPreviousLeaf
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L31
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -24[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
.L31:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	getNextLeaf
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L32
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 8[rax]
	mov	eax, DWORD PTR -20[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
.L32:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	freeSnailfishNumber
	mov	eax, 1
	jmp	.L33
.L28:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax]
	and	eax, 4
	test	eax, eax
	je	.L34
	mov	eax, DWORD PTR -44[rbp]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	esi, edx
	mov	rdi, rax
	call	explode
	test	eax, eax
	jne	.L35
.L34:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	and	eax, 4
	test	eax, eax
	je	.L36
	mov	eax, DWORD PTR -44[rbp]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	esi, edx
	mov	rdi, rax
	call	explode
	test	eax, eax
	je	.L36
.L35:
	mov	eax, 1
	jmp	.L33
.L36:
	mov	eax, 0
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	explode, .-explode
	.type	add, @function
add:
.LFB13:
	.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	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	edi, 32
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 4
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	or	edx, 8
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	or	edx, 16
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	add, .-add
	.type	split, @function
split:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR [rax]
	and	eax, 2
	test	eax, eax
	je	.L41
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR 8[rax]
	cmp	eax, 9
	jle	.L42
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR 8[rax]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -24[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	eax, DWORD PTR 8[rax]
	and	eax, 1
	test	eax, eax
	je	.L43
	mov	eax, DWORD PTR -24[rbp]
	add	eax, 1
	jmp	.L44
.L43:
	mov	eax, DWORD PTR -24[rbp]
.L44:
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	freeSnailfishNumber
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	createNumber
	mov	rbx, rax
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	createNumber
	mov	rsi, rbx
	mov	rdi, rax
	call	add
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	or	edx, 8
	mov	DWORD PTR [rax], edx
	mov	eax, 1
	jmp	.L45
.L41:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	split
	test	eax, eax
	je	.L42
	mov	eax, 1
	jmp	.L45
.L42:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR [rax]
	and	eax, 2
	test	eax, eax
	je	.L46
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR 8[rax]
	cmp	eax, 9
	jle	.L47
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR 8[rax]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR -24[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	eax, DWORD PTR 8[rax]
	and	eax, 1
	test	eax, eax
	je	.L48
	mov	eax, DWORD PTR -24[rbp]
	add	eax, 1
	jmp	.L49
.L48:
	mov	eax, DWORD PTR -24[rbp]
.L49:
	mov	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	freeSnailfishNumber
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	createNumber
	mov	rbx, rax
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	createNumber
	mov	rsi, rbx
	mov	rdi, rax
	call	add
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	or	edx, 16
	mov	DWORD PTR [rax], edx
	mov	eax, 1
	jmp	.L45
.L46:
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	split
	test	eax, eax
	je	.L47
	mov	eax, 1
	jmp	.L45
.L47:
	mov	eax, 0
.L45:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	split, .-split
	.type	reduce, @function
reduce:
.LFB15:
	.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
	nop
.L51:
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	explode
	test	eax, eax
	jne	.L51
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	split
	test	eax, eax
	jne	.L51
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	reduce, .-reduce
	.type	magnitude, @function
magnitude:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR [rax]
	and	eax, 2
	test	eax, eax
	je	.L54
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 8[rax]
	jmp	.L55
.L54:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	magnitude
	mov	edx, eax
	mov	eax, edx
	add	eax, eax
	lea	ebx, [rax+rdx]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	magnitude
	add	eax, eax
	add	eax, ebx
.L55:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	magnitude, .-magnitude
	.section	.rodata
.LC0:
	.string	"Result1: %d\nResult2: %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 1176
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1160[rbp], 0
	mov	DWORD PTR -1168[rbp], 0
	mov	DWORD PTR -1164[rbp], 0
	jmp	.L57
.L58:
	lea	rax, -336[rbp]
	mov	QWORD PTR -1152[rbp], rax
	lea	rax, -1152[rbp]
	mov	rdi, rax
	call	parseSnailfishNumber
	mov	rdx, rax
	mov	ebx, DWORD PTR -1168[rbp]
	lea	eax, 1[rbx]
	mov	DWORD PTR -1168[rbp], eax
	mov	rdi, rdx
	call	reduce
	movsx	rdx, ebx
	mov	QWORD PTR -1136[rbp+rdx*8], rax
.L57:
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -336[rbp]
	mov	esi, 300
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L58
	mov	DWORD PTR -1176[rbp], 0
	jmp	.L59
.L64:
	mov	eax, DWORD PTR -1176[rbp]
	add	eax, 1
	mov	DWORD PTR -1172[rbp], eax
	jmp	.L60
.L63:
	mov	eax, DWORD PTR -1172[rbp]
	cdqe
	mov	rax, QWORD PTR -1136[rbp+rax*8]
	mov	rdi, rax
	call	sndup
	mov	rbx, rax
	mov	eax, DWORD PTR -1176[rbp]
	cdqe
	mov	rax, QWORD PTR -1136[rbp+rax*8]
	mov	rdi, rax
	call	sndup
	mov	rsi, rbx
	mov	rdi, rax
	call	add
	mov	rdi, rax
	call	reduce
	mov	QWORD PTR -1144[rbp], rax
	mov	rax, QWORD PTR -1144[rbp]
	mov	rdi, rax
	call	magnitude
	mov	DWORD PTR -1156[rbp], eax
	mov	rax, QWORD PTR -1144[rbp]
	mov	rdi, rax
	call	freeSnailfishNumber
	mov	eax, DWORD PTR -1156[rbp]
	cmp	eax, DWORD PTR -1164[rbp]
	jle	.L61
	mov	eax, DWORD PTR -1156[rbp]
	mov	DWORD PTR -1164[rbp], eax
.L61:
	mov	eax, DWORD PTR -1176[rbp]
	cdqe
	mov	rax, QWORD PTR -1136[rbp+rax*8]
	mov	rdi, rax
	call	sndup
	mov	rbx, rax
	mov	eax, DWORD PTR -1172[rbp]
	cdqe
	mov	rax, QWORD PTR -1136[rbp+rax*8]
	mov	rdi, rax
	call	sndup
	mov	rsi, rbx
	mov	rdi, rax
	call	add
	mov	rdi, rax
	call	reduce
	mov	QWORD PTR -1144[rbp], rax
	mov	rax, QWORD PTR -1144[rbp]
	mov	rdi, rax
	call	magnitude
	mov	DWORD PTR -1156[rbp], eax
	mov	rax, QWORD PTR -1144[rbp]
	mov	rdi, rax
	call	freeSnailfishNumber
	mov	eax, DWORD PTR -1156[rbp]
	cmp	eax, DWORD PTR -1164[rbp]
	jle	.L62
	mov	eax, DWORD PTR -1156[rbp]
	mov	DWORD PTR -1164[rbp], eax
.L62:
	add	DWORD PTR -1172[rbp], 1
.L60:
	mov	eax, DWORD PTR -1172[rbp]
	cmp	eax, DWORD PTR -1168[rbp]
	jl	.L63
	add	DWORD PTR -1176[rbp], 1
.L59:
	mov	eax, DWORD PTR -1176[rbp]
	cmp	eax, DWORD PTR -1168[rbp]
	jl	.L64
	mov	DWORD PTR -1176[rbp], 1
	jmp	.L65
.L66:
	mov	eax, DWORD PTR -1176[rbp]
	cdqe
	mov	rdx, QWORD PTR -1136[rbp+rax*8]
	mov	rax, QWORD PTR -1136[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	add
	mov	rdi, rax
	call	reduce
	mov	QWORD PTR -1136[rbp], rax
	add	DWORD PTR -1176[rbp], 1
.L65:
	mov	eax, DWORD PTR -1176[rbp]
	cmp	eax, DWORD PTR -1168[rbp]
	jl	.L66
	mov	rax, QWORD PTR -1136[rbp]
	mov	rdi, rax
	call	magnitude
	mov	DWORD PTR -1160[rbp], eax
	mov	rax, QWORD PTR -1136[rbp]
	mov	rdi, rax
	call	freeSnailfishNumber
	mov	edx, DWORD PTR -1164[rbp]
	mov	eax, DWORD PTR -1160[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L68
	call	__stack_chk_fail@PLT
.L68:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	main, .-main
	.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	"925607.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sndup, %function
sndup:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	b	.L3
.L2:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	sndup
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	orr	r2, r2, #8
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	sndup
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	orr	r2, r2, #16
	str	r2, [r3]
.L3:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	sndup, .-sndup
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	freeSnailfishNumber, %function
freeSnailfishNumber:
	@ 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]
	ldr	r3, [r3]
	and	r3, r3, #4
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	freeSnailfishNumber
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	freeSnailfishNumber
.L6:
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	freeSnailfishNumber, .-freeSnailfishNumber
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	createNumber, %function
createNumber:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #2
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	createNumber, .-createNumber
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parseSnailfishNumber, %function
parseSnailfishNumber:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #4
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #91
	bne	.L10
	ldr	r0, [fp, #-16]
	bl	parseSnailfishNumber
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	orr	r2, r2, #8
	str	r2, [r3]
	b	.L11
.L10:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	mov	r0, r3
	bl	createNumber
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	orr	r2, r2, #8
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3]
.L11:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	orr	r2, r2, #8
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #91
	bne	.L12
	ldr	r0, [fp, #-16]
	bl	parseSnailfishNumber
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	orr	r2, r2, #16
	str	r2, [r3]
	b	.L13
.L12:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	mov	r0, r3
	bl	createNumber
	mov	r2, r0
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	orr	r2, r2, #16
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3]
.L13:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	orr	r2, r2, #16
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	parseSnailfishNumber, .-parseSnailfishNumber
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	getNextLeaf, %function
getNextLeaf:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
.L20:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	and	r3, r3, #8
	cmp	r3, #0
	beq	.L16
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-8]
	b	.L17
.L18:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
.L17:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-8]
	b	.L19
.L16:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L20
	mov	r3, #0
.L19:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	getNextLeaf, .-getNextLeaf
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	getPreviousLeaf, %function
getPreviousLeaf:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
.L26:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	and	r3, r3, #16
	cmp	r3, #0
	beq	.L22
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	b	.L23
.L24:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-8]
.L23:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L24
	ldr	r3, [fp, #-8]
	b	.L25
.L22:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L26
	mov	r3, #0
.L25:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	getPreviousLeaf, .-getPreviousLeaf
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	explode, %function
explode:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r3, [r3]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L28
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L28
	ldr	r3, [fp, #-28]
	cmp	r3, #3
	ble	.L28
	mov	r0, #0
	bl	createNumber
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	and	r3, r3, #8
	cmp	r3, #0
	beq	.L29
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-24]
	ldr	r2, [r2, #12]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r3, [r3, #4]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r3, [r3, #4]
	orr	r2, r2, #8
	str	r2, [r3]
	b	.L30
.L29:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-24]
	ldr	r2, [r2, #12]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r3, [r3, #8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r3, [r3, #8]
	orr	r2, r2, #16
	str	r2, [r3]
.L30:
	ldr	r0, [fp, #-20]
	bl	getPreviousLeaf
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L31
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
.L31:
	ldr	r0, [fp, #-20]
	bl	getNextLeaf
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L32
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-12]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
.L32:
	ldr	r0, [fp, #-24]
	bl	freeSnailfishNumber
	mov	r3, #1
	b	.L33
.L28:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r3, [r3]
	and	r3, r3, #4
	cmp	r3, #0
	beq	.L34
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	mov	r1, r3
	mov	r0, r2
	bl	explode
	mov	r3, r0
	cmp	r3, #0
	bne	.L35
.L34:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	and	r3, r3, #4
	cmp	r3, #0
	beq	.L36
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	mov	r1, r3
	mov	r0, r2
	bl	explode
	mov	r3, r0
	cmp	r3, #0
	beq	.L36
.L35:
	mov	r3, #1
	b	.L33
.L36:
	mov	r3, #0
.L33:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	explode, .-explode
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	add, %function
add:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #4
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	orr	r2, r2, #8
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	orr	r2, r2, #16
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	add, .-add
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	split, %function
split:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r3, [r3]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L41
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r3, [r3, #4]
	cmp	r3, #9
	ble	.L42
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r3, [r3, #4]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r3, [r3, #4]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L43
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	b	.L44
.L43:
	ldr	r3, [fp, #-20]
.L44:
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	freeSnailfishNumber
	ldr	r0, [fp, #-20]
	bl	createNumber
	mov	r4, r0
	ldr	r0, [fp, #-16]
	bl	createNumber
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	add
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	orr	r2, r2, #8
	str	r2, [r3]
	mov	r3, #1
	b	.L45
.L41:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	split
	mov	r3, r0
	cmp	r3, #0
	beq	.L42
	mov	r3, #1
	b	.L45
.L42:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r3, [r3]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L46
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #4]
	cmp	r3, #9
	ble	.L47
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #4]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r3, [r3, #4]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L48
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	b	.L49
.L48:
	ldr	r3, [fp, #-20]
.L49:
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	freeSnailfishNumber
	ldr	r0, [fp, #-20]
	bl	createNumber
	mov	r4, r0
	ldr	r0, [fp, #-16]
	bl	createNumber
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	add
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	orr	r2, r2, #16
	str	r2, [r3]
	mov	r3, #1
	b	.L45
.L46:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	split
	mov	r3, r0
	cmp	r3, #0
	beq	.L47
	mov	r3, #1
	b	.L45
.L47:
	mov	r3, #0
.L45:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	split, .-split
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	reduce, %function
reduce:
	@ 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]
	nop
.L51:
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	explode
	mov	r3, r0
	cmp	r3, #0
	bne	.L51
	ldr	r0, [fp, #-8]
	bl	split
	mov	r3, r0
	cmp	r3, #0
	bne	.L51
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	reduce, .-reduce
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	magnitude, %function
magnitude:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L54
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	b	.L55
.L54:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	magnitude
	mov	r2, r0
	mov	r3, r2
	lsl	r3, r3, #1
	add	r4, r3, r2
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	magnitude
	mov	r3, r0
	lsl	r3, r3, #1
	add	r3, r4, r3
.L55:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	magnitude, .-magnitude
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Result1: %d\012Result2: %d\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 736
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #740
	ldr	r3, .L69
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-728]
	mov	r3, #0
	str	r3, [fp, #-736]
	mov	r3, #0
	str	r3, [fp, #-732]
	b	.L57
.L58:
	sub	r3, fp, #316
	str	r3, [fp, #-748]
	sub	r3, fp, #748
	mov	r0, r3
	bl	parseSnailfishNumber
	mov	r2, r0
	ldr	r4, [fp, #-736]
	add	r3, r4, #1
	str	r3, [fp, #-736]
	mov	r0, r2
	bl	reduce
	mov	r2, r0
	lsl	r3, r4, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-704]
.L57:
	ldr	r3, .L69+4
	ldr	r2, [r3]
	sub	r3, fp, #316
	mov	r1, #300
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L58
	mov	r3, #0
	str	r3, [fp, #-744]
	b	.L59
.L64:
	ldr	r3, [fp, #-744]
	add	r3, r3, #1
	str	r3, [fp, #-740]
	b	.L60
.L63:
	ldr	r3, [fp, #-744]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-704]
	mov	r0, r3
	bl	sndup
	mov	r4, r0
	ldr	r3, [fp, #-740]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-704]
	mov	r0, r3
	bl	sndup
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	add
	mov	r3, r0
	mov	r0, r3
	bl	reduce
	str	r0, [fp, #-724]
	ldr	r0, [fp, #-724]
	bl	magnitude
	str	r0, [fp, #-720]
	ldr	r0, [fp, #-724]
	bl	freeSnailfishNumber
	ldr	r2, [fp, #-720]
	ldr	r3, [fp, #-732]
	cmp	r2, r3
	ble	.L61
	ldr	r3, [fp, #-720]
	str	r3, [fp, #-732]
.L61:
	ldr	r3, [fp, #-740]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-704]
	mov	r0, r3
	bl	sndup
	mov	r4, r0
	ldr	r3, [fp, #-744]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-704]
	mov	r0, r3
	bl	sndup
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	add
	mov	r3, r0
	mov	r0, r3
	bl	reduce
	str	r0, [fp, #-724]
	ldr	r0, [fp, #-724]
	bl	magnitude
	str	r0, [fp, #-720]
	ldr	r0, [fp, #-724]
	bl	freeSnailfishNumber
	ldr	r2, [fp, #-720]
	ldr	r3, [fp, #-732]
	cmp	r2, r3
	ble	.L62
	ldr	r3, [fp, #-720]
	str	r3, [fp, #-732]
.L62:
	ldr	r3, [fp, #-740]
	add	r3, r3, #1
	str	r3, [fp, #-740]
.L60:
	ldr	r2, [fp, #-740]
	ldr	r3, [fp, #-736]
	cmp	r2, r3
	blt	.L63
	ldr	r3, [fp, #-744]
	add	r3, r3, #1
	str	r3, [fp, #-744]
.L59:
	ldr	r2, [fp, #-744]
	ldr	r3, [fp, #-736]
	cmp	r2, r3
	blt	.L64
	mov	r3, #1
	str	r3, [fp, #-744]
	b	.L65
.L66:
	ldr	r2, [fp, #-716]
	ldr	r3, [fp, #-744]
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	ldr	r3, [r3, #-704]
	mov	r1, r3
	mov	r0, r2
	bl	add
	mov	r3, r0
	mov	r0, r3
	bl	reduce
	mov	r3, r0
	str	r3, [fp, #-716]
	ldr	r3, [fp, #-744]
	add	r3, r3, #1
	str	r3, [fp, #-744]
.L65:
	ldr	r2, [fp, #-744]
	ldr	r3, [fp, #-736]
	cmp	r2, r3
	blt	.L66
	ldr	r3, [fp, #-716]
	mov	r0, r3
	bl	magnitude
	str	r0, [fp, #-728]
	ldr	r3, [fp, #-716]
	mov	r0, r3
	bl	freeSnailfishNumber
	ldr	r2, [fp, #-732]
	ldr	r1, [fp, #-728]
	ldr	r0, .L69+8
	bl	printf
	mov	r3, #0
	ldr	r2, .L69
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L68
	bl	__stack_chk_fail
.L68:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L70:
	.align	2
.L69:
	.word	.LC1
	.word	stdin
	.word	.LC0
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
