	.file	"60036.c"
	.intel_syntax noprefix
	.text
	.globl	memfile
	.bss
	.align 4
	.type	memfile, @object
	.size	memfile, 4
memfile:
	.zero	4
	.globl	gpio
	.align 8
	.type	gpio, @object
	.size	gpio, 8
gpio:
	.zero	8
	.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
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	eax, 0
	call	setup_io
	mov	DWORD PTR -4[rbp], 20
	mov	rcx, QWORD PTR gpio[rip]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx, 2
	sar	eax, 31
	mov	esi, edx
	sub	esi, eax
	movsx	rax, esi
	sal	rax, 2
	add	rax, rcx
	mov	edi, DWORD PTR [rax]
	mov	ecx, DWORD PTR -4[rbp]
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	r8d, ecx
	sar	r8d, 31
	sub	eax, r8d
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	mov	edx, 7
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	not	eax
	mov	ecx, eax
	mov	rdx, QWORD PTR gpio[rip]
	movsx	rax, esi
	sal	rax, 2
	add	rax, rdx
	and	edi, ecx
	mov	edx, edi
	mov	DWORD PTR [rax], edx
	mov	rcx, QWORD PTR gpio[rip]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1717986919
	shr	rdx, 32
	sar	edx, 2
	sar	eax, 31
	mov	esi, edx
	sub	esi, eax
	movsx	rax, esi
	sal	rax, 2
	add	rax, rcx
	mov	edi, DWORD PTR [rax]
	mov	ecx, DWORD PTR -4[rbp]
	movsx	rax, ecx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax, 2
	mov	r8d, ecx
	sar	r8d, 31
	sub	eax, r8d
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	ecx, eax
	mov	rdx, QWORD PTR gpio[rip]
	movsx	rax, esi
	sal	rax, 2
	add	rax, rdx
	or	edi, ecx
	mov	edx, edi
	mov	DWORD PTR [rax], edx
.L2:
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	rax, QWORD PTR gpio[rip]
	add	rax, 28
	mov	DWORD PTR [rax], edx
	mov	edi, 5
	call	sleep@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	rax, QWORD PTR gpio[rip]
	add	rax, 40
	mov	DWORD PTR [rax], edx
	mov	edi, 5
	call	sleep@PLT
	jmp	.L2
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC0:
	.string	"/dev/mem"
.LC1:
	.string	"Could not open /dev/mem : %d\n"
.LC2:
	.string	"mmap error %d\n"
	.text
	.globl	setup_io
	.type	setup_io, @function
setup_io:
.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], 0
	mov	esi, 1052674
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR memfile[rip], eax
	mov	eax, DWORD PTR memfile[rip]
	test	eax, eax
	jns	.L4
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	eax, DWORD PTR memfile[rip]
	mov	r9d, 1059061760
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 4096
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR memfile[rip]
	mov	edi, eax
	call	close@PLT
	cmp	QWORD PTR -8[rbp], -1
	jne	.L5
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR gpio[rip], rax
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	setup_io, .-setup_io
	.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	"60036.c"
	.text
	.comm	memfile,4,4
	.comm	gpio,4,4
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	bl	setup_io
	mov	r3, #20
	str	r3, [fp, #-8]
	ldr	r3, .L3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r1, .L3+4
	smull	r0, r1, r3, r1
	asr	r1, r1, #2
	asr	r3, r3, #31
	sub	ip, r1, r3
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r1, [fp, #-8]
	ldr	r3, .L3+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	mov	r2, #7
	lsl	r3, r2, r3
	mvn	r3, r3
	mov	r1, r3
	ldr	r3, .L3
	ldr	r2, [r3]
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r2, r3
	and	r2, r0, r1
	str	r2, [r3]
	ldr	r3, .L3
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r1, .L3+4
	smull	r0, r1, r3, r1
	asr	r1, r1, #2
	asr	r3, r3, #31
	sub	ip, r1, r3
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r1, [fp, #-8]
	ldr	r3, .L3+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	mov	r2, #1
	lsl	r3, r2, r3
	mov	r1, r3
	ldr	r3, .L3
	ldr	r2, [r3]
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r2, r3
	orr	r2, r0, r1
	str	r2, [r3]
.L2:
	mov	r2, #1
	ldr	r3, [fp, #-8]
	lsl	r2, r2, r3
	ldr	r3, .L3
	ldr	r3, [r3]
	add	r3, r3, #28
	str	r2, [r3]
	mov	r0, #5
	bl	sleep
	mov	r2, #1
	ldr	r3, [fp, #-8]
	lsl	r2, r2, r3
	ldr	r3, .L3
	ldr	r3, [r3]
	add	r3, r3, #40
	str	r2, [r3]
	mov	r0, #5
	bl	sleep
	b	.L2
.L4:
	.align	2
.L3:
	.word	gpio
	.word	1717986919
	.size	main, .-main
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/mem\000"
	.align	2
.LC1:
	.ascii	"Could not open /dev/mem : %d\012\000"
	.align	2
.LC2:
	.ascii	"mmap error %d\012\000"
	.text
	.align	2
	.global	setup_io
	.syntax unified
	.arm
	.fpu softvfp
	.type	setup_io, %function
setup_io:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r1, .L8
	ldr	r0, .L8+4
	bl	open
	mov	r3, r0
	ldr	r2, .L8+8
	str	r3, [r2]
	ldr	r3, .L8+8
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L6
	ldr	r3, .L8+12
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L8+16
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L6:
	ldr	r3, .L8+8
	ldr	r3, [r3]
	ldr	r2, .L8+20
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #4096
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-16]
	ldr	r3, .L8+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L7
	ldr	r3, .L8+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L8+24
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L7:
	ldr	r2, .L8+28
	ldr	r3, [fp, #-16]
	str	r3, [r2]
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L9:
	.align	2
.L8:
	.word	1052674
	.word	.LC0
	.word	memfile
	.word	stderr
	.word	.LC1
	.word	1059061760
	.word	.LC2
	.word	gpio
	.size	setup_io, .-setup_io
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
