	.file	"extr_rscalc.c_acpi_rs_get_list_length.c"
	.intel_syntax noprefix
	.text
	.section	.text.unlikely,"ax",@progbits
.LCOLDB0:
	.text
.LHOTB0:
	.p2align 4
	.globl	acpi_rs_get_list_length
	.type	acpi_rs_get_list_length, @function
acpi_rs_get_list_length:
.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
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	lea	r12, .L6[rip]
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movsx	rbp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	edi, DWORD PTR rs_get_list_length[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	lea	r15, 32[rsp]
	call	ACPI_FUNCTION_TRACE@PLT
	mov	eax, DWORD PTR ACPI_RS_SIZE_MIN[rip]
	mov	DWORD PTR [rbx], eax
	lea	rax, 0[r13+rbp*8]
	mov	QWORD PTR 8[rsp], rax
	cmp	r13, rax
	jnb	.L24
	.p2align 4,,10
	.p2align 3
.L2:
	xor	edi, edi
	mov	rdx, r15
	mov	rsi, r13
	call	acpi_ut_validate_resource@PLT
	mov	edi, eax
	mov	ebp, eax
	call	ACPI_FAILURE@PLT
	test	rax, rax
	jne	.L43
.L3:
	mov	rdi, r13
	call	acpi_ut_get_resource_length@PLT
	mov	rdx, QWORD PTR 32[rsp]
	mov	rdi, r13
	mov	ebp, eax
	mov	rax, QWORD PTR acpi_gbl_resource_aml_sizes[rip]
	mov	rax, QWORD PTR [rax+rdx*8]
	mov	QWORD PTR [rsp], rax
	call	acpi_ut_get_resource_header_length@PLT
	mov	rdi, r13
	cdqe
	lea	r14, 0[r13+rax*8]
	call	acpi_ut_get_resource_type@PLT
	add	eax, -128
	cmp	eax, 15
	ja	.L26
	movsx	rax, DWORD PTR [r12+rax*4]
	add	rax, r12
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L18-.L6
	.long	.L18-.L6
	.long	.L17-.L6
	.long	.L15-.L6
	.long	.L15-.L6
	.long	.L15-.L6
	.long	.L12-.L6
	.long	.L12-.L6
	.long	.L11-.L6
	.long	.L12-.L6
	.long	.L9-.L6
	.long	.L8-.L6
	.long	.L7-.L6
	.long	.L5-.L6
	.long	.L5-.L6
	.long	.L5-.L6
	.text
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rbp, QWORD PTR 8[r13]
	mov	rdx, QWORD PTR 0[r13]
	test	rbp, rbp
	je	.L21
	mov	eax, DWORD PTR 16[r13]
	add	eax, ebp
	sub	eax, edx
	mov	ebp, eax
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, r13
	call	acpi_ut_get_resource_type@PLT
	cmp	eax, 130
	je	.L44
.L22:
	mov	rdx, QWORD PTR 32[rsp]
	mov	rax, QWORD PTR acpi_gbl_resource_struct_sizes[rip]
	mov	edi, DWORD PTR [rax+rdx*4]
	add	edi, ebp
.L23:
	call	ACPI_ROUND_UP_TO_NATIVE_WORD@PLT
	add	DWORD PTR [rbx], eax
	mov	rdi, r13
	mov	rbp, rax
	call	acpi_ut_get_resource_type@PLT
	mov	rdi, r13
	call	acpi_ut_get_descriptor_length@PLT
	mov	edi, ebp
	call	ACPI_DEBUG_PRINT@PLT
	mov	rdi, r13
	call	acpi_ut_get_descriptor_length@PLT
	cdqe
	lea	r13, 0[r13+rax*8]
	cmp	QWORD PTR 8[rsp], r13
	ja	.L2
.L24:
	mov	edi, DWORD PTR AE_AML_NO_RESOURCE_END_TAG[rip]
	call	return_ACPI_STATUS@PLT
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L45
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L15:
	.cfi_restore_state
	mov	rbp, QWORD PTR 0[r13]
	mov	eax, DWORD PTR 16[r13]
	mov	rdi, r13
	add	eax, ebp
	sub	eax, DWORD PTR 8[r13]
	mov	ebp, eax
	call	acpi_ut_get_resource_type@PLT
	cmp	eax, 130
	jne	.L22
.L44:
	mov	rdx, QWORD PTR 0[r13]
	mov	rax, QWORD PTR acpi_gbl_resource_struct_serial_bus_sizes[rip]
	mov	edi, DWORD PTR [rax+rdx*4]
	add	edi, ebp
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edi, DWORD PTR AE_OK[rip]
	call	return_ACPI_STATUS@PLT
.L5:
	mov	rsi, QWORD PTR [rsp]
	mov	edi, ebp
	call	acpi_rs_stream_option_length@PLT
	mov	ebp, eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	cmp	ebp, 1
	adc	ebp, -1
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rax, QWORD PTR 8[r13]
	mov	rsi, QWORD PTR 0[r13]
	mov	rdx, QWORD PTR acpi_gbl_resource_aml_serial_bus_sizes[rip]
	mov	ebp, eax
	sub	ebp, DWORD PTR [rdx+rsi*8]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdi, QWORD PTR [r14]
	call	acpi_rs_count_set_bits@PLT
	mov	ebp, eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	lea	rdi, 28[rsp]
	mov	rsi, r14
	call	ACPI_MOVE_16_TO_16@PLT
	movsx	rdi, DWORD PTR 28[rsp]
	call	acpi_rs_count_set_bits@PLT
	mov	ebp, eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rax, QWORD PTR 8[r14]
	mov	edi, ebp
	mov	rsi, QWORD PTR [rsp]
	lea	r14d, -4[0+rax*4]
	sub	edi, r14d
	call	acpi_rs_stream_option_length@PLT
	lea	ebp, [r14+rax]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L43:
	mov	edi, ebp
	call	return_ACPI_STATUS@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L21:
	mov	eax, DWORD PTR 0[r13]
	add	eax, 4
	sub	eax, edx
	mov	ebp, eax
	jmp	.L4
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	acpi_rs_get_list_length.cold, @function
acpi_rs_get_list_length.cold:
.LFSB0:
.L26:
	.cfi_def_cfa_offset 112
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	xor	ebp, ebp
	jmp	.L4
	.cfi_endproc
.LFE0:
	.text
	.size	acpi_rs_get_list_length, .-acpi_rs_get_list_length
	.section	.text.unlikely
	.size	acpi_rs_get_list_length.cold, .-acpi_rs_get_list_length.cold
.LCOLDE0:
	.text
.LHOTE0:
	.comm	rs_get_list_length,4,4
	.comm	acpi_gbl_resource_struct_sizes,8,8
	.comm	acpi_gbl_resource_struct_serial_bus_sizes,8,8
	.comm	acpi_gbl_resource_aml_sizes,8,8
	.comm	acpi_gbl_resource_aml_serial_bus_sizes,8,8
	.comm	AE_OK,4,4
	.comm	AE_AML_NO_RESOURCE_END_TAG,4,4
	.comm	ACPI_RS_SIZE_MIN,4,4
	.comm	ACPI_DB_RESOURCES,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_rscalc.c_acpi_rs_get_list_length.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	acpi_rs_get_list_length
	.syntax unified
	.arm
	.fpu softvfp
	.type	acpi_rs_get_list_length, %function
acpi_rs_get_list_length:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	fp, r0
	mov	r6, r1
	mov	r5, r2
	ldr	r2, .L41
	ldr	r3, .L41+4
	ldr	r0, [r2]
	sub	sp, sp, #20
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	ACPI_FUNCTION_TRACE
	ldr	r2, .L41+8
	add	r6, fp, r6, lsl #2
	ldr	r2, [r2]
	cmp	fp, r6
	str	r2, [r5]
	bcs	.L2
	ldr	r8, .L41+12
	ldr	r9, .L41+16
.L21:
	mov	r1, fp
	add	r2, sp, #8
	mov	r0, #0
	bl	acpi_ut_validate_resource
	mov	r4, r0
	bl	ACPI_FAILURE
	cmp	r0, #0
	bne	.L39
.L3:
	mov	r0, fp
	bl	acpi_ut_get_resource_length
	ldr	r2, [r8]
	ldr	r1, [sp, #8]
	mov	r4, r0
	mov	r0, fp
	ldr	r7, [r2, r1, lsl #2]
	bl	acpi_ut_get_resource_header_length
	mov	r10, r0
	mov	r0, fp
	bl	acpi_ut_get_resource_type
	sub	r2, r0, #128
	add	r0, fp, r10, lsl #2
	cmp	r2, #15
	ldrls	pc, [pc, r2, asl #2]
	b	.L23
.L6:
	.word	.L18
	.word	.L18
	.word	.L17
	.word	.L15
	.word	.L15
	.word	.L15
	.word	.L12
	.word	.L12
	.word	.L11
	.word	.L12
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L5
	.word	.L5
	.word	.L5
.L12:
	ldr	r2, [fp, #4]
	cmp	r2, #0
	moveq	r4, #4
	ldrne	r4, [fp, #8]
	ldrne	r1, [fp]
	subne	r4, r4, r1
	addne	r4, r4, r2
.L4:
	mov	r0, fp
	bl	acpi_ut_get_resource_type
	cmp	r0, #130
	ldreq	r3, .L41+20
	ldreq	r1, [fp]
	ldreq	r2, [r3]
	ldrne	r2, [r9]
	ldrne	r1, [sp, #8]
	ldr	r0, [r2, r1, lsl #2]
	add	r0, r4, r0
	bl	ACPI_ROUND_UP_TO_NATIVE_WORD
	mov	r4, r0
	ldr	r2, [r5]
	mov	r0, fp
	add	r2, r2, r4
	str	r2, [r5]
	bl	acpi_ut_get_resource_type
	mov	r0, fp
	bl	acpi_ut_get_descriptor_length
	mov	r0, r4
	bl	ACPI_DEBUG_PRINT
	mov	r0, fp
	bl	acpi_ut_get_descriptor_length
	add	fp, fp, r0, lsl #2
	cmp	r6, fp
	bhi	.L21
.L2:
	ldr	r3, .L41+24
	ldr	r0, [r3]
	bl	return_ACPI_STATUS
	ldr	r3, .L41+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L40
	mov	r0, #0
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	ldr	r0, [fp, #8]
	ldr	r2, [fp, #4]
	ldr	r4, [fp]
	sub	r0, r0, r2
	add	r4, r0, r4
	b	.L4
.L8:
	ldr	r3, .L41+28
	ldr	r0, [r3]
	bl	return_ACPI_STATUS
.L5:
	mov	r0, r4
	mov	r1, r7
	bl	acpi_rs_stream_option_length
	mov	r4, r0
	b	.L4
.L18:
	cmp	r4, #0
	subne	r4, r4, #1
	b	.L4
.L17:
	ldr	r3, .L41+32
	ldr	r1, [fp]
	ldr	r2, [r3]
	ldr	r0, [fp, #4]
	ldr	r2, [r2, r1, lsl #2]
	sub	r4, r0, r2
	b	.L4
.L7:
	ldr	r0, [fp, r10, lsl #2]
	bl	acpi_rs_count_set_bits
	mov	r4, r0
	b	.L4
.L9:
	ldr	r2, [r0, #4]
	mov	r1, r7
	sub	r2, r2, #1
	sub	r0, r4, r2, lsl #2
	lsl	r4, r2, #2
	bl	acpi_rs_stream_option_length
	add	r4, r4, r0
	b	.L4
.L11:
	mov	r1, r0
	add	r0, sp, #4
	bl	ACPI_MOVE_16_TO_16
	ldr	r0, [sp, #4]
	bl	acpi_rs_count_set_bits
	mov	r4, r0
	b	.L4
.L39:
	mov	r0, r4
	bl	return_ACPI_STATUS
	b	.L3
.L40:
	bl	__stack_chk_fail
.L23:
	mov	r4, #0
	b	.L4
.L42:
	.align	2
.L41:
	.word	rs_get_list_length
	.word	.LC0
	.word	ACPI_RS_SIZE_MIN
	.word	acpi_gbl_resource_aml_sizes
	.word	acpi_gbl_resource_struct_sizes
	.word	acpi_gbl_resource_struct_serial_bus_sizes
	.word	AE_AML_NO_RESOURCE_END_TAG
	.word	AE_OK
	.word	acpi_gbl_resource_aml_serial_bus_sizes
	.size	acpi_rs_get_list_length, .-acpi_rs_get_list_length
	.comm	rs_get_list_length,4,4
	.comm	acpi_gbl_resource_struct_sizes,4,4
	.comm	acpi_gbl_resource_struct_serial_bus_sizes,4,4
	.comm	acpi_gbl_resource_aml_sizes,4,4
	.comm	acpi_gbl_resource_aml_serial_bus_sizes,4,4
	.comm	AE_OK,4,4
	.comm	AE_AML_NO_RESOURCE_END_TAG,4,4
	.comm	ACPI_RS_SIZE_MIN,4,4
	.comm	ACPI_DB_RESOURCES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
