	.file	"182953417.c"
	.intel_syntax noprefix
	.text
	.data
	.align 4
	.type	g_fd, @object
	.size	g_fd, 4
g_fd:
	.long	-1
	.local	g_pos
	.comm	g_pos,8,8
	.local	g_fsize
	.comm	g_fsize,8,8
	.local	g_size
	.comm	g_size,8,8
	.local	g_mem
	.comm	g_mem,8,8
	.local	g_mem_mutex
	.comm	g_mem_mutex,40,32
	.align 32
	.type	g_tmpname, @object
	.size	g_tmpname, 64
g_tmpname:
	.string	"xdag-tmp-XXXXXX"
	.zero	48
	.text
	.globl	xdag_mem_init
	.type	xdag_mem_init, @function
xdag_mem_init:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	cmp	QWORD PTR -8[rbp], 0
	jne	.L2
	mov	eax, 0
	jmp	.L3
.L2:
	sub	QWORD PTR -8[rbp], 1
	or	QWORD PTR -8[rbp], 16777215
	add	QWORD PTR -8[rbp], 1
	lea	rdi, g_tmpname[rip]
	call	mkstemp@PLT
	mov	DWORD PTR g_fd[rip], eax
	mov	eax, DWORD PTR g_fd[rip]
	test	eax, eax
	jns	.L4
	mov	eax, -1
	jmp	.L3
.L4:
	mov	edx, DWORD PTR g_fd[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	r9d, 0
	mov	r8d, edx
	mov	ecx, 1
	mov	edx, 3
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR g_mem[rip], rax
	mov	rax, QWORD PTR g_mem[rip]
	cmp	rax, -1
	jne	.L5
	mov	eax, DWORD PTR g_fd[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, -1
	jmp	.L3
.L5:
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR g_size[rip], rax
	mov	eax, 0
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	xdag_mem_init, .-xdag_mem_init
	.globl	xdag_malloc
	.type	xdag_malloc, @function
xdag_malloc:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	eax, DWORD PTR g_fd[rip]
	test	eax, eax
	jns	.L7
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	malloc@PLT
	jmp	.L8
.L7:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L9
	mov	eax, 0
	jmp	.L8
.L9:
	lea	rdi, g_mem_mutex[rip]
	call	pthread_mutex_lock@PLT
	sub	QWORD PTR -24[rbp], 1
	or	QWORD PTR -24[rbp], 15
	add	QWORD PTR -24[rbp], 1
	jmp	.L10
.L12:
	mov	rax, QWORD PTR g_fsize[rip]
	lea	rdx, 16777216[rax]
	mov	rax, QWORD PTR g_size[rip]
	cmp	rdx, rax
	jbe	.L11
	lea	rdi, g_mem_mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	eax, 0
	jmp	.L8
.L11:
	mov	rax, QWORD PTR g_fsize[rip]
	add	rax, 16777216
	mov	QWORD PTR g_fsize[rip], rax
	mov	rax, QWORD PTR g_fsize[rip]
	mov	rdx, rax
	mov	eax, DWORD PTR g_fd[rip]
	mov	rsi, rdx
	mov	edi, eax
	call	ftruncate@PLT
.L10:
	mov	rdx, QWORD PTR g_pos[rip]
	mov	rax, QWORD PTR -24[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR g_fsize[rip]
	cmp	rdx, rax
	ja	.L12
	mov	rdx, QWORD PTR g_mem[rip]
	mov	rax, QWORD PTR g_pos[rip]
	add	rax, rdx
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR g_pos[rip]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	QWORD PTR g_pos[rip], rax
	lea	rdi, g_mem_mutex[rip]
	call	pthread_mutex_unlock@PLT
	mov	rax, QWORD PTR -8[rbp]
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	xdag_malloc, .-xdag_malloc
	.globl	xdag_free
	.type	xdag_free, @function
xdag_free:
.LFB8:
	.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
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	xdag_free, .-xdag_free
	.globl	xdag_mem_finish
	.type	xdag_mem_finish, @function
xdag_mem_finish:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR g_fd[rip]
	test	eax, eax
	js	.L17
	lea	rdi, g_mem_mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	rdx, QWORD PTR g_size[rip]
	mov	rax, QWORD PTR g_mem[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	munmap@PLT
	mov	eax, DWORD PTR g_fd[rip]
	mov	esi, 0
	mov	edi, eax
	call	ftruncate@PLT
	mov	eax, DWORD PTR g_fd[rip]
	mov	edi, eax
	call	close@PLT
	lea	rdi, g_tmpname[rip]
	call	remove@PLT
	jmp	.L14
.L17:
	nop
.L14:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	xdag_mem_finish, .-xdag_mem_finish
	.globl	xdag_mem_uninit
	.type	xdag_mem_uninit, @function
xdag_mem_uninit:
.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 g_pos[rip], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	xdag_mem_uninit, .-xdag_mem_uninit
	.globl	xdagCreateStringArray
	.type	xdagCreateStringArray, @function
xdagCreateStringArray:
.LFB11:
	.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	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	sal	rax, 3
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -28[rbp], 0
	jmp	.L20
.L21:
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	mov	edx, DWORD PTR -28[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	mov	rdx, QWORD PTR -24[rbp]
	lea	rbx, [rcx+rdx]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR [rbx], rax
	add	DWORD PTR -28[rbp], 1
.L20:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L21
	mov	rax, QWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	xdagCreateStringArray, .-xdagCreateStringArray
	.globl	xdagFreeStringArray
	.type	xdagFreeStringArray, @function
xdagFreeStringArray:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L24
.L25:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	add	DWORD PTR -4[rbp], 1
.L24:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jl	.L25
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	xdagFreeStringArray, .-xdagFreeStringArray
	.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	"182953417.c"
	.text
	.data
	.align	2
	.type	g_fd, %object
	.size	g_fd, 4
g_fd:
	.word	-1
	.local	g_pos
	.comm	g_pos,4,4
	.local	g_fsize
	.comm	g_fsize,4,4
	.local	g_size
	.comm	g_size,4,4
	.local	g_mem
	.comm	g_mem,4,4
	.local	g_mem_mutex
	.comm	g_mem_mutex,24,4
	.align	2
	.type	g_tmpname, %object
	.size	g_tmpname, 64
g_tmpname:
	.ascii	"xdag-tmp-XXXXXX\000"
	.space	48
	.text
	.align	2
	.global	xdag_mem_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	xdag_mem_init, %function
xdag_mem_init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L2
	mov	r3, #0
	b	.L3
.L2:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mvn	r3, r3, lsr #24
	mvn	r3, r3, lsl #24
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r0, .L6
	bl	mkstemp
	mov	r3, r0
	ldr	r2, .L6+4
	str	r3, [r2]
	ldr	r3, .L6+4
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L4
	mvn	r3, #0
	b	.L3
.L4:
	ldr	r3, .L6+4
	ldr	r3, [r3]
	mov	r2, #0
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	ldr	r1, [fp, #-8]
	mov	r0, #0
	bl	mmap
	mov	r3, r0
	ldr	r2, .L6+8
	str	r3, [r2]
	ldr	r3, .L6+8
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L5
	ldr	r3, .L6+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mvn	r3, #0
	b	.L3
.L5:
	ldr	r2, .L6+12
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	g_tmpname
	.word	g_fd
	.word	g_mem
	.word	g_size
	.size	xdag_mem_init, .-xdag_mem_init
	.align	2
	.global	xdag_malloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	xdag_malloc, %function
xdag_malloc:
	@ 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]
	ldr	r3, .L15
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L9
	ldr	r0, [fp, #-16]
	bl	malloc
	mov	r3, r0
	b	.L10
.L9:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L11
	mov	r3, #0
	b	.L10
.L11:
	ldr	r0, .L15+4
	bl	pthread_mutex_lock
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	orr	r3, r3, #15
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	b	.L12
.L14:
	ldr	r3, .L15+8
	ldr	r3, [r3]
	add	r2, r3, #16777216
	ldr	r3, .L15+12
	ldr	r3, [r3]
	cmp	r2, r3
	bls	.L13
	ldr	r0, .L15+4
	bl	pthread_mutex_unlock
	mov	r3, #0
	b	.L10
.L13:
	ldr	r3, .L15+8
	ldr	r3, [r3]
	add	r3, r3, #16777216
	ldr	r2, .L15+8
	str	r3, [r2]
	ldr	r3, .L15
	ldr	r3, [r3]
	ldr	r2, .L15+8
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	ftruncate
.L12:
	ldr	r3, .L15+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, .L15+8
	ldr	r3, [r3]
	cmp	r2, r3
	bhi	.L14
	ldr	r3, .L15+20
	ldr	r2, [r3]
	ldr	r3, .L15+16
	ldr	r3, [r3]
	add	r3, r2, r3
	str	r3, [fp, #-8]
	ldr	r3, .L15+16
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, .L15+16
	str	r3, [r2]
	ldr	r0, .L15+4
	bl	pthread_mutex_unlock
	ldr	r3, [fp, #-8]
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	g_fd
	.word	g_mem_mutex
	.word	g_fsize
	.word	g_size
	.word	g_pos
	.word	g_mem
	.size	xdag_malloc, .-xdag_malloc
	.align	2
	.global	xdag_free
	.syntax unified
	.arm
	.fpu softvfp
	.type	xdag_free, %function
xdag_free:
	@ 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]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	xdag_free, .-xdag_free
	.align	2
	.global	xdag_mem_finish
	.syntax unified
	.arm
	.fpu softvfp
	.type	xdag_mem_finish, %function
xdag_mem_finish:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L22
	ldr	r3, [r3]
	cmp	r3, #0
	blt	.L21
	ldr	r0, .L22+4
	bl	pthread_mutex_lock
	ldr	r3, .L22+8
	ldr	r3, [r3]
	ldr	r2, .L22+12
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	munmap
	ldr	r3, .L22
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	ftruncate
	ldr	r3, .L22
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r0, .L22+16
	bl	remove
	pop	{fp, pc}
.L21:
	nop
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	g_fd
	.word	g_mem_mutex
	.word	g_mem
	.word	g_size
	.word	g_tmpname
	.size	xdag_mem_finish, .-xdag_mem_finish
	.align	2
	.global	xdag_mem_uninit
	.syntax unified
	.arm
	.fpu softvfp
	.type	xdag_mem_uninit, %function
xdag_mem_uninit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	ldr	r3, .L25
	mov	r2, #0
	str	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L26:
	.align	2
.L25:
	.word	g_pos
	.size	xdag_mem_uninit, .-xdag_mem_uninit
	.align	2
	.global	xdagCreateStringArray
	.syntax unified
	.arm
	.fpu softvfp
	.type	xdagCreateStringArray, %function
xdagCreateStringArray:
	@ 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]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L28
.L29:
	ldr	r1, [fp, #-28]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r4, r2, r3
	mov	r0, r1
	bl	malloc
	mov	r3, r0
	str	r3, [r4]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L28:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L29
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	xdagCreateStringArray, .-xdagCreateStringArray
	.align	2
	.global	xdagFreeStringArray
	.syntax unified
	.arm
	.fpu softvfp
	.type	xdagFreeStringArray, %function
xdagFreeStringArray:
	@ 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	r3, #0
	str	r3, [fp, #-8]
	b	.L32
.L33:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L32:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L33
	ldr	r0, [fp, #-16]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	xdagFreeStringArray, .-xdagFreeStringArray
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
