	.file	"extr_pg.c_pg_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s: Reset (%d) signature = "
.LC1:
	.string	"%3x"
.LC2:
	.string	" (incorrect)"
.LC3:
	.string	"\n"
	.text
	.p2align 4
	.type	pg_reset, @function
pg_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, 1
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	edi, DWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 16[rsp], 235
	movabs	rax, 4294967297
	mov	QWORD PTR [rsp], rax
	movabs	rax, 85899345921
	mov	QWORD PTR 8[rsp], rax
	call	pi_connect@PLT
	mov	rdi, rbp
	call	DRIVE@PLT
	mov	esi, 6
	mov	rdi, rbp
	mov	edx, eax
	call	write_reg@PLT
	mov	edx, 8
	mov	esi, 7
	mov	rdi, rbp
	call	write_reg@PLT
	movsx	rdi, DWORD PTR HZ[rip]
	mov	rax, rdi
	imul	rdi, rdi, 1374389535
	sar	eax, 31
	sar	rdi, 36
	sub	edi, eax
	call	pg_sleep@PLT
	mov	eax, DWORD PTR PG_RESET_TMO[rip]
	test	eax, eax
	jg	.L2
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edi, 1
	call	pg_sleep@PLT
	lea	eax, 1[r12]
	cmp	DWORD PTR PG_RESET_TMO[rip], r12d
	mov	r12d, eax
	jle	.L3
.L2:
	mov	rdi, rbp
	call	status_reg@PLT
	test	DWORD PTR STAT_BUSY[rip], eax
	jne	.L4
.L3:
	mov	ebx, 1
	lea	r13, 32[rsp]
.L5:
	mov	esi, ebx
	mov	rdi, rbp
	call	read_reg@PLT
	mov	DWORD PTR -4[r13+rbx*4], eax
	add	rbx, 1
	cmp	rbx, 6
	jne	.L5
	mov	rdi, rsp
	mov	edx, 20
	mov	rsi, r13
	call	memcmp@PLT
	mov	rbx, rax
	xor	eax, eax
	test	rbx, rbx
	setne	al
	neg	eax
	cmp	QWORD PTR verbose[rip], 0
	mov	r14d, eax
	jne	.L20
.L6:
	mov	edi, DWORD PTR 0[rbp]
	call	pi_disconnect@PLT
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L21
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	esi, DWORD PTR 4[rbp]
	mov	edx, r12d
	lea	rdi, .LC0[rip]
	xor	eax, eax
	lea	r15, 52[rsp]
	lea	r12, .LC1[rip]
	call	printk@PLT
.L7:
	mov	esi, DWORD PTR 0[r13]
	mov	rdi, r12
	xor	eax, eax
	add	r13, 4
	call	printk@PLT
	cmp	r13, r15
	jne	.L7
	test	rbx, rbx
	jne	.L22
.L8:
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	printk@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L22:
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	printk@PLT
	jmp	.L8
.L21:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pg_reset, .-pg_reset
	.comm	verbose,8,8
	.comm	STAT_BUSY,4,4
	.comm	PG_RESET_TMO,4,4
	.comm	HZ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_pg.c_pg_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC1:
	.ascii	"%s: Reset (%d) signature = \000"
	.align	2
.LC2:
	.ascii	"%3x\000"
	.align	2
.LC3:
	.ascii	" (incorrect)\000"
	.align	2
.LC4:
	.ascii	"\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pg_reset, %function
pg_reset:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, r0
	sub	sp, sp, #52
	ldr	r3, .L25
	ldr	lr, .L25+4
	add	ip, sp, #4
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	ldr	r0, [r5]
	str	r3, [ip]
	bl	pi_connect
	mov	r0, r5
	bl	DRIVE
	mov	r1, #6
	mov	r2, r0
	mov	r0, r5
	bl	write_reg
	mov	r2, #8
	mov	r1, #7
	mov	r0, r5
	bl	write_reg
	ldr	r3, .L25+8
	ldr	r0, .L25+12
	ldr	r3, [r3]
	ldr	r6, .L25+16
	smull	r2, r0, r3, r0
	asr	r3, r3, #31
	rsb	r0, r3, r0, asr #4
	bl	pg_sleep
	ldr	r3, [r6]
	mov	r4, #1
	cmp	r3, #0
	ldrgt	r7, .L25+20
	bgt	.L2
	b	.L3
.L4:
	mov	r0, #1
	bl	pg_sleep
	ldr	r3, [r6]
	add	r2, r4, #1
	cmp	r3, r4
	mov	r4, r2
	ble	.L3
.L2:
	mov	r0, r5
	bl	status_reg
	ldr	r3, [r7]
	tst	r0, r3
	bne	.L4
.L3:
	add	r8, sp, #24
	mov	r7, r8
	mov	r6, #0
.L5:
	add	r6, r6, #1
	mov	r1, r6
	mov	r0, r5
	bl	read_reg
	cmp	r6, #5
	str	r0, [r7], #4
	bne	.L5
	mov	r2, #20
	add	r1, sp, #24
	add	r0, sp, #4
	bl	memcmp
	subs	r2, r0, #0
	movne	r2, #1
	ldr	r3, .L25+24
	mov	r6, r0
	ldr	r3, [r3]
	rsb	r7, r2, #0
	cmp	r3, #0
	bne	.L22
.L6:
	ldr	r0, [r5]
	bl	pi_disconnect
	ldr	r3, .L25
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	mov	r0, r7
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L22:
	mov	r2, r4
	ldr	r1, [r5, #4]
	ldr	r0, .L25+28
	bl	printk
	ldr	r9, .L25+32
	add	r4, sp, #44
.L7:
	ldr	r1, [r8], #4
	mov	r0, r9
	bl	printk
	cmp	r8, r4
	bne	.L7
	cmp	r6, #0
	bne	.L24
.L8:
	ldr	r0, .L25+36
	bl	printk
	b	.L6
.L24:
	ldr	r0, .L25+40
	bl	printk
	b	.L8
.L23:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	.LC5
	.word	.LANCHOR0
	.word	HZ
	.word	1374389535
	.word	PG_RESET_TMO
	.word	STAT_BUSY
	.word	verbose
	.word	.LC1
	.word	.LC2
	.word	.LC4
	.word	.LC3
	.size	pg_reset, .-pg_reset
	.comm	verbose,4,4
	.comm	STAT_BUSY,4,4
	.comm	PG_RESET_TMO,4,4
	.comm	HZ,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
.LC0:
	.word	1
	.word	1
	.word	1
	.word	20
	.word	235
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
