	.file	"150141741.c"
	.intel_syntax noprefix
	.text
	.local	sbuf1
	.comm	sbuf1,1024,32
	.local	sbuf2
	.comm	sbuf2,1024,32
	.section	.data.rel,"aw"
	.align 8
	.type	x_printf, @object
	.size	x_printf, 8
x_printf:
	.quad	printf
	.section	.rodata
.LC0:
	.string	"XP_%s"
	.text
	.type	to_env_name, @function
to_env_name:
.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
	mov	edx, 1024
	mov	esi, 0
	lea	rdi, env_name.0[rip]
	call	memset@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, rax
	lea	rdx, .LC0[rip]
	mov	esi, 1023
	lea	rdi, env_name.0[rip]
	mov	eax, 0
	call	snprintf@PLT
	lea	rax, env_name.0[rip]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	to_env_name, .-to_env_name
	.type	do_set, @function
do_set:
.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
	lea	rax, sbuf1[rip]
	mov	QWORD PTR -16[rbp], rax
	lea	rax, sbuf2[rip]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	to_env_name
	mov	rcx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 1
	mov	rsi, rax
	mov	rdi, rcx
	call	setenv@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	do_set, .-do_set
	.section	.rodata
.LC1:
	.string	"NOT-FOUND"
.LC2:
	.string	"--- %s ---\n"
.LC3:
	.string	"\n--- END ---"
	.text
	.type	do_get, @function
do_get:
.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
	lea	rax, sbuf1[rip]
	mov	QWORD PTR -8[rbp], rax
	lea	rdi, sbuf1[rip]
	call	to_env_name
	mov	rdi, rax
	call	getenv@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L5
	lea	rax, .LC1[rip]
	mov	QWORD PTR -16[rbp], rax
.L5:
	lea	rsi, sbuf1[rip]
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR x_printf[rip]
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	rdx
	lea	rdi, .LC3[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	do_get, .-do_get
	.section	.rodata
.LC4:
	.string	"exit"
.LC5:
	.string	"set"
.LC6:
	.string	"set %s %s"
.LC7:
	.string	"get"
.LC8:
	.string	"get %s"
	.text
	.type	dispatch, @function
dispatch:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 4
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L7
	mov	eax, 0
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 3
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L9
	mov	edx, 1024
	mov	esi, 0
	lea	rdi, sbuf1[rip]
	call	memset@PLT
	mov	edx, 1024
	mov	esi, 0
	lea	rdi, sbuf2[rip]
	call	memset@PLT
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, sbuf2[rip]
	lea	rdx, sbuf1[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	cmp	eax, 2
	jne	.L10
	mov	eax, 0
	call	do_set
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 3
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L10
	mov	edx, 1024
	mov	esi, 0
	lea	rdi, sbuf1[rip]
	call	memset@PLT
	mov	edx, 1024
	mov	esi, 0
	lea	rdi, sbuf2[rip]
	call	memset@PLT
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, sbuf1[rip]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	test	eax, eax
	jle	.L10
	mov	eax, 0
	call	do_get
.L10:
	mov	eax, 1
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	dispatch, .-dispatch
	.section	.rodata
.LC9:
	.string	"> "
	.text
	.type	loop_exec_command, @function
loop_exec_command:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -148[rbp], 0
	mov	rax, QWORD PTR stdout[rip]
	mov	ecx, 0
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	setvbuf@PLT
.L12:
	lea	rax, -144[rbp]
	mov	edx, 128
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	edx, 2
	lea	rsi, .LC9[rip]
	mov	edi, 1
	call	write@PLT
	lea	rax, -144[rbp]
	mov	edx, 127
	mov	rsi, rax
	mov	edi, 0
	call	read@PLT
	lea	rax, -144[rbp]
	mov	rdi, rax
	call	dispatch
	mov	DWORD PTR -148[rbp], eax
	cmp	DWORD PTR -148[rbp], 0
	jne	.L12
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	loop_exec_command, .-loop_exec_command
	.section	.rodata
.LC10:
	.string	"Hello guest!"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.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], edi
	mov	QWORD PTR -16[rbp], rsi
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	eax, 0
	call	loop_exec_command
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	main, .-main
	.local	env_name.0
	.comm	env_name.0,1024,32
	.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	"150141741.c"
	.text
	.local	sbuf1
	.comm	sbuf1,1024,4
	.local	sbuf2
	.comm	sbuf2,1024,4
	.data
	.align	2
	.type	x_printf, %object
	.size	x_printf, 4
x_printf:
	.word	printf
	.section	.rodata
	.align	2
.LC0:
	.ascii	"XP_%s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	to_env_name, %function
to_env_name:
	@ 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]
	mov	r2, #1024
	mov	r1, #0
	ldr	r0, .L3
	bl	memset
	ldr	r3, [fp, #-8]
	ldr	r2, .L3+4
	ldr	r1, .L3+8
	ldr	r0, .L3
	bl	snprintf
	ldr	r3, .L3
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	env_name.5956
	.word	.LC0
	.word	1023
	.size	to_env_name, .-to_env_name
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_set, %function
do_set:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L6
	str	r3, [fp, #-12]
	ldr	r3, .L6+4
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	to_env_name
	mov	r3, r0
	mov	r2, #1
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	setenv
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	sbuf1
	.word	sbuf2
	.size	do_set, .-do_set
	.section	.rodata
	.align	2
.LC1:
	.ascii	"NOT-FOUND\000"
	.align	2
.LC2:
	.ascii	"--- %s ---\012\000"
	.align	2
.LC3:
	.ascii	"\012--- END ---\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_get, %function
do_get:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L10
	str	r3, [fp, #-8]
	ldr	r0, .L10
	bl	to_env_name
	mov	r3, r0
	mov	r0, r3
	bl	getenv
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L9
	ldr	r3, .L10+4
	str	r3, [fp, #-12]
.L9:
	ldr	r1, .L10
	ldr	r0, .L10+8
	bl	printf
	ldr	r3, .L10+12
	ldr	r3, [r3]
	ldr	r0, [fp, #-12]
	blx	r3
	ldr	r0, .L10+16
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	sbuf1
	.word	.LC1
	.word	.LC2
	.word	x_printf
	.word	.LC3
	.size	do_get, .-do_get
	.section	.rodata
	.align	2
.LC4:
	.ascii	"exit\000"
	.align	2
.LC5:
	.ascii	"set\000"
	.align	2
.LC6:
	.ascii	"set %s %s\000"
	.align	2
.LC7:
	.ascii	"get\000"
	.align	2
.LC8:
	.ascii	"get %s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dispatch, %function
dispatch:
	@ 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]
	mov	r2, #4
	ldr	r1, .L17
	ldr	r0, [fp, #-8]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L13
	mov	r3, #0
	b	.L14
.L13:
	mov	r2, #3
	ldr	r1, .L17+4
	ldr	r0, [fp, #-8]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L15
	mov	r2, #1024
	mov	r1, #0
	ldr	r0, .L17+8
	bl	memset
	mov	r2, #1024
	mov	r1, #0
	ldr	r0, .L17+12
	bl	memset
	ldr	r3, .L17+12
	ldr	r2, .L17+8
	ldr	r1, .L17+16
	ldr	r0, [fp, #-8]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #2
	bne	.L16
	bl	do_set
	b	.L16
.L15:
	mov	r2, #3
	ldr	r1, .L17+20
	ldr	r0, [fp, #-8]
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L16
	mov	r2, #1024
	mov	r1, #0
	ldr	r0, .L17+8
	bl	memset
	mov	r2, #1024
	mov	r1, #0
	ldr	r0, .L17+12
	bl	memset
	ldr	r2, .L17+8
	ldr	r1, .L17+24
	ldr	r0, [fp, #-8]
	bl	__isoc99_sscanf
	mov	r3, r0
	cmp	r3, #0
	ble	.L16
	bl	do_get
.L16:
	mov	r3, #1
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC4
	.word	.LC5
	.word	sbuf1
	.word	sbuf2
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	dispatch, .-dispatch
	.section	.rodata
	.align	2
.LC9:
	.ascii	"> \000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	loop_exec_command, %function
loop_exec_command:
	@ args = 0, pretend = 0, frame = 136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #136
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-140]
	ldr	r3, .L22+4
	ldr	r0, [r3]
	mov	r3, #0
	mov	r2, #2
	mov	r1, #0
	bl	setvbuf
.L20:
	sub	r3, fp, #136
	mov	r2, #128
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r2, #2
	ldr	r1, .L22+8
	mov	r0, #1
	bl	write
	sub	r3, fp, #136
	mov	r2, #127
	mov	r1, r3
	mov	r0, #0
	bl	read
	sub	r3, fp, #136
	mov	r0, r3
	bl	dispatch
	str	r0, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bne	.L20
	nop
	ldr	r3, .L22
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC10
	.word	stdout
	.word	.LC9
	.size	loop_exec_command, .-loop_exec_command
	.section	.rodata
	.align	2
.LC11:
	.ascii	"Hello guest!\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r0, .L26
	bl	puts
	bl	loop_exec_command
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC11
	.size	main, .-main
	.local	env_name.5956
	.comm	env_name.5956,1024,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
