	.file	"extr_rtas.c_get_pseries_errorlog.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	get_pseries_errorlog
	.type	get_pseries_errorlog, @function
get_pseries_errorlog:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	r13, QWORD PTR [rdi]
	call	rtas_error_extended_log_length@PLT
	mov	rdi, r13
	movsx	rbx, eax
	call	rtas_ext_event_log_format@PLT
	mov	rdi, r13
	mov	r14, rax
	call	rtas_ext_event_company_id@PLT
	cmp	ebx, 7
	jbe	.L2
	cmp	QWORD PTR RTAS_V6EXT_LOG_FORMAT_EVENT_LOG[rip], r14
	jne	.L2
	cmp	DWORD PTR RTAS_V6EXT_COMPANY_ID_IBM[rip], eax
	jne	.L2
	add	rbx, QWORD PTR [r12]
	mov	r12, QWORD PTR 0[r13]
	cmp	rbx, r12
	jbe	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, r12
	call	pseries_errorlog_id@PLT
	cmp	rax, rbp
	je	.L1
	mov	rdi, r12
	call	pseries_errorlog_length@PLT
	cdqe
	add	r12, rax
	cmp	rbx, r12
	ja	.L4
.L2:
	xor	r12d, r12d
.L1:
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	rax, r12
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	get_pseries_errorlog, .-get_pseries_errorlog
	.comm	RTAS_V6EXT_LOG_FORMAT_EVENT_LOG,8,8
	.comm	RTAS_V6EXT_COMPANY_ID_IBM,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_rtas.c_get_pseries_errorlog.c"
	.text
	.align	2
	.global	get_pseries_errorlog
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_pseries_errorlog, %function
get_pseries_errorlog:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	ldr	r4, [r0]
	mov	r8, r0
	bl	rtas_error_extended_log_length
	mov	r7, r0
	mov	r0, r4
	bl	rtas_ext_event_log_format
	mov	r6, r0
	mov	r0, r4
	bl	rtas_ext_event_company_id
	cmp	r7, #3
	bls	.L2
	ldr	r3, .L8
	ldr	r3, [r3]
	cmp	r3, r6
	bne	.L2
	ldr	r3, .L8+4
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L2
	ldr	r6, [r8]
	ldr	r4, [r4]
	add	r6, r6, r7
	cmp	r6, r4
	bls	.L2
.L4:
	mov	r0, r4
	bl	pseries_errorlog_id
	cmp	r0, r5
	beq	.L1
	mov	r0, r4
	bl	pseries_errorlog_length
	add	r4, r4, r0
	cmp	r6, r4
	bhi	.L4
.L2:
	mov	r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	.align	2
.L8:
	.word	RTAS_V6EXT_LOG_FORMAT_EVENT_LOG
	.word	RTAS_V6EXT_COMPANY_ID_IBM
	.size	get_pseries_errorlog, .-get_pseries_errorlog
	.comm	RTAS_V6EXT_LOG_FORMAT_EVENT_LOG,4,4
	.comm	RTAS_V6EXT_COMPANY_ID_IBM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
