	.file	"517125.c"
	.intel_syntax noprefix
	.text
	.globl	bios_data
	.bss
	.align 32
	.type	bios_data, @object
	.size	bios_data, 65536
bios_data:
	.zero	65536
	.globl	bios_len
	.align 8
	.type	bios_len, @object
	.size	bios_len, 8
bios_len:
	.zero	8
	.section	.rodata
	.align 8
.LC0:
	.string	"Error. Need a file-name as an argument."
.LC1:
	.string	"rb"
	.align 8
.LC2:
	.string	"Error opening %s for reading.\n"
	.align 8
.LC3:
	.string	"Error reading max. 65536 Bytes from %s.\n"
.LC4:
	.string	"\nPMID entry at: 0x%4lX\n"
.LC5:
	.string	"Current checksum:     0x%02X\n"
	.align 8
.LC6:
	.string	"Calculated checksum:  0x%02X  "
.LC7:
	.string	"Setting checksum."
	.align 8
.LC8:
	.string	"Multiple PMID entries! No checksum set."
.LC9:
	.string	"\nBios checksum at:   0x%4lX\n"
.LC10:
	.string	"wb"
	.align 8
.LC11:
	.string	"Error opening %s for writing.\n"
	.align 8
.LC12:
	.string	"Error writing %d KBytes to %s.\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
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	BYTE PTR -43[rbp], 0
	mov	BYTE PTR -42[rbp], 0
	cmp	DWORD PTR -52[rbp], 2
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L3
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	edx, 65536
	mov	esi, 0
	lea	rdi, bios_data[rip]
	call	memset@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	edx, 65536
	mov	esi, 1
	lea	rdi, bios_data[rip]
	call	fread@PLT
	mov	QWORD PTR bios_len[rip], rax
	mov	rax, QWORD PTR bios_len[rip]
	cmp	rax, 65536
	jle	.L4
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	DWORD PTR -36[rbp], 0
	mov	rax, QWORD PTR bios_len[rip]
	cmp	rax, 32767
	jg	.L5
	mov	QWORD PTR bios_len[rip], 32768
	mov	DWORD PTR -36[rbp], 1
	jmp	.L6
.L5:
	mov	rax, QWORD PTR bios_len[rip]
	and	eax, 511
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR bios_len[rip]
	add	rax, 512
	and	rax, -512
	mov	QWORD PTR bios_len[rip], rax
	mov	DWORD PTR -36[rbp], 1
.L6:
	mov	rax, QWORD PTR bios_len[rip]
	lea	rdx, 511[rax]
	test	rax, rax
	cmovs	rax, rdx
	sar	rax, 9
	mov	BYTE PTR -41[rbp], al
	movzx	eax, BYTE PTR bios_data[rip+2]
	cmp	BYTE PTR -41[rbp], al
	je	.L7
	cmp	DWORD PTR -36[rbp], 0
	jne	.L8
	mov	rax, QWORD PTR bios_len[rip]
	add	rax, 512
	mov	QWORD PTR bios_len[rip], rax
.L8:
	mov	rax, QWORD PTR bios_len[rip]
	lea	rdx, 511[rax]
	test	rax, rax
	cmovs	rax, rdx
	sar	rax, 9
	mov	BYTE PTR bios_data[rip+2], al
	mov	DWORD PTR -36[rbp], 1
.L7:
	mov	DWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	jmp	.L9
.L10:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, bios_data[rip]
	call	chksum_pmid_get_value
	mov	BYTE PTR -43[rbp], al
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, bios_data[rip]
	call	chksum_pmid_calc_value
	mov	BYTE PTR -42[rbp], al
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	eax, BYTE PTR -43[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	eax, BYTE PTR -42[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -40[rbp], 1
.L9:
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, bios_data[rip]
	call	chksum_pmid_get_offset
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], -1
	jne	.L10
	cmp	DWORD PTR -40[rbp], 1
	jne	.L11
	movzx	eax, BYTE PTR -43[rbp]
	cmp	al, BYTE PTR -42[rbp]
	je	.L11
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	edx, BYTE PTR -42[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, bios_data[rip]
	call	chksum_pmid_set_value
	cmp	DWORD PTR -36[rbp], 0
	jne	.L12
	mov	rax, QWORD PTR bios_len[rip]
	add	rax, 512
	mov	QWORD PTR bios_len[rip], rax
	movzx	eax, BYTE PTR bios_data[rip+2]
	add	eax, 1
	mov	BYTE PTR bios_data[rip+2], al
.L12:
	mov	DWORD PTR -36[rbp], 1
.L11:
	cmp	DWORD PTR -40[rbp], 1
	jle	.L13
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
.L13:
	cmp	DWORD PTR -40[rbp], 0
	je	.L14
	mov	edi, 10
	call	putchar@PLT
.L14:
	mov	QWORD PTR -32[rbp], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, bios_data[rip]
	call	chksum_pcir_get_offset
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	je	.L15
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 16[rax]
	lea	rax, bios_data[rip]
	movzx	edx, BYTE PTR [rdx+rax]
	movzx	eax, BYTE PTR bios_data[rip+2]
	cmp	dl, al
	je	.L15
	mov	rax, QWORD PTR -8[rbp]
	lea	rcx, 16[rax]
	movzx	eax, BYTE PTR bios_data[rip+2]
	lea	rdx, bios_data[rip]
	mov	BYTE PTR [rcx+rdx], al
	cmp	DWORD PTR -36[rbp], 0
	jne	.L16
	mov	rax, QWORD PTR bios_len[rip]
	add	rax, 512
	mov	QWORD PTR bios_len[rip], rax
	movzx	eax, BYTE PTR bios_data[rip+2]
	add	eax, 1
	mov	BYTE PTR bios_data[rip+2], al
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	lea	rdx, bios_data[rip]
	movzx	edx, BYTE PTR [rax+rdx]
	lea	ecx, 1[rdx]
	lea	rdx, bios_data[rip]
	mov	BYTE PTR [rax+rdx], cl
.L16:
	mov	DWORD PTR -36[rbp], 1
.L15:
	mov	QWORD PTR -32[rbp], 0
.L21:
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, bios_data[rip]
	call	chksum_bios_get_offset
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, bios_data[rip]
	call	chksum_bios_get_value
	mov	BYTE PTR -43[rbp], al
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, bios_data[rip]
	call	chksum_bios_calc_value
	mov	BYTE PTR -42[rbp], al
	movzx	eax, BYTE PTR -43[rbp]
	cmp	al, BYTE PTR -42[rbp]
	je	.L17
	cmp	DWORD PTR -36[rbp], 0
	jne	.L17
	mov	rax, QWORD PTR bios_len[rip]
	add	rax, 512
	mov	QWORD PTR bios_len[rip], rax
	movzx	eax, BYTE PTR bios_data[rip+2]
	add	eax, 1
	mov	BYTE PTR bios_data[rip+2], al
	cmp	QWORD PTR -8[rbp], -1
	je	.L18
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 16
	lea	rdx, bios_data[rip]
	movzx	edx, BYTE PTR [rax+rdx]
	lea	ecx, 1[rdx]
	lea	rdx, bios_data[rip]
	mov	BYTE PTR [rax+rdx], cl
.L18:
	mov	DWORD PTR -36[rbp], 1
	jmp	.L19
.L17:
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	eax, BYTE PTR -43[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	eax, BYTE PTR -42[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	eax, BYTE PTR -43[rbp]
	cmp	al, BYTE PTR -42[rbp]
	je	.L20
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	edx, BYTE PTR -42[rbp]
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, bios_data[rip]
	call	chksum_bios_set_value
	movzx	eax, BYTE PTR -42[rbp]
	mov	BYTE PTR -43[rbp], al
	mov	DWORD PTR -36[rbp], 1
.L20:
	mov	edi, 10
	call	putchar@PLT
.L19:
	movzx	eax, BYTE PTR -43[rbp]
	cmp	al, BYTE PTR -42[rbp]
	jne	.L21
	cmp	DWORD PTR -36[rbp], 1
	jne	.L22
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L23
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	mov	rax, QWORD PTR bios_len[rip]
	mov	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rcx, rax
	mov	esi, 1
	lea	rdi, bios_data[rip]
	call	fwrite@PLT
	mov	rdx, QWORD PTR bios_len[rip]
	cmp	rax, rdx
	jnb	.L24
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR bios_len[rip]
	lea	rcx, 1023[rax]
	test	rax, rax
	cmovs	rax, rcx
	sar	rax, 10
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	edi, 1
	call	exit@PLT
.L24:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L22:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC13:
	.string	"\n\nError. %s.\n"
	.text
	.globl	check
	.type	check, @function
check:
.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	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	cmp	DWORD PTR -4[rbp], 0
	jne	.L28
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L28:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	check, .-check
	.globl	chksum_bios_get_offset
	.type	chksum_bios_get_offset, @function
chksum_bios_get_offset:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR bios_len[rip]
	sub	rax, 1
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	chksum_bios_get_offset, .-chksum_bios_get_offset
	.globl	chksum_bios_calc_value
	.type	chksum_bios_calc_value, @function
chksum_bios_calc_value:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	BYTE PTR -5[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	jmp	.L32
.L33:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	add	BYTE PTR -5[rbp], al
	add	DWORD PTR -4[rbp], 1
.L32:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	cmp	QWORD PTR -32[rbp], rax
	jg	.L33
	neg	BYTE PTR -5[rbp]
	movzx	eax, BYTE PTR -5[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	chksum_bios_calc_value, .-chksum_bios_calc_value
	.globl	chksum_bios_get_value
	.type	chksum_bios_get_value, @function
chksum_bios_get_value:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	chksum_bios_get_value, .-chksum_bios_get_value
	.globl	chksum_bios_set_value
	.type	chksum_bios_set_value, @function
chksum_bios_set_value:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	eax, edx
	mov	BYTE PTR -20[rbp], al
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -20[rbp]
	mov	BYTE PTR [rdx], al
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	chksum_bios_set_value, .-chksum_bios_set_value
	.section	.rodata
	.align 8
.LC14:
	.string	"PMID entry length out of bounds"
	.text
	.globl	chksum_pmid_calc_value
	.type	chksum_pmid_calc_value, @function
chksum_pmid_calc_value:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 20
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR bios_len[rip]
	cmp	rdx, rax
	setl	al
	movzx	eax, al
	lea	rsi, .LC14[rip]
	mov	edi, eax
	call	check
	mov	BYTE PTR -9[rbp], 0
	mov	DWORD PTR -8[rbp], 0
	jmp	.L39
.L41:
	cmp	DWORD PTR -8[rbp], 19
	je	.L40
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	add	BYTE PTR -9[rbp], al
.L40:
	add	DWORD PTR -8[rbp], 1
.L39:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jl	.L41
	neg	BYTE PTR -9[rbp]
	movzx	eax, BYTE PTR -9[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	chksum_pmid_calc_value, .-chksum_pmid_calc_value
	.globl	chksum_pmid_get_offset
	.type	chksum_pmid_get_offset, @function
chksum_pmid_get_offset:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -8[rbp], -1
	jmp	.L44
.L46:
	add	QWORD PTR -32[rbp], 1
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 80
	jne	.L44
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 77
	jne	.L44
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 2[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 73
	jne	.L44
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 3[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 68
	jne	.L44
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L45
.L44:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 20[rax]
	mov	rax, QWORD PTR bios_len[rip]
	sub	rax, 1
	cmp	rdx, rax
	jl	.L46
.L45:
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	chksum_pmid_get_offset, .-chksum_pmid_get_offset
	.section	.rodata
.LC15:
	.string	"PMID checksum out of bounds"
	.text
	.globl	chksum_pmid_get_value
	.type	chksum_pmid_get_value, @function
chksum_pmid_get_value:
.LFB14:
	.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], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 18[rax]
	mov	rax, QWORD PTR bios_len[rip]
	sub	rax, 1
	cmp	rdx, rax
	setl	al
	movzx	eax, al
	lea	rsi, .LC15[rip]
	mov	edi, eax
	call	check
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 19[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	chksum_pmid_get_value, .-chksum_pmid_get_value
	.globl	chksum_pmid_set_value
	.type	chksum_pmid_set_value, @function
chksum_pmid_set_value:
.LFB15:
	.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	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	eax, edx
	mov	BYTE PTR -20[rbp], al
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 18[rax]
	mov	rax, QWORD PTR bios_len[rip]
	sub	rax, 1
	cmp	rdx, rax
	setl	al
	movzx	eax, al
	lea	rsi, .LC15[rip]
	mov	edi, eax
	call	check
	mov	rax, QWORD PTR -16[rbp]
	lea	rdx, 19[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -20[rbp]
	mov	BYTE PTR [rdx], al
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	chksum_pmid_set_value, .-chksum_pmid_set_value
	.globl	chksum_pcir_get_offset
	.type	chksum_pcir_get_offset, @function
chksum_pcir_get_offset:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -8[rbp], -1
	jmp	.L52
.L54:
	add	QWORD PTR -32[rbp], 1
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 80
	jne	.L52
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 67
	jne	.L52
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 2[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 73
	jne	.L52
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 3[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 82
	jne	.L52
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L53
.L52:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, 24[rax]
	mov	rax, QWORD PTR bios_len[rip]
	sub	rax, 1
	cmp	rdx, rax
	jl	.L54
.L53:
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	chksum_pcir_get_offset, .-chksum_pcir_get_offset
	.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	"517125.c"
	.text
	.comm	bios_data,65536,4
	.comm	bios_len,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Error. Need a file-name as an argument.\000"
	.align	2
.LC1:
	.ascii	"rb\000"
	.align	2
.LC2:
	.ascii	"Error opening %s for reading.\012\000"
	.align	2
.LC3:
	.ascii	"Error reading max. 65536 Bytes from %s.\012\000"
	.align	2
.LC4:
	.ascii	"\012PMID entry at: 0x%4lX\012\000"
	.align	2
.LC5:
	.ascii	"Current checksum:     0x%02X\012\000"
	.align	2
.LC6:
	.ascii	"Calculated checksum:  0x%02X  \000"
	.align	2
.LC7:
	.ascii	"Setting checksum.\000"
	.align	2
.LC8:
	.ascii	"Multiple PMID entries! No checksum set.\000"
	.align	2
.LC9:
	.ascii	"\012Bios checksum at:   0x%4lX\012\000"
	.align	2
.LC10:
	.ascii	"wb\000"
	.align	2
.LC11:
	.ascii	"Error opening %s for writing.\012\000"
	.align	2
.LC12:
	.ascii	"Error writing %d KBytes to %s.\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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	mov	r3, #0
	strb	r3, [fp, #-31]
	mov	r3, #0
	strb	r3, [fp, #-30]
	ldr	r3, [fp, #-40]
	cmp	r3, #2
	beq	.L2
	ldr	r0, .L26
	bl	puts
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L26+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+8
	bl	printf
	mov	r0, #1
	bl	exit
.L3:
	mov	r2, #65536
	mov	r1, #0
	ldr	r0, .L26+12
	bl	memset
	ldr	r3, [fp, #-16]
	mov	r2, #65536
	mov	r1, #1
	ldr	r0, .L26+12
	bl	fread
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L26+16
	str	r2, [r3]
	ldr	r3, .L26+16
	ldr	r3, [r3]
	cmp	r3, #65536
	ble	.L4
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+20
	bl	printf
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r0, #1
	bl	exit
.L4:
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, .L26+16
	ldr	r3, [r3]
	cmp	r3, #32768
	bge	.L5
	ldr	r3, .L26+16
	mov	r2, #32768
	str	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L6
.L5:
	ldr	r3, .L26+16
	ldr	r3, [r3]
	lsl	r3, r3, #23
	lsr	r3, r3, #23
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L26+16
	ldr	r3, [r3]
	add	r3, r3, #512
	bic	r3, r3, #508
	bic	r3, r3, #3
	ldr	r2, .L26+16
	str	r3, [r2]
	mov	r3, #1
	str	r3, [fp, #-20]
.L6:
	ldr	r3, .L26+16
	ldr	r3, [r3]
	add	r2, r3, #508
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #9
	strb	r3, [fp, #-29]
	ldr	r3, .L26+12
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	ldrb	r2, [fp, #-29]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L7
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L8
	ldr	r3, .L26+16
	ldr	r3, [r3]
	add	r3, r3, #512
	ldr	r2, .L26+16
	str	r3, [r2]
.L8:
	ldr	r3, .L26+16
	ldr	r3, [r3]
	add	r2, r3, #508
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #9
	and	r2, r3, #255
	ldr	r3, .L26+12
	strb	r2, [r3, #2]
	mov	r3, #1
	str	r3, [fp, #-20]
.L7:
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L9
.L10:
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-28]
	ldr	r1, [fp, #-28]
	ldr	r0, .L26+12
	bl	chksum_pmid_get_value
	mov	r3, r0
	strb	r3, [fp, #-31]
	ldr	r1, [fp, #-28]
	ldr	r0, .L26+12
	bl	chksum_pmid_calc_value
	mov	r3, r0
	strb	r3, [fp, #-30]
	ldr	r1, [fp, #-28]
	ldr	r0, .L26+24
	bl	printf
	ldrb	r3, [fp, #-31]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L26+28
	bl	printf
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L26+32
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L9:
	ldr	r1, [fp, #-28]
	ldr	r0, .L26+12
	bl	chksum_pmid_get_offset
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L10
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bne	.L11
	ldrb	r2, [fp, #-31]	@ zero_extendqisi2
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L11
	ldr	r0, .L26+36
	bl	printf
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, .L26+12
	bl	chksum_pmid_set_value
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L12
	ldr	r3, .L26+16
	ldr	r3, [r3]
	add	r3, r3, #512
	ldr	r2, .L26+16
	str	r3, [r2]
	ldr	r3, .L26+12
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	add	r3, r3, #1
	and	r2, r3, #255
	ldr	r3, .L26+12
	strb	r2, [r3, #2]
.L12:
	mov	r3, #1
	str	r3, [fp, #-20]
.L11:
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	ble	.L13
	ldr	r0, .L26+40
	bl	printf
.L13:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L14
	mov	r0, #10
	bl	putchar
.L14:
	mov	r3, #0
	str	r3, [fp, #-28]
	ldr	r1, [fp, #-28]
	ldr	r0, .L26+12
	bl	chksum_pcir_get_offset
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L15
	ldr	r3, [fp, #-8]
	add	r3, r3, #16
	ldr	r2, .L26+12
	ldrb	r2, [r2, r3]	@ zero_extendqisi2
	ldr	r3, .L26+12
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L15
	ldr	r3, [fp, #-8]
	add	r3, r3, #16
	ldr	r2, .L26+12
	ldrb	r1, [r2, #2]	@ zero_extendqisi2
	ldr	r2, .L26+12
	strb	r1, [r2, r3]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L16
	ldr	r3, .L26+16
	ldr	r3, [r3]
	add	r3, r3, #512
	ldr	r2, .L26+16
	str	r3, [r2]
	ldr	r3, .L26+12
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	add	r3, r3, #1
	and	r2, r3, #255
	ldr	r3, .L26+12
	strb	r2, [r3, #2]
	ldr	r3, [fp, #-8]
	add	r3, r3, #16
	ldr	r2, .L26+12
	ldrb	r2, [r2, r3]	@ zero_extendqisi2
	add	r2, r2, #1
	and	r1, r2, #255
	ldr	r2, .L26+12
	strb	r1, [r2, r3]
.L16:
	mov	r3, #1
	str	r3, [fp, #-20]
.L15:
	mov	r3, #0
	str	r3, [fp, #-28]
.L21:
	ldr	r1, [fp, #-28]
	ldr	r0, .L26+12
	bl	chksum_bios_get_offset
	str	r0, [fp, #-28]
	ldr	r1, [fp, #-28]
	ldr	r0, .L26+12
	bl	chksum_bios_get_value
	mov	r3, r0
	strb	r3, [fp, #-31]
	ldr	r1, [fp, #-28]
	ldr	r0, .L26+12
	bl	chksum_bios_calc_value
	mov	r3, r0
	strb	r3, [fp, #-30]
	ldrb	r2, [fp, #-31]	@ zero_extendqisi2
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L17
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L17
	ldr	r3, .L26+16
	ldr	r3, [r3]
	add	r3, r3, #512
	ldr	r2, .L26+16
	str	r3, [r2]
	ldr	r3, .L26+12
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	add	r3, r3, #1
	and	r2, r3, #255
	ldr	r3, .L26+12
	strb	r2, [r3, #2]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L18
	ldr	r3, [fp, #-8]
	add	r3, r3, #16
	ldr	r2, .L26+12
	ldrb	r2, [r2, r3]	@ zero_extendqisi2
	add	r2, r2, #1
	and	r1, r2, #255
	ldr	r2, .L26+12
	strb	r1, [r2, r3]
.L18:
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L19
.L17:
	ldr	r1, [fp, #-28]
	ldr	r0, .L26+44
	bl	printf
	ldrb	r3, [fp, #-31]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L26+28
	bl	printf
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L26+32
	bl	printf
	ldrb	r2, [fp, #-31]	@ zero_extendqisi2
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	cmp	r2, r3
	beq	.L20
	ldr	r0, .L26+36
	bl	printf
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, .L26+12
	bl	chksum_bios_set_value
	ldrb	r3, [fp, #-30]
	strb	r3, [fp, #-31]
	mov	r3, #1
	str	r3, [fp, #-20]
.L20:
	mov	r0, #10
	bl	putchar
.L19:
	ldrb	r2, [fp, #-31]	@ zero_extendqisi2
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L21
	ldr	r3, [fp, #-20]
	cmp	r3, #1
	bne	.L22
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L26+48
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L23
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L26+52
	bl	printf
	mov	r0, #1
	bl	exit
.L23:
	ldr	r3, .L26+16
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-16]
	mov	r1, #1
	ldr	r0, .L26+12
	bl	fwrite
	mov	r3, r0
	ldr	r2, .L26+16
	ldr	r2, [r2]
	cmp	r3, r2
	bcs	.L24
	ldr	r3, .L26+16
	ldr	r3, [r3]
	add	r2, r3, #1020
	add	r2, r2, #3
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #10
	mov	r1, r3
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r0, .L26+56
	bl	printf
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r0, #1
	bl	exit
.L24:
	ldr	r0, [fp, #-16]
	bl	fclose
.L22:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	bios_data
	.word	bios_len
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.section	.rodata
	.align	2
.LC13:
	.ascii	"\012\012Error. %s.\012\000"
	.text
	.align	2
	.global	check
	.syntax unified
	.arm
	.fpu softvfp
	.type	check, %function
check:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L30
	ldr	r1, [fp, #-12]
	ldr	r0, .L31
	bl	printf
	mov	r0, #1
	bl	exit
.L30:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC13
	.size	check, .-check
	.align	2
	.global	chksum_bios_get_offset
	.syntax unified
	.arm
	.fpu softvfp
	.type	chksum_bios_get_offset, %function
chksum_bios_get_offset:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, .L35
	ldr	r3, [r3]
	sub	r3, r3, #1
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L36:
	.align	2
.L35:
	.word	bios_len
	.size	chksum_bios_get_offset, .-chksum_bios_get_offset
	.align	2
	.global	chksum_bios_calc_value
	.syntax unified
	.arm
	.fpu softvfp
	.type	chksum_bios_calc_value, %function
chksum_bios_calc_value:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	strb	r3, [fp, #-9]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L38
.L39:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r3, [fp, #-9]
	add	r3, r2, r3
	strb	r3, [fp, #-9]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L38:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	blt	.L39
	ldrb	r3, [fp, #-9]
	rsb	r3, r3, #0
	strb	r3, [fp, #-9]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	chksum_bios_calc_value, .-chksum_bios_calc_value
	.align	2
	.global	chksum_bios_get_value
	.syntax unified
	.arm
	.fpu softvfp
	.type	chksum_bios_get_value, %function
chksum_bios_get_value:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	chksum_bios_get_value, .-chksum_bios_get_value
	.align	2
	.global	chksum_bios_set_value
	.syntax unified
	.arm
	.fpu softvfp
	.type	chksum_bios_set_value, %function
chksum_bios_set_value:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	mov	r3, r2
	strb	r3, [fp, #-13]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [fp, #-13]
	strb	r2, [r3]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	chksum_bios_set_value, .-chksum_bios_set_value
	.section	.rodata
	.align	2
.LC14:
	.ascii	"PMID entry length out of bounds\000"
	.text
	.align	2
	.global	chksum_pmid_calc_value
	.syntax unified
	.arm
	.fpu softvfp
	.type	chksum_pmid_calc_value, %function
chksum_pmid_calc_value:
	@ 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]
	mov	r3, #20
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-8]
	add	r2, r2, r3
	ldr	r3, .L49
	ldr	r3, [r3]
	cmp	r2, r3
	movlt	r3, #1
	movge	r3, #0
	and	r3, r3, #255
	ldr	r1, .L49+4
	mov	r0, r3
	bl	check
	mov	r3, #0
	strb	r3, [fp, #-13]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L45
.L47:
	ldr	r3, [fp, #-12]
	cmp	r3, #19
	beq	.L46
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r3, [fp, #-13]
	add	r3, r2, r3
	strb	r3, [fp, #-13]
.L46:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L45:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L47
	ldrb	r3, [fp, #-13]
	rsb	r3, r3, #0
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L50:
	.align	2
.L49:
	.word	bios_len
	.word	.LC14
	.size	chksum_pmid_calc_value, .-chksum_pmid_calc_value
	.align	2
	.global	chksum_pmid_get_offset
	.syntax unified
	.arm
	.fpu softvfp
	.type	chksum_pmid_get_offset, %function
chksum_pmid_get_offset:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mvn	r3, #0
	str	r3, [fp, #-8]
	b	.L52
.L54:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #80
	bne	.L52
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #77
	bne	.L52
	ldr	r3, [fp, #-20]
	add	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #73
	bne	.L52
	ldr	r3, [fp, #-20]
	add	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #68
	bne	.L52
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-8]
	b	.L53
.L52:
	ldr	r3, [fp, #-20]
	add	r2, r3, #20
	ldr	r3, .L56
	ldr	r3, [r3]
	sub	r3, r3, #1
	cmp	r2, r3
	blt	.L54
.L53:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L57:
	.align	2
.L56:
	.word	bios_len
	.size	chksum_pmid_get_offset, .-chksum_pmid_get_offset
	.section	.rodata
	.align	2
.LC15:
	.ascii	"PMID checksum out of bounds\000"
	.text
	.align	2
	.global	chksum_pmid_get_value
	.syntax unified
	.arm
	.fpu softvfp
	.type	chksum_pmid_get_value, %function
chksum_pmid_get_value:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	add	r2, r3, #18
	ldr	r3, .L60
	ldr	r3, [r3]
	sub	r3, r3, #1
	cmp	r2, r3
	movlt	r3, #1
	movge	r3, #0
	and	r3, r3, #255
	ldr	r1, .L60+4
	mov	r0, r3
	bl	check
	ldr	r3, [fp, #-12]
	add	r3, r3, #19
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L61:
	.align	2
.L60:
	.word	bios_len
	.word	.LC15
	.size	chksum_pmid_get_value, .-chksum_pmid_get_value
	.align	2
	.global	chksum_pmid_set_value
	.syntax unified
	.arm
	.fpu softvfp
	.type	chksum_pmid_set_value, %function
chksum_pmid_set_value:
	@ 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, #-8]
	str	r1, [fp, #-12]
	mov	r3, r2
	strb	r3, [fp, #-13]
	ldr	r3, [fp, #-12]
	add	r2, r3, #18
	ldr	r3, .L63
	ldr	r3, [r3]
	sub	r3, r3, #1
	cmp	r2, r3
	movlt	r3, #1
	movge	r3, #0
	and	r3, r3, #255
	ldr	r1, .L63+4
	mov	r0, r3
	bl	check
	ldr	r3, [fp, #-12]
	add	r3, r3, #19
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	ldrb	r2, [fp, #-13]
	strb	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L64:
	.align	2
.L63:
	.word	bios_len
	.word	.LC15
	.size	chksum_pmid_set_value, .-chksum_pmid_set_value
	.align	2
	.global	chksum_pcir_get_offset
	.syntax unified
	.arm
	.fpu softvfp
	.type	chksum_pcir_get_offset, %function
chksum_pcir_get_offset:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mvn	r3, #0
	str	r3, [fp, #-8]
	b	.L66
.L68:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #80
	bne	.L66
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #67
	bne	.L66
	ldr	r3, [fp, #-20]
	add	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #73
	bne	.L66
	ldr	r3, [fp, #-20]
	add	r3, r3, #3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #82
	bne	.L66
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-8]
	b	.L67
.L66:
	ldr	r3, [fp, #-20]
	add	r2, r3, #24
	ldr	r3, .L70
	ldr	r3, [r3]
	sub	r3, r3, #1
	cmp	r2, r3
	blt	.L68
.L67:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L71:
	.align	2
.L70:
	.word	bios_len
	.size	chksum_pcir_get_offset, .-chksum_pcir_get_offset
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
