	.file	"162642475.c"
	.intel_syntax noprefix
	.text
	.local	gpio_reg
	.comm	gpio_reg,8,8
	.local	pwm_reg
	.comm	pwm_reg,8,8
	.local	clk_reg
	.comm	clk_reg,8,8
	.local	dma_reg
	.comm	dma_reg,8,8
	.local	tick_reg
	.comm	tick_reg,8,8
	.data
	.align 4
	.type	dma_chan, @object
	.size	dma_chan, 4
dma_chan:
	.long	14
	.align 8
	.type	servo2gpio, @object
	.size	servo2gpio, 8
servo2gpio:
	.ascii	"\004\021\022\025\026\027\030\031"
	.globl	trans
	.bss
	.align 32
	.type	trans, @object
	.size	trans, 160
trans:
	.zero	160
	.text
	.type	fatal, @function
fatal:
.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, 224
	mov	QWORD PTR -216[rbp], rdi
	mov	QWORD PTR -168[rbp], rsi
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -136[rbp], r9
	test	al, al
	je	.L2
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm1
	movaps	XMMWORD PTR -96[rbp], xmm2
	movaps	XMMWORD PTR -80[rbp], xmm3
	movaps	XMMWORD PTR -64[rbp], xmm4
	movaps	XMMWORD PTR -48[rbp], xmm5
	movaps	XMMWORD PTR -32[rbp], xmm6
	movaps	XMMWORD PTR -16[rbp], xmm7
.L2:
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -184[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -208[rbp], 8
	mov	DWORD PTR -204[rbp], 48
	lea	rax, 16[rbp]
	mov	QWORD PTR -200[rbp], rax
	lea	rax, -176[rbp]
	mov	QWORD PTR -192[rbp], rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -208[rbp]
	mov	rcx, QWORD PTR -216[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	vfprintf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	fatal, .-fatal
	.section	.rodata
.LC0:
	.string	"nanosleep() failed: %s\n"
	.text
	.type	msleep, @function
msleep:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -32[rbp], 0
	mov	eax, DWORD PTR -36[rbp]
	imul	eax, eax, 1000000
	cdqe
	mov	QWORD PTR -24[rbp], rax
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	nanosleep@PLT
	test	eax, eax
	je	.L7
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, 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
.L7:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	msleep, .-msleep
	.section	.rodata
.LC1:
	.string	"/dev/mem"
.LC2:
	.string	"Failed to open /dev/mem: %m\n"
	.align 8
.LC3:
	.string	"Failed to map peripheral at 0x%08x: %m\n"
	.text
	.type	map_peripheral, @function
map_peripheral:
.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	DWORD PTR -24[rbp], esi
	mov	esi, 2
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jns	.L9
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	fatal
.L9:
	mov	ecx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	edx, DWORD PTR -12[rbp]
	mov	r9, rcx
	mov	r8d, edx
	mov	ecx, 1
	mov	edx, 3
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	jne	.L10
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	fatal
.L10:
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	map_peripheral, .-map_peripheral
	.section	.rodata
	.align 8
.LC4:
	.string	"This code should be compiled with the command:\n"
	.align 8
.LC5:
	.string	"  gcc -Wall -O2 -o servodebug servodebug.c"
	.align 8
.LC6:
	.string	"\nIt should be run with the command:\n"
.LC7:
	.string	"  sudo chrt 1 ./servodebug\n"
	.align 8
.LC8:
	.string	"DMA controller is not running - is the module loaded?\n"
	.align 8
.LC9:
	.string	"\nGood, DMA controller is running"
	.align 8
.LC10:
	.string	"\nTiming 1M cycles of system tick, should take 1000000us"
	.align 8
.LC11:
	.string	"but small variations are to be expected"
	.align 8
.LC12:
	.string	"\n1M increments of system tick measured at %dus\n"
	.align 8
.LC13:
	.string	"\nMonitoring for the first 20 transitions on servo control lines"
	.align 8
.LC14:
	.string	"No servo pulses generated - have you tried \"echo 0=100 > /dev/servoblaster\"?\n"
	.align 8
.LC15:
	.string	"\n    time   outputs\n    (us)   76543210"
.LC16:
	.string	"   %6d  "
.LC17:
	.string	"1"
.LC18:
	.string	"0"
.LC19:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.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, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	esi, 180
	mov	edi, 538968064
	call	map_peripheral
	mov	QWORD PTR gpio_reg[rip], rax
	mov	esi, 3840
	mov	edi, 536899584
	call	map_peripheral
	mov	QWORD PTR dma_reg[rip], rax
	mov	rdx, QWORD PTR dma_reg[rip]
	mov	eax, DWORD PTR dma_chan[rip]
	sal	eax, 8
	shr	eax, 2
	mov	eax, eax
	sal	rax, 2
	add	rax, rdx
	mov	QWORD PTR dma_reg[rip], rax
	mov	esi, 40
	mov	edi, 539017216
	call	map_peripheral
	mov	QWORD PTR pwm_reg[rip], rax
	mov	esi, 168
	mov	edi, 537923584
	call	map_peripheral
	mov	QWORD PTR clk_reg[rip], rax
	mov	esi, 8
	mov	edi, 536883200
	call	map_peripheral
	mov	QWORD PTR tick_reg[rip], rax
	mov	rax, QWORD PTR dma_reg[rip]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -64[rbp], eax
	mov	edi, 5
	call	msleep
	mov	rax, QWORD PTR dma_reg[rip]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -56[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	cmp	eax, DWORD PTR -56[rbp]
	jne	.L13
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	fatal
.L13:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	lea	rax, -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR tick_reg[rip]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -64[rbp], eax
	nop
.L14:
	mov	rax, QWORD PTR tick_reg[rip]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	sub	eax, DWORD PTR -64[rbp]
	cmp	eax, 999999
	jbe	.L14
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	gettimeofday@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	sub	rax, rdx
	imul	edx, eax, 1000000
	mov	rax, QWORD PTR -24[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	mov	DWORD PTR -68[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	DWORD PTR -68[rbp], 0
	mov	DWORD PTR -60[rbp], 0
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	lea	rdx, servo2gpio[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	eax, al
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	or	DWORD PTR -60[rbp], eax
	add	DWORD PTR -68[rbp], 1
.L15:
	mov	eax, DWORD PTR -68[rbp]
	cmp	eax, 7
	jbe	.L16
	mov	rax, QWORD PTR tick_reg[rip]
	mov	eax, DWORD PTR 4[rax]
	mov	DWORD PTR -52[rbp], eax
	mov	rax, QWORD PTR gpio_reg[rip]
	add	rax, 52
	mov	eax, DWORD PTR [rax]
	and	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -64[rbp], eax
	mov	DWORD PTR -72[rbp], 0
	jmp	.L17
.L19:
	mov	rax, QWORD PTR tick_reg[rip]
	add	rax, 4
	mov	eax, DWORD PTR [rax]
	sub	eax, DWORD PTR -52[rbp]
	cmp	eax, 1000000
	jbe	.L18
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	fatal
.L18:
	mov	rax, QWORD PTR gpio_reg[rip]
	add	rax, 52
	mov	eax, DWORD PTR [rax]
	and	eax, DWORD PTR -60[rbp]
	mov	DWORD PTR -56[rbp], eax
	mov	eax, DWORD PTR -64[rbp]
	cmp	eax, DWORD PTR -56[rbp]
	je	.L19
	mov	rax, QWORD PTR tick_reg[rip]
	mov	eax, DWORD PTR 4[rax]
	mov	edx, DWORD PTR -72[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*8]
	lea	rdx, trans[rip]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rdx, trans[rip+4]
	mov	eax, DWORD PTR -56[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -56[rbp]
	mov	DWORD PTR -64[rbp], eax
	add	DWORD PTR -72[rbp], 1
.L17:
	cmp	DWORD PTR -72[rbp], 19
	jle	.L19
	mov	DWORD PTR -72[rbp], 1
	jmp	.L20
.L21:
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, trans[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	edx, DWORD PTR trans[rip]
	sub	eax, edx
	mov	ecx, eax
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, trans[rip]
	mov	DWORD PTR [rdx+rax], ecx
	add	DWORD PTR -72[rbp], 1
.L20:
	cmp	DWORD PTR -72[rbp], 19
	jle	.L21
	mov	DWORD PTR trans[rip], 0
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	DWORD PTR -72[rbp], 0
	jmp	.L22
.L27:
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, trans[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -68[rbp], 7
	jmp	.L23
.L26:
	mov	eax, DWORD PTR -72[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, trans[rip+4]
	mov	esi, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	lea	rdx, servo2gpio[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movzx	eax, al
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	and	eax, esi
	test	eax, eax
	je	.L24
	lea	rax, .LC17[rip]
	jmp	.L25
.L24:
	lea	rax, .LC18[rip]
.L25:
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	sub	DWORD PTR -68[rbp], 1
.L23:
	cmp	DWORD PTR -68[rbp], 0
	jns	.L26
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -72[rbp], 1
.L22:
	cmp	DWORD PTR -72[rbp], 19
	jle	.L27
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"162642475.c"
	.text
	.local	gpio_reg
	.comm	gpio_reg,4,4
	.local	pwm_reg
	.comm	pwm_reg,4,4
	.local	clk_reg
	.comm	clk_reg,4,4
	.local	dma_reg
	.comm	dma_reg,4,4
	.local	tick_reg
	.comm	tick_reg,4,4
	.data
	.align	2
	.type	dma_chan, %object
	.size	dma_chan, 4
dma_chan:
	.word	14
	.align	2
	.type	servo2gpio, %object
	.size	servo2gpio, 8
servo2gpio:
	.ascii	"\004\021\022\025\026\027\030\031"
	.comm	trans,160,4
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fatal, %function
fatal:
	@ args = 4, pretend = 16, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 1
	push	{r0, r1, r2, r3}
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, [fp, #4]
	str	r3, [fp, #-16]
	ldr	r3, .L3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	add	r3, fp, #8
	str	r3, [fp, #-12]
	ldr	r3, .L3+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	vfprintf
	mov	r0, #1
	bl	exit
.L4:
	.align	2
.L3:
	.word	.LC0
	.word	stderr
	.size	fatal, .-fatal
	.section	.rodata
	.align	2
.LC1:
	.ascii	"nanosleep() failed: %s\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	msleep, %function
msleep:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r1, [fp, #-32]
	mov	r2, r1
	lsl	r2, r2, #5
	sub	r2, r2, r1
	lsl	r3, r2, #6
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #6
	str	r3, [fp, #-20]
	sub	r3, fp, #24
	mov	r1, #0
	mov	r0, r3
	bl	nanosleep
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	ldr	r3, .L9+4
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L9+8
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L8:
	nop
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC2
	.word	stderr
	.word	.LC1
	.size	msleep, .-msleep
	.section	.rodata
	.align	2
.LC3:
	.ascii	"/dev/mem\000"
	.align	2
.LC4:
	.ascii	"Failed to open /dev/mem: %m\012\000"
	.align	2
.LC5:
	.ascii	"Failed to map peripheral at 0x%08x: %m\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	map_peripheral, %function
map_peripheral:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r1, #2
	ldr	r0, .L15
	bl	open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L12
	ldr	r0, .L15+4
	bl	fatal
.L12:
	ldr	r3, [fp, #-16]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	ldr	r1, [fp, #-20]
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L13
	ldr	r1, [fp, #-16]
	ldr	r0, .L15+8
	bl	fatal
.L13:
	ldr	r0, [fp, #-12]
	bl	close
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	map_peripheral, .-map_peripheral
	.section	.rodata
	.align	2
.LC6:
	.ascii	"This code should be compiled with the command:\012\000"
	.align	2
.LC7:
	.ascii	"  gcc -Wall -O2 -o servodebug servodebug.c\000"
	.align	2
.LC8:
	.ascii	"\012It should be run with the command:\012\000"
	.align	2
.LC9:
	.ascii	"  sudo chrt 1 ./servodebug\012\000"
	.align	2
.LC10:
	.ascii	"DMA controller is not running - is the module loade"
	.ascii	"d?\012\000"
	.align	2
.LC11:
	.ascii	"\012Good, DMA controller is running\000"
	.align	2
.LC12:
	.ascii	"\012Timing 1M cycles of system tick, should take 10"
	.ascii	"00000us\000"
	.align	2
.LC13:
	.ascii	"but small variations are to be expected\000"
	.align	2
.LC14:
	.ascii	"\0121M increments of system tick measured at %dus\012"
	.ascii	"\000"
	.align	2
.LC15:
	.ascii	"\012Monitoring for the first 20 transitions on serv"
	.ascii	"o control lines\000"
	.align	2
.LC16:
	.ascii	"No servo pulses generated - have you tried \"echo 0"
	.ascii	"=100 > /dev/servoblaster\"?\012\000"
	.align	2
.LC17:
	.ascii	"\012    time   outputs\012    (us)   76543210\000"
	.align	2
.LC18:
	.ascii	"   %6d  \000"
	.align	2
.LC19:
	.ascii	"1\000"
	.align	2
.LC20:
	.ascii	"0\000"
	.align	2
.LC21:
	.ascii	"%s\000"
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L35
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L35+4
	bl	puts
	ldr	r0, .L35+8
	bl	puts
	ldr	r0, .L35+12
	bl	puts
	ldr	r0, .L35+16
	bl	puts
	mov	r1, #180
	ldr	r0, .L35+20
	bl	map_peripheral
	mov	r3, r0
	ldr	r2, .L35+24
	str	r3, [r2]
	mov	r1, #3840
	ldr	r0, .L35+28
	bl	map_peripheral
	mov	r3, r0
	ldr	r2, .L35+32
	str	r3, [r2]
	ldr	r3, .L35+32
	ldr	r2, [r3]
	ldr	r3, .L35+36
	ldr	r3, [r3]
	lsl	r3, r3, #8
	add	r3, r2, r3
	ldr	r2, .L35+32
	str	r3, [r2]
	mov	r1, #40
	ldr	r0, .L35+40
	bl	map_peripheral
	mov	r3, r0
	ldr	r2, .L35+44
	str	r3, [r2]
	mov	r1, #168
	ldr	r0, .L35+48
	bl	map_peripheral
	mov	r3, r0
	ldr	r2, .L35+52
	str	r3, [r2]
	mov	r1, #8
	ldr	r0, .L35+56
	bl	map_peripheral
	mov	r3, r0
	ldr	r2, .L35+60
	str	r3, [r2]
	ldr	r3, .L35+32
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-40]
	mov	r0, #5
	bl	msleep
	ldr	r3, .L35+32
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-32]
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	bne	.L18
	ldr	r0, .L35+64
	bl	fatal
.L18:
	ldr	r0, .L35+68
	bl	puts
	ldr	r0, .L35+72
	bl	puts
	ldr	r0, .L35+76
	bl	puts
	sub	r3, fp, #24
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r3, .L35+60
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-40]
	nop
.L19:
	ldr	r3, .L35+60
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	sub	r3, r2, r3
	ldr	r2, .L35+80
	cmp	r3, r2
	bcc	.L19
	sub	r3, fp, #16
	mov	r1, #0
	mov	r0, r3
	bl	gettimeofday
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	sub	r1, r2, r3
	mov	r2, r1
	lsl	r2, r2, #5
	sub	r2, r2, r1
	lsl	r3, r2, #6
	sub	r3, r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r1
	lsl	r3, r3, #6
	mov	r2, r3
	ldr	r3, [fp, #-12]
	add	r2, r2, r3
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	str	r3, [fp, #-44]
	ldr	r1, [fp, #-44]
	ldr	r0, .L35+84
	bl	printf
	ldr	r0, .L35+88
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L20
.L21:
	ldr	r2, .L35+92
	ldr	r3, [fp, #-44]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	mov	r3, #1
	lsl	r3, r3, r2
	mov	r2, r3
	ldr	r3, [fp, #-36]
	orr	r3, r3, r2
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L20:
	ldr	r3, [fp, #-44]
	cmp	r3, #7
	bls	.L21
	ldr	r3, .L35+60
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-28]
	ldr	r3, .L35+24
	ldr	r3, [r3]
	add	r3, r3, #52
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	and	r3, r3, r2
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L22
.L24:
	ldr	r3, .L35+60
	ldr	r3, [r3]
	add	r3, r3, #4
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	sub	r3, r2, r3
	ldr	r2, .L35+80
	cmp	r3, r2
	bls	.L23
	ldr	r0, .L35+96
	bl	fatal
.L23:
	ldr	r3, .L35+24
	ldr	r3, [r3]
	add	r3, r3, #52
	ldr	r3, [r3]
	ldr	r2, [fp, #-36]
	and	r3, r3, r2
	str	r3, [fp, #-32]
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-32]
	cmp	r2, r3
	beq	.L24
	ldr	r3, .L35+60
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r1, .L35+100
	ldr	r3, [fp, #-48]
	str	r2, [r1, r3, lsl #3]
	ldr	r2, .L35+100
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r2, [fp, #-32]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L22:
	ldr	r3, [fp, #-48]
	cmp	r3, #19
	ble	.L24
	mov	r3, #1
	str	r3, [fp, #-48]
	b	.L25
.L26:
	ldr	r2, .L35+100
	ldr	r3, [fp, #-48]
	ldr	r2, [r2, r3, lsl #3]
	ldr	r3, .L35+100
	ldr	r3, [r3]
	sub	r2, r2, r3
	ldr	r1, .L35+100
	ldr	r3, [fp, #-48]
	str	r2, [r1, r3, lsl #3]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L25:
	ldr	r3, [fp, #-48]
	cmp	r3, #19
	ble	.L26
	ldr	r3, .L35+100
	mov	r2, #0
	str	r2, [r3]
	ldr	r0, .L35+104
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L27
.L32:
	ldr	r2, .L35+100
	ldr	r3, [fp, #-48]
	ldr	r3, [r2, r3, lsl #3]
	mov	r1, r3
	ldr	r0, .L35+108
	bl	printf
	mov	r3, #7
	str	r3, [fp, #-44]
	b	.L28
.L31:
	ldr	r2, .L35+100
	ldr	r3, [fp, #-48]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	ldr	r1, .L35+92
	ldr	r2, [fp, #-44]
	add	r2, r1, r2
	ldrb	r2, [r2]	@ zero_extendqisi2
	mov	r1, r2
	mov	r2, #1
	lsl	r2, r2, r1
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L29
	ldr	r3, .L35+112
	b	.L30
.L29:
	ldr	r3, .L35+116
.L30:
	mov	r1, r3
	ldr	r0, .L35+120
	bl	printf
	ldr	r3, [fp, #-44]
	sub	r3, r3, #1
	str	r3, [fp, #-44]
.L28:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bge	.L31
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L27:
	ldr	r3, [fp, #-48]
	cmp	r3, #19
	ble	.L32
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	ldr	r2, .L35
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L34
	bl	__stack_chk_fail
.L34:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L36:
	.align	2
.L35:
	.word	.LC22
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	538968064
	.word	gpio_reg
	.word	536899584
	.word	dma_reg
	.word	dma_chan
	.word	539017216
	.word	pwm_reg
	.word	537923584
	.word	clk_reg
	.word	536883200
	.word	tick_reg
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	1000000
	.word	.LC14
	.word	.LC15
	.word	servo2gpio
	.word	.LC16
	.word	trans
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
