	.file	"116836.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"\nUsage:\t%s { address } [ type [ data ] ]\n\taddress : memory address to act upon\n\ttype    : access operation type : [b]yte, [h]alfword, [w]ord\n\tdata    : data to be written\n\n"
.LC1:
	.string	"/dev/mem"
.LC2:
	.string	"the_stack_data/116836.c"
	.align 8
.LC3:
	.string	"Error at line %d, file %s (%d) [%s]\n"
.LC4:
	.string	"/dev/mem opened."
.LC5:
	.string	"Memory mapped at address %p.\n"
.LC6:
	.string	"Illegal data type '%c'.\n"
	.align 8
.LC7:
	.string	"Value at address 0x%X (%p): 0x%X\n"
.LC8:
	.string	"Written 0x%X; readback 0x%X\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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, 72
	.cfi_offset 3, -24
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	DWORD PTR -64[rbp], 119
	cmp	DWORD PTR -68[rbp], 1
	jg	.L2
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	DWORD PTR -68[rbp], 2
	jle	.L3
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	tolower@PLT
	mov	DWORD PTR -64[rbp], eax
.L3:
	mov	esi, 1052674
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], -1
	jne	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	r9, rbx
	mov	r8d, edx
	lea	rcx, .LC2[rip]
	mov	edx, 68
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	rax, QWORD PTR -48[rbp]
	and	rax, -4096
	mov	rdx, rax
	mov	eax, DWORD PTR -60[rbp]
	mov	r9, rdx
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 4096
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], -1
	jne	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	r9, rbx
	mov	r8d, edx
	lea	rcx, .LC2[rip]
	mov	edx, 74
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	rax, QWORD PTR -48[rbp]
	and	eax, 4095
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	mov	QWORD PTR -32[rbp], rax
	cmp	DWORD PTR -64[rbp], 119
	je	.L6
	cmp	DWORD PTR -64[rbp], 119
	jg	.L7
	cmp	DWORD PTR -64[rbp], 98
	je	.L8
	cmp	DWORD PTR -64[rbp], 104
	je	.L9
	jmp	.L7
.L8:
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	QWORD PTR -56[rbp], rax
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	mov	QWORD PTR -56[rbp], rax
	jmp	.L10
.L6:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -56[rbp], rax
	jmp	.L10
.L7:
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -64[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 2
	call	exit@PLT
.L10:
	mov	rcx, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	cmp	DWORD PTR -68[rbp], 3
	jle	.L11
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	DWORD PTR -64[rbp], 119
	je	.L12
	cmp	DWORD PTR -64[rbp], 119
	jg	.L13
	cmp	DWORD PTR -64[rbp], 98
	je	.L14
	cmp	DWORD PTR -64[rbp], 104
	je	.L15
	jmp	.L13
.L14:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	QWORD PTR -56[rbp], rax
	jmp	.L13
.L15:
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -32[rbp]
	mov	WORD PTR [rax], dx
	mov	rax, QWORD PTR -32[rbp]
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	mov	QWORD PTR -56[rbp], rax
	jmp	.L13
.L12:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -56[rbp], rax
	nop
.L13:
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
.L11:
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	munmap@PLT
	cmp	eax, -1
	jne	.L16
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	r9, rbx
	mov	r8d, edx
	lea	rcx, .LC2[rip]
	mov	edx, 116
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"116836.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012Usage:\011%s { address } [ type [ data ] ]\012\011"
	.ascii	"address : memory address to act upon\012\011type   "
	.ascii	" : access operation type : [b]yte, [h]alfword, [w]o"
	.ascii	"rd\012\011data    : data to be written\012\012\000"
	.align	2
.LC1:
	.ascii	"/dev/mem\000"
	.align	2
.LC2:
	.ascii	"the_stack_data/116836.c\000"
	.align	2
.LC3:
	.ascii	"Error at line %d, file %s (%d) [%s]\012\000"
	.align	2
.LC4:
	.ascii	"/dev/mem opened.\000"
	.align	2
.LC5:
	.ascii	"Memory mapped at address %p.\012\000"
	.align	2
.LC6:
	.ascii	"Illegal data type '%c'.\012\000"
	.align	2
.LC7:
	.ascii	"Value at address 0x%X (%p): 0x%X\012\000"
	.align	2
.LC8:
	.ascii	"Written 0x%X; readback 0x%X\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	mov	r3, #119
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	bgt	.L2
	ldr	r3, .L18
	ldr	r0, [r3]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L18+4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtoul
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-48]
	cmp	r3, #2
	ble	.L3
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	tolower
	str	r0, [fp, #-36]
.L3:
	ldr	r1, .L18+8
	ldr	r0, .L18+12
	bl	open
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L4
	ldr	r3, .L18
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp, #4]
	str	r4, [sp]
	ldr	r3, .L18+16
	mov	r2, #68
	ldr	r1, .L18+20
	mov	r0, r5
	bl	fprintf
	mov	r0, #1
	bl	exit
.L4:
	ldr	r0, .L18+24
	bl	puts
	ldr	r3, .L18+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, [fp, #-32]
	bic	r3, r3, #4080
	bic	r3, r3, #15
	str	r3, [sp, #4]
	ldr	r3, [fp, #-28]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #4096
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	bne	.L5
	ldr	r3, .L18
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp, #4]
	str	r4, [sp]
	ldr	r3, .L18+16
	mov	r2, #74
	ldr	r1, .L18+20
	mov	r0, r5
	bl	fprintf
	mov	r0, #1
	bl	exit
.L5:
	ldr	r1, [fp, #-24]
	ldr	r0, .L18+32
	bl	printf
	ldr	r3, .L18+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #20
	lsr	r3, r3, #20
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-36]
	cmp	r3, #119
	beq	.L6
	ldr	r3, [fp, #-36]
	cmp	r3, #119
	bgt	.L7
	ldr	r3, [fp, #-36]
	cmp	r3, #98
	beq	.L8
	ldr	r3, [fp, #-36]
	cmp	r3, #104
	beq	.L9
	b	.L7
.L8:
	ldr	r3, [fp, #-20]
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-40]
	b	.L10
.L9:
	ldr	r3, [fp, #-20]
	ldrh	r3, [r3]
	str	r3, [fp, #-40]
	b	.L10
.L6:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	b	.L10
.L7:
	ldr	r3, .L18
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	ldr	r1, .L18+36
	mov	r0, r3
	bl	fprintf
	mov	r0, #2
	bl	exit
.L10:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-32]
	ldr	r0, .L18+40
	bl	printf
	ldr	r3, .L18+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r3, [fp, #-48]
	cmp	r3, #3
	ble	.L11
	ldr	r3, [fp, #-52]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtoul
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-36]
	cmp	r3, #119
	beq	.L12
	ldr	r3, [fp, #-36]
	cmp	r3, #119
	bgt	.L13
	ldr	r3, [fp, #-36]
	cmp	r3, #98
	beq	.L14
	ldr	r3, [fp, #-36]
	cmp	r3, #104
	beq	.L15
	b	.L13
.L14:
	ldr	r3, [fp, #-16]
	and	r2, r3, #255
	ldr	r3, [fp, #-20]
	strb	r2, [r3]
	ldr	r3, [fp, #-20]
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-40]
	b	.L13
.L15:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-20]
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-20]
	ldrh	r3, [r3]
	str	r3, [fp, #-40]
	b	.L13
.L12:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	nop
.L13:
	ldr	r2, [fp, #-40]
	ldr	r1, [fp, #-16]
	ldr	r0, .L18+44
	bl	printf
	ldr	r3, .L18+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
.L11:
	mov	r1, #4096
	ldr	r0, [fp, #-24]
	bl	munmap
	mov	r3, r0
	cmn	r3, #1
	bne	.L16
	ldr	r3, .L18
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp, #4]
	str	r4, [sp]
	ldr	r3, .L18+16
	mov	r2, #116
	ldr	r1, .L18+20
	mov	r0, r5
	bl	fprintf
	mov	r0, #1
	bl	exit
.L16:
	ldr	r0, [fp, #-28]
	bl	close
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L19:
	.align	2
.L18:
	.word	stderr
	.word	.LC0
	.word	1052674
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	stdout
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
