	.file	"3262868.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"%s Error setting scheduler ... (root privileges needed)\n"
.LC1:
	.string	"Scheduler priority is %d\n"
	.align 8
.LC2:
	.string	"FIFO scheduler max priority is:%d\n"
	.text
	.globl	set_process_scheduler
	.type	set_process_scheduler, @function
set_process_scheduler:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], 99
	mov	DWORD PTR -16[rbp], 99
	call	getpid@PLT
	mov	ecx, eax
	lea	rax, -12[rbp]
	mov	rdx, rax
	mov	esi, 1
	mov	edi, ecx
	call	sched_setscheduler@PLT
	cmp	eax, -1
	jne	.L2
	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
.L2:
	mov	eax, DWORD PTR -16[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sched_get_priority_max@PLT
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	set_process_scheduler, .-set_process_scheduler
	.section	.rodata
	.align 8
.LC3:
	.string	"PROCESS scheduler is SCHED_OTHER scheduler"
	.align 8
.LC4:
	.string	"PROCESS scheduler is SCHED_FIFO scheduler"
	.align 8
.LC5:
	.string	"PROCESS scheduler is SCHED_RR scheduler"
.LC6:
	.string	"Not known scheduler"
	.text
	.globl	get_process_scheduler
	.type	get_process_scheduler, @function
get_process_scheduler:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	getpid@PLT
	mov	edi, eax
	call	sched_getscheduler@PLT
	cmp	eax, 2
	je	.L5
	cmp	eax, 2
	jg	.L6
	test	eax, eax
	je	.L7
	cmp	eax, 1
	je	.L8
	jmp	.L6
.L7:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	jmp	.L9
.L8:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L9
.L5:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L9
.L6:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	nop
.L9:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	get_process_scheduler, .-get_process_scheduler
	.section	.rodata
.LC7:
	.string	"%d"
	.align 8
.LC8:
	.string	"The process with pid %d has affinity %d CPUs ... %s\n"
	.text
	.globl	get_process_affinity
	.type	get_process_affinity, @function
get_process_affinity:
.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, 272
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	getpid@PLT
	mov	DWORD PTR -252[rbp], eax
	mov	DWORD PTR -260[rbp], 0
	lea	rax, -240[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 16
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rax, -240[rbp]
	mov	rdx, rax
	mov	esi, 128
	mov	edi, 0
	call	sched_getaffinity@PLT
	lea	rax, -96[rbp]
	mov	WORD PTR [rax], 32
	mov	DWORD PTR -256[rbp], 0
	jmp	.L11
.L15:
	mov	eax, DWORD PTR -256[rbp]
	cdqe
	mov	QWORD PTR -248[rbp], rax
	cmp	QWORD PTR -248[rbp], 1023
	ja	.L12
	mov	rax, QWORD PTR -248[rbp]
	shr	rax, 6
	lea	rdx, 0[0+rax*8]
	lea	rax, -240[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -248[rbp]
	and	eax, 63
	mov	ecx, eax
	shr	rdx, cl
	mov	rax, rdx
	and	eax, 1
	test	rax, rax
	je	.L12
	mov	eax, 1
	jmp	.L13
.L12:
	mov	eax, 0
.L13:
	test	eax, eax
	je	.L14
	add	DWORD PTR -260[rbp], 1
	mov	edx, DWORD PTR -256[rbp]
	lea	rax, -99[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rdx, -99[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
.L14:
	add	DWORD PTR -256[rbp], 1
.L11:
	cmp	DWORD PTR -256[rbp], 1023
	jle	.L15
	lea	rcx, -96[rbp]
	mov	edx, DWORD PTR -260[rbp]
	mov	eax, DWORD PTR -252[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	get_process_affinity, .-get_process_affinity
	.globl	set_process_affinity
	.type	set_process_affinity, @function
set_process_affinity:
.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, 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -144[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 16
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	mov	QWORD PTR -152[rbp], 0
	cmp	QWORD PTR -152[rbp], 1023
	ja	.L19
	mov	rax, QWORD PTR -152[rbp]
	shr	rax, 6
	lea	rdx, 0[0+rax*8]
	lea	rcx, -144[rbp]
	add	rdx, rcx
	mov	rsi, QWORD PTR [rdx]
	mov	rdx, QWORD PTR -152[rbp]
	and	edx, 63
	mov	edi, 1
	mov	ecx, edx
	sal	rdi, cl
	mov	rdx, rdi
	lea	rcx, 0[0+rax*8]
	lea	rax, -144[rbp]
	add	rax, rcx
	or	rdx, rsi
	mov	QWORD PTR [rax], rdx
.L19:
	lea	rax, -144[rbp]
	mov	rdx, rax
	mov	esi, 128
	mov	edi, 0
	call	sched_setaffinity@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	set_process_affinity, .-set_process_affinity
	.section	.rodata
	.align 8
.LC9:
	.string	"The thread %d has affinity %d CPUs ... %s\n"
	.text
	.globl	get_thread_affinity
	.type	get_thread_affinity, @function
get_thread_affinity:
.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, 272
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -256[rbp], 0
	lea	rax, -240[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 16
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	call	pthread_self@PLT
	mov	rcx, rax
	lea	rax, -240[rbp]
	mov	rdx, rax
	mov	esi, 128
	mov	rdi, rcx
	call	pthread_getaffinity_np@PLT
	call	pthread_self@PLT
	mov	DWORD PTR -252[rbp], eax
	lea	rax, -96[rbp]
	mov	WORD PTR [rax], 32
	mov	DWORD PTR -260[rbp], 0
	jmp	.L22
.L26:
	mov	eax, DWORD PTR -260[rbp]
	cdqe
	mov	QWORD PTR -248[rbp], rax
	cmp	QWORD PTR -248[rbp], 1023
	ja	.L23
	mov	rax, QWORD PTR -248[rbp]
	shr	rax, 6
	lea	rdx, 0[0+rax*8]
	lea	rax, -240[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -248[rbp]
	and	eax, 63
	mov	ecx, eax
	shr	rdx, cl
	mov	rax, rdx
	and	eax, 1
	test	rax, rax
	je	.L23
	mov	eax, 1
	jmp	.L24
.L23:
	mov	eax, 0
.L24:
	test	eax, eax
	je	.L25
	add	DWORD PTR -256[rbp], 1
	mov	edx, DWORD PTR -260[rbp]
	lea	rax, -99[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rdx, -99[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
.L25:
	add	DWORD PTR -260[rbp], 1
.L22:
	cmp	DWORD PTR -260[rbp], 1023
	jle	.L26
	lea	rcx, -96[rbp]
	mov	edx, DWORD PTR -256[rbp]
	mov	eax, DWORD PTR -252[rbp]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	get_thread_affinity, .-get_thread_affinity
	.globl	set_thread_affinity
	.type	set_thread_affinity, @function
set_thread_affinity:
.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, 176
	mov	DWORD PTR -164[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -144[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 16
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	mov	eax, DWORD PTR -164[rbp]
	cdqe
	mov	QWORD PTR -152[rbp], rax
	cmp	QWORD PTR -152[rbp], 1023
	ja	.L30
	mov	rax, QWORD PTR -152[rbp]
	shr	rax, 6
	lea	rdx, 0[0+rax*8]
	lea	rcx, -144[rbp]
	add	rdx, rcx
	mov	rsi, QWORD PTR [rdx]
	mov	rdx, QWORD PTR -152[rbp]
	and	edx, 63
	mov	edi, 1
	mov	ecx, edx
	sal	rdi, cl
	mov	rdx, rdi
	lea	rcx, 0[0+rax*8]
	lea	rax, -144[rbp]
	add	rax, rcx
	or	rdx, rsi
	mov	QWORD PTR [rax], rdx
.L30:
	call	pthread_self@PLT
	mov	rcx, rax
	lea	rax, -144[rbp]
	mov	rdx, rax
	mov	esi, 128
	mov	rdi, rcx
	call	pthread_setaffinity_np@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	set_thread_affinity, .-set_thread_affinity
	.section	.rodata
	.align 8
.LC10:
	.string	"Could not lock process in memory"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 3
	call	mlockall@PLT
	test	eax, eax
	jns	.L33
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	edi, 2
	call	exit@PLT
.L33:
	mov	eax, 0
	call	set_process_scheduler
	mov	eax, 0
	call	get_process_scheduler
	mov	eax, 0
	call	get_process_affinity
	mov	eax, 0
	call	set_process_affinity
	mov	eax, 0
	call	get_process_affinity
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	cdqe
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -24[rbp]
	mov	rcx, rdx
	lea	rdx, thread_function[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_join@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L35
	call	__stack_chk_fail@PLT
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC11:
	.string	"Could not lock thread in memory"
.LC12:
	.string	"arg=%ld\n"
.LC13:
	.string	"/sys/class/gpio/export"
	.align 8
.LC14:
	.string	"Failed to export gpio (for writing in pin).\n"
	.align 8
.LC15:
	.string	"/sys/class/gpio/gpio%d/direction"
	.align 8
.LC16:
	.string	"Failed to open GPIODirection_in.\n"
.LC17:
	.string	"in"
.LC18:
	.string	"/sys/class/gpio/gpio%d/edge"
.LC19:
	.string	"Failed to open GPIOEdge_in.\n"
.LC20:
	.string	"both"
	.align 8
.LC21:
	.string	"Failed to export gpio (for writing out pin).\n"
	.align 8
.LC22:
	.string	"Failed to open GPIODirection_out.\n"
.LC23:
	.string	"out"
.LC24:
	.string	"/sys/class/gpio/gpio%d/value"
	.align 8
.LC25:
	.string	"Failed to open GPIO_out %d value for writing.\n"
	.align 8
.LC26:
	.string	"Failed to open GPIO_in %d value for reading.\n"
.LC27:
	.string	"/sys/class/gpio/unexport"
	.align 8
.LC28:
	.string	"Failed to unexport gpio pin in.\n"
	.align 8
.LC29:
	.string	"Failed to unexport gpio pin out.\n"
	.text
	.globl	thread_function
	.type	thread_function, @function
thread_function:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 496
	mov	QWORD PTR -488[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 3
	call	mlockall@PLT
	test	eax, eax
	jns	.L37
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	edi, 2
	call	exit@PLT
.L37:
	mov	rax, QWORD PTR -488[rbp]
	mov	QWORD PTR -440[rbp], rax
	mov	rax, QWORD PTR -440[rbp]
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	QWORD PTR -448[rbp], 1
	mov	DWORD PTR -468[rbp], 99
	call	pthread_self@PLT
	mov	rcx, rax
	lea	rax, -468[rbp]
	mov	rdx, rax
	mov	esi, 1
	mov	rdi, rcx
	call	pthread_setschedparam@PLT
	mov	eax, 0
	call	get_thread_affinity
	mov	edi, 0
	call	set_thread_affinity
	mov	eax, 0
	call	get_thread_affinity
	mov	edi, 0
	call	time@PLT
	mov	QWORD PTR -456[rbp], rax
	lea	rax, -456[rbp]
	mov	rdi, rax
	call	ctime@PLT
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	lea	rax, -408[rbp]
	mov	edx, 4
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	esi, 1
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -464[rbp], eax
	cmp	DWORD PTR -464[rbp], 0
	jns	.L38
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 44
	mov	esi, 1
	lea	rdi, .LC14[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L38:
	lea	rcx, -408[rbp]
	mov	eax, DWORD PTR -464[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -464[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rax, -336[rbp]
	mov	edx, 4
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -336[rbp]
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -464[rbp], eax
	cmp	DWORD PTR -464[rbp], 0
	jns	.L39
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 33
	mov	esi, 1
	lea	rdi, .LC16[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L39:
	mov	eax, DWORD PTR -464[rbp]
	mov	edx, 3
	lea	rsi, .LC17[rip]
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -464[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rax, -208[rbp]
	mov	edx, 4
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -208[rbp]
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -464[rbp], eax
	cmp	DWORD PTR -464[rbp], 0
	jns	.L40
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 28
	mov	esi, 1
	lea	rdi, .LC19[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L40:
	mov	eax, DWORD PTR -464[rbp]
	mov	edx, 5
	lea	rsi, .LC20[rip]
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -464[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rax, -404[rbp]
	mov	edx, 2
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	esi, 1
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -464[rbp], eax
	cmp	DWORD PTR -464[rbp], 0
	jns	.L41
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 45
	mov	esi, 1
	lea	rdi, .LC21[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L41:
	lea	rcx, -404[rbp]
	mov	eax, DWORD PTR -464[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -464[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rax, -144[rbp]
	mov	edx, 2
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -144[rbp]
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -464[rbp], eax
	cmp	DWORD PTR -464[rbp], 0
	jns	.L42
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 34
	mov	esi, 1
	lea	rdi, .LC22[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L42:
	mov	eax, DWORD PTR -464[rbp]
	mov	edx, 4
	lea	rsi, .LC23[rip]
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -464[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rax, -80[rbp]
	mov	edx, 2
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -80[rbp]
	mov	esi, 1
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -460[rbp], eax
	cmp	DWORD PTR -460[rbp], 0
	jns	.L43
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 2
	lea	rsi, .LC25[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L43:
	lea	rax, -272[rbp]
	mov	edx, 4
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -272[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -464[rbp], eax
	cmp	DWORD PTR -464[rbp], 0
	jns	.L44
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 4
	lea	rsi, .LC26[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L44:
	mov	eax, DWORD PTR -464[rbp]
	mov	DWORD PTR -432[rbp], eax
	mov	WORD PTR -428[rbp], 2
	mov	eax, DWORD PTR -464[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	lea	rcx, -400[rbp]
	mov	eax, DWORD PTR -464[rbp]
	mov	edx, 64
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	jmp	.L45
.L46:
	lea	rax, -432[rbp]
	mov	edx, -1
	mov	esi, 1
	mov	rdi, rax
	call	poll@PLT
	mov	eax, DWORD PTR -464[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	lseek@PLT
	lea	rcx, -400[rbp]
	mov	eax, DWORD PTR -464[rbp]
	mov	edx, 64
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	lea	rcx, -400[rbp]
	mov	eax, DWORD PTR -460[rbp]
	mov	edx, 64
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	add	QWORD PTR -448[rbp], 1
.L45:
	mov	rax, QWORD PTR -448[rbp]
	cmp	rax, QWORD PTR -440[rbp]
	jle	.L46
	mov	eax, DWORD PTR -464[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -460[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 10
	call	putchar@PLT
	mov	esi, 1
	lea	rdi, .LC27[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -464[rbp], eax
	cmp	DWORD PTR -464[rbp], 0
	jns	.L47
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 32
	mov	esi, 1
	lea	rdi, .LC28[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L47:
	lea	rcx, -408[rbp]
	mov	eax, DWORD PTR -464[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -464[rbp]
	mov	edi, eax
	call	close@PLT
	mov	esi, 1
	lea	rdi, .LC27[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -464[rbp], eax
	cmp	DWORD PTR -464[rbp], 0
	jns	.L48
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 33
	mov	esi, 1
	lea	rdi, .LC29[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L48:
	lea	rcx, -404[rbp]
	mov	eax, DWORD PTR -464[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -464[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L50
	call	__stack_chk_fail@PLT
.L50:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	thread_function, .-thread_function
	.section	.rodata
	.type	buf2.0, @object
	.size	buf2.0, 3
buf2.0:
	.string	"01"
	.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	"3262868.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s Error setting scheduler ... (root privileges nee"
	.ascii	"ded)\012\000"
	.align	2
.LC1:
	.ascii	"Scheduler priority is %d\012\000"
	.align	2
.LC2:
	.ascii	"FIFO scheduler max priority is:%d\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	set_process_scheduler
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_process_scheduler, %function
set_process_scheduler:
	@ 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
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #99
	str	r3, [fp, #-20]
	mov	r3, #99
	str	r3, [fp, #-24]
	bl	getpid
	sub	r3, fp, #20
	mov	r2, r3
	mov	r1, #1
	bl	sched_setscheduler
	mov	r3, r0
	cmn	r3, #1
	bne	.L2
	ldr	r3, .L4+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, .L4+8
	mov	r0, r4
	bl	fprintf
.L2:
	ldr	r3, [fp, #-24]
	mov	r1, r3
	ldr	r0, .L4+12
	bl	printf
	mov	r0, #1
	bl	sched_get_priority_max
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L4+16
	bl	printf
	nop
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC3
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	set_process_scheduler, .-set_process_scheduler
	.section	.rodata
	.align	2
.LC4:
	.ascii	"PROCESS scheduler is SCHED_OTHER scheduler\000"
	.align	2
.LC5:
	.ascii	"PROCESS scheduler is SCHED_FIFO scheduler\000"
	.align	2
.LC6:
	.ascii	"PROCESS scheduler is SCHED_RR scheduler\000"
	.align	2
.LC7:
	.ascii	"Not known scheduler\000"
	.text
	.align	2
	.global	get_process_scheduler
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_process_scheduler, %function
get_process_scheduler:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	getpid
	mov	r3, r0
	mov	r0, r3
	bl	sched_getscheduler
	mov	r3, r0
	cmp	r3, #2
	beq	.L7
	cmp	r3, #2
	bgt	.L8
	cmp	r3, #0
	beq	.L9
	cmp	r3, #1
	beq	.L10
	b	.L8
.L9:
	ldr	r0, .L12
	bl	puts
	b	.L11
.L10:
	ldr	r0, .L12+4
	bl	puts
	b	.L11
.L7:
	ldr	r0, .L12+8
	bl	puts
	b	.L11
.L8:
	ldr	r0, .L12+12
	bl	puts
	nop
.L11:
	nop
	mov	r0, r3
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	get_process_scheduler, .-get_process_scheduler
	.section	.rodata
	.align	2
.LC8:
	.ascii	"%d\000"
	.align	2
.LC9:
	.ascii	"The process with pid %d has affinity %d CPUs ... %s"
	.ascii	"\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_process_affinity
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_process_affinity, %function
get_process_affinity:
	@ args = 0, pretend = 0, frame = 232
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #232
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	getpid
	str	r0, [fp, #-228]
	mov	r3, #0
	str	r3, [fp, #-236]
	sub	r3, fp, #220
	mov	r0, r3
	mov	r3, #128
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #220
	mov	r2, r3
	mov	r1, #128
	mov	r0, #0
	bl	sched_getaffinity
	sub	r3, fp, #88
	mov	r2, #32
	strh	r2, [r3]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-232]
	b	.L15
.L19:
	ldr	r3, [fp, #-232]
	str	r3, [fp, #-224]
	ldr	r3, [fp, #-224]
	cmp	r3, #1024
	bcs	.L16
	ldr	r3, [fp, #-224]
	lsr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #220
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-224]
	and	r3, r3, #31
	lsr	r3, r2, r3
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L16
	mov	r3, #1
	b	.L17
.L16:
	mov	r3, #0
.L17:
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-236]
	add	r3, r3, #1
	str	r3, [fp, #-236]
	sub	r3, fp, #92
	ldr	r2, [fp, #-232]
	ldr	r1, .L21+4
	mov	r0, r3
	bl	sprintf
	sub	r2, fp, #92
	sub	r3, fp, #88
	mov	r1, r2
	mov	r0, r3
	bl	strcat
.L18:
	ldr	r3, [fp, #-232]
	add	r3, r3, #1
	str	r3, [fp, #-232]
.L15:
	ldr	r3, [fp, #-232]
	cmp	r3, #1024
	blt	.L19
	sub	r3, fp, #88
	ldr	r2, [fp, #-236]
	ldr	r1, [fp, #-228]
	ldr	r0, .L21+8
	bl	printf
	nop
	ldr	r3, .L21
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC10
	.word	.LC8
	.word	.LC9
	.size	get_process_affinity, .-get_process_affinity
	.section	.rodata
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	set_process_affinity
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_process_affinity, %function
set_process_affinity:
	@ 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, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #136
	mov	r0, r3
	mov	r3, #128
	mov	r2, r3
	mov	r1, #0
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #1024
	bcs	.L25
	ldr	r3, [fp, #-140]
	lsr	r3, r3, #5
	lsl	r2, r3, #2
	sub	r1, fp, #136
	add	r2, r1, r2
	ldr	r1, [r2]
	ldr	r2, [fp, #-140]
	and	r2, r2, #31
	mov	r0, #1
	lsl	r2, r0, r2
	lsl	r3, r3, #2
	sub	r0, fp, #136
	add	r3, r0, r3
	orr	r2, r1, r2
	str	r2, [r3]
.L25:
	sub	r3, fp, #136
	mov	r2, r3
	mov	r1, #128
	mov	r0, #0
	bl	sched_setaffinity
	nop
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC11
	.size	set_process_affinity, .-set_process_affinity
	.section	.rodata
	.align	2
.LC12:
	.ascii	"The thread %d has affinity %d CPUs ... %s\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_thread_affinity
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_thread_affinity, %function
get_thread_affinity:
	@ args = 0, pretend = 0, frame = 232
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #232
	ldr	r3, .L36
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-232]
	sub	r3, fp, #220
	mov	r0, r3
	mov	r3, #128
	mov	r2, r3
	mov	r1, #0
	bl	memset
	bl	pthread_self
	sub	r3, fp, #220
	mov	r2, r3
	mov	r1, #128
	bl	pthread_getaffinity_np
	bl	pthread_self
	mov	r3, r0
	str	r3, [fp, #-228]
	sub	r3, fp, #88
	mov	r2, #32
	strh	r2, [r3]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-236]
	b	.L30
.L34:
	ldr	r3, [fp, #-236]
	str	r3, [fp, #-224]
	ldr	r3, [fp, #-224]
	cmp	r3, #1024
	bcs	.L31
	ldr	r3, [fp, #-224]
	lsr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #220
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-224]
	and	r3, r3, #31
	lsr	r3, r2, r3
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L31
	mov	r3, #1
	b	.L32
.L31:
	mov	r3, #0
.L32:
	cmp	r3, #0
	beq	.L33
	ldr	r3, [fp, #-232]
	add	r3, r3, #1
	str	r3, [fp, #-232]
	sub	r3, fp, #92
	ldr	r2, [fp, #-236]
	ldr	r1, .L36+4
	mov	r0, r3
	bl	sprintf
	sub	r2, fp, #92
	sub	r3, fp, #88
	mov	r1, r2
	mov	r0, r3
	bl	strcat
.L33:
	ldr	r3, [fp, #-236]
	add	r3, r3, #1
	str	r3, [fp, #-236]
.L30:
	ldr	r3, [fp, #-236]
	cmp	r3, #1024
	blt	.L34
	sub	r3, fp, #88
	ldr	r2, [fp, #-232]
	ldr	r1, [fp, #-228]
	ldr	r0, .L36+8
	bl	printf
	nop
	ldr	r3, .L36
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L35
	bl	__stack_chk_fail
.L35:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	.LC13
	.word	.LC8
	.word	.LC12
	.size	get_thread_affinity, .-get_thread_affinity
	.section	.rodata
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	set_thread_affinity
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_thread_affinity, %function
set_thread_affinity:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #144
	str	r0, [fp, #-144]
	ldr	r3, .L42
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #136
	mov	r0, r3
	mov	r3, #128
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, [fp, #-144]
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-140]
	cmp	r3, #1024
	bcs	.L40
	ldr	r3, [fp, #-140]
	lsr	r3, r3, #5
	lsl	r2, r3, #2
	sub	r1, fp, #136
	add	r2, r1, r2
	ldr	r1, [r2]
	ldr	r2, [fp, #-140]
	and	r2, r2, #31
	mov	r0, #1
	lsl	r2, r0, r2
	lsl	r3, r3, #2
	sub	r0, fp, #136
	add	r3, r0, r3
	orr	r2, r1, r2
	str	r2, [r3]
.L40:
	bl	pthread_self
	sub	r3, fp, #136
	mov	r2, r3
	mov	r1, #128
	bl	pthread_setaffinity_np
	nop
	ldr	r3, .L42
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L41
	bl	__stack_chk_fail
.L41:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC14
	.size	set_thread_affinity, .-set_thread_affinity
	.section	.rodata
	.align	2
.LC15:
	.ascii	"Could not lock process in memory\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, .L48
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #3
	bl	mlockall
	mov	r3, r0
	cmp	r3, #0
	bge	.L45
	ldr	r0, .L48+4
	bl	perror
	mov	r0, #2
	bl	exit
.L45:
	bl	set_process_scheduler
	bl	get_process_scheduler
	bl	get_process_affinity
	bl	set_process_affinity
	bl	get_process_affinity
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	sub	r0, fp, #16
	ldr	r2, .L48+8
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_join
	mov	r3, #0
	ldr	r2, .L48
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L47
	bl	__stack_chk_fail
.L47:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L49:
	.align	2
.L48:
	.word	.LC16
	.word	.LC15
	.word	thread_function
	.size	main, .-main
	.section	.rodata
	.align	2
.LC17:
	.ascii	"Could not lock thread in memory\000"
	.align	2
.LC18:
	.ascii	"arg=%ld\012\000"
	.align	2
.LC19:
	.ascii	"/sys/class/gpio/export\000"
	.align	2
.LC20:
	.ascii	"Failed to export gpio (for writing in pin).\012\000"
	.align	2
.LC21:
	.ascii	"/sys/class/gpio/gpio%d/direction\000"
	.align	2
.LC22:
	.ascii	"Failed to open GPIODirection_in.\012\000"
	.align	2
.LC23:
	.ascii	"in\000"
	.align	2
.LC24:
	.ascii	"/sys/class/gpio/gpio%d/edge\000"
	.align	2
.LC25:
	.ascii	"Failed to open GPIOEdge_in.\012\000"
	.align	2
.LC26:
	.ascii	"both\000"
	.align	2
.LC27:
	.ascii	"Failed to export gpio (for writing out pin).\012\000"
	.align	2
.LC28:
	.ascii	"Failed to open GPIODirection_out.\012\000"
	.align	2
.LC29:
	.ascii	"out\000"
	.align	2
.LC30:
	.ascii	"/sys/class/gpio/gpio%d/value\000"
	.align	2
.LC31:
	.ascii	"Failed to open GPIO_out %d value for writing.\012\000"
	.align	2
.LC32:
	.ascii	"Failed to open GPIO_in %d value for reading.\012\000"
	.align	2
.LC33:
	.ascii	"/sys/class/gpio/unexport\000"
	.align	2
.LC34:
	.ascii	"Failed to unexport gpio pin in.\012\000"
	.align	2
.LC35:
	.ascii	"Failed to unexport gpio pin out.\012\000"
	.align	2
.LC36:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	thread_function
	.syntax unified
	.arm
	.fpu softvfp
	.type	thread_function, %function
thread_function:
	@ args = 0, pretend = 0, frame = 440
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #440
	str	r0, [fp, #-440]
	ldr	r3, .L65
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #3
	bl	mlockall
	mov	r3, r0
	cmp	r3, #0
	bge	.L51
	ldr	r0, .L65+4
	bl	perror
	mov	r0, #2
	bl	exit
.L51:
	ldr	r3, [fp, #-440]
	str	r3, [fp, #-420]
	ldr	r1, [fp, #-420]
	ldr	r0, .L65+8
	bl	printf
	mov	r3, #1
	str	r3, [fp, #-424]
	mov	r3, #99
	str	r3, [fp, #-428]
	bl	pthread_self
	sub	r3, fp, #428
	mov	r2, r3
	mov	r1, #1
	bl	pthread_setschedparam
	bl	get_thread_affinity
	mov	r0, #0
	bl	set_thread_affinity
	bl	get_thread_affinity
	mov	r0, #0
	bl	time
	mov	r3, r0
	str	r3, [fp, #-432]
	sub	r3, fp, #432
	mov	r0, r3
	bl	ctime
	mov	r3, r0
	mov	r0, r3
	bl	printf
	sub	r3, fp, #400
	mov	r2, #4
	ldr	r1, .L65+12
	mov	r0, r3
	bl	sprintf
	mov	r1, #1
	ldr	r0, .L65+16
	bl	open
	str	r0, [fp, #-416]
	ldr	r3, [fp, #-416]
	cmp	r3, #0
	bge	.L52
	ldr	r3, .L65+20
	ldr	r3, [r3]
	mov	r2, #44
	mov	r1, #1
	ldr	r0, .L65+24
	bl	fwrite
	mov	r0, #1
	bl	exit
.L52:
	sub	r3, fp, #400
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-416]
	bl	write
	ldr	r0, [fp, #-416]
	bl	close
	sub	r3, fp, #328
	mov	r2, #4
	ldr	r1, .L65+28
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #328
	mov	r1, #1
	mov	r0, r3
	bl	open
	str	r0, [fp, #-416]
	ldr	r3, [fp, #-416]
	cmp	r3, #0
	bge	.L53
	ldr	r3, .L65+20
	ldr	r3, [r3]
	mov	r2, #33
	mov	r1, #1
	ldr	r0, .L65+32
	bl	fwrite
	mov	r0, #1
	bl	exit
.L53:
	mov	r2, #3
	ldr	r1, .L65+36
	ldr	r0, [fp, #-416]
	bl	write
	ldr	r0, [fp, #-416]
	bl	close
	sub	r3, fp, #200
	mov	r2, #4
	ldr	r1, .L65+40
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #200
	mov	r1, #1
	mov	r0, r3
	bl	open
	str	r0, [fp, #-416]
	ldr	r3, [fp, #-416]
	cmp	r3, #0
	bge	.L54
	ldr	r3, .L65+20
	ldr	r3, [r3]
	mov	r2, #28
	mov	r1, #1
	ldr	r0, .L65+44
	bl	fwrite
	mov	r0, #1
	bl	exit
.L54:
	mov	r2, #5
	ldr	r1, .L65+48
	ldr	r0, [fp, #-416]
	bl	write
	ldr	r0, [fp, #-416]
	bl	close
	sub	r3, fp, #396
	mov	r2, #2
	ldr	r1, .L65+12
	mov	r0, r3
	bl	sprintf
	mov	r1, #1
	ldr	r0, .L65+16
	bl	open
	str	r0, [fp, #-416]
	ldr	r3, [fp, #-416]
	cmp	r3, #0
	bge	.L55
	ldr	r3, .L65+20
	ldr	r3, [r3]
	mov	r2, #45
	mov	r1, #1
	ldr	r0, .L65+52
	bl	fwrite
	mov	r0, #1
	bl	exit
.L55:
	sub	r3, fp, #396
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-416]
	bl	write
	ldr	r0, [fp, #-416]
	bl	close
	sub	r3, fp, #136
	mov	r2, #2
	ldr	r1, .L65+28
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #136
	mov	r1, #1
	mov	r0, r3
	bl	open
	str	r0, [fp, #-416]
	ldr	r3, [fp, #-416]
	cmp	r3, #0
	bge	.L56
	ldr	r3, .L65+20
	ldr	r3, [r3]
	mov	r2, #34
	mov	r1, #1
	ldr	r0, .L65+56
	bl	fwrite
	mov	r0, #1
	bl	exit
.L56:
	mov	r2, #4
	ldr	r1, .L65+60
	ldr	r0, [fp, #-416]
	bl	write
	ldr	r0, [fp, #-416]
	bl	close
	sub	r3, fp, #72
	mov	r2, #2
	ldr	r1, .L65+64
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #72
	mov	r1, #1
	mov	r0, r3
	bl	open
	str	r0, [fp, #-412]
	ldr	r3, [fp, #-412]
	cmp	r3, #0
	bge	.L57
	ldr	r3, .L65+20
	ldr	r3, [r3]
	mov	r2, #2
	ldr	r1, .L65+68
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L57:
	sub	r3, fp, #264
	mov	r2, #4
	ldr	r1, .L65+64
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #264
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-416]
	ldr	r3, [fp, #-416]
	cmp	r3, #0
	bge	.L58
	ldr	r3, .L65+20
	ldr	r3, [r3]
	mov	r2, #4
	ldr	r1, .L65+72
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L58:
	ldr	r3, [fp, #-416]
	str	r3, [fp, #-408]
	sub	r3, fp, #4
	sub	r3, r3, #404
	mov	r2, #2
	strh	r2, [r3, #4]	@ movhi
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-416]
	bl	lseek
	sub	r3, fp, #392
	mov	r2, #64
	mov	r1, r3
	ldr	r0, [fp, #-416]
	bl	read
	b	.L59
.L60:
	sub	r3, fp, #408
	mvn	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	poll
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-416]
	bl	lseek
	sub	r3, fp, #392
	mov	r2, #64
	mov	r1, r3
	ldr	r0, [fp, #-416]
	bl	read
	sub	r3, fp, #392
	mov	r2, #64
	mov	r1, r3
	ldr	r0, [fp, #-412]
	bl	write
	ldr	r3, [fp, #-424]
	add	r3, r3, #1
	str	r3, [fp, #-424]
.L59:
	ldr	r2, [fp, #-424]
	ldr	r3, [fp, #-420]
	cmp	r2, r3
	ble	.L60
	ldr	r0, [fp, #-416]
	bl	close
	ldr	r0, [fp, #-412]
	bl	close
	mov	r0, #10
	bl	putchar
	mov	r1, #1
	ldr	r0, .L65+76
	bl	open
	str	r0, [fp, #-416]
	ldr	r3, [fp, #-416]
	cmp	r3, #0
	bge	.L61
	ldr	r3, .L65+20
	ldr	r3, [r3]
	mov	r2, #32
	mov	r1, #1
	ldr	r0, .L65+80
	bl	fwrite
	mov	r0, #1
	bl	exit
.L61:
	sub	r3, fp, #400
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-416]
	bl	write
	ldr	r0, [fp, #-416]
	bl	close
	mov	r1, #1
	ldr	r0, .L65+76
	bl	open
	str	r0, [fp, #-416]
	ldr	r3, [fp, #-416]
	cmp	r3, #0
	bge	.L62
	ldr	r3, .L65+20
	ldr	r3, [r3]
	mov	r2, #33
	mov	r1, #1
	ldr	r0, .L65+84
	bl	fwrite
	mov	r0, #1
	bl	exit
.L62:
	sub	r3, fp, #396
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-416]
	bl	write
	ldr	r0, [fp, #-416]
	bl	close
	mov	r3, #0
	ldr	r2, .L65
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L64
	bl	__stack_chk_fail
.L64:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L66:
	.align	2
.L65:
	.word	.LC36
	.word	.LC17
	.word	.LC18
	.word	.LC8
	.word	.LC19
	.word	stderr
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.size	thread_function, .-thread_function
	.section	.rodata
	.align	2
	.type	buf2.10145, %object
	.size	buf2.10145, 3
buf2.10145:
	.ascii	"01\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
