	.file	"extr_stb0899_algo.c_stb0899_first_subrange.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	stb0899_first_subrange, @function
stb0899_first_subrange:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR 8[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 4[rsp], 0
	cmp	QWORD PTR 0[rbp], 0
	je	.L2
	mov	esi, 1
	call	stb0899_i2c_gate_ctrl@PLT
	lea	rsi, 4[rsp]
	mov	rdi, rbx
	call	[QWORD PTR 0[rbp]]
	xor	esi, esi
	mov	rdi, rbx
	call	stb0899_i2c_gate_ctrl@PLT
	mov	rdi, rbx
	call	stb0899_carr_width@PLT
	mov	esi, DWORD PTR 4[rsp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	sub	esi, eax
	test	esi, esi
	jg	.L7
.L2:
	mov	QWORD PTR 40[rbx], 0
.L3:
	mov	eax, DWORD PTR 16[rbx]
	mov	QWORD PTR 24[rbx], 0
	mov	DWORD PTR 32[rbx], 1
	mov	DWORD PTR 36[rbx], eax
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L8
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	edi, DWORD PTR 48[rbx]
	call	min@PLT
	mov	QWORD PTR 40[rbx], rax
	jmp	.L3
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	stb0899_first_subrange, .-stb0899_first_subrange
	.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_stb0899_algo.c_stb0899_first_subrange.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stb0899_first_subrange, %function
stb0899_first_subrange:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r5, #0
	ldr	r3, .L12
	ldr	r6, [r0, #4]
	sub	sp, sp, #8
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	ldr	r3, [r6]
	mov	r4, r0
	cmp	r3, r5
	str	r5, [sp]
	beq	.L2
	mov	r1, #1
	bl	stb0899_i2c_gate_ctrl
	ldr	r3, [r6]
	mov	r1, sp
	mov	r0, r4
	blx	r3
	mov	r1, r5
	mov	r0, r4
	bl	stb0899_i2c_gate_ctrl
	mov	r0, r4
	bl	stb0899_carr_width
	ldr	r1, [sp]
	add	r0, r0, r0, lsr #31
	sub	r1, r1, r0, asr #1
	cmp	r1, r5
	bgt	.L10
.L2:
	mov	r3, #0
	str	r3, [r4, #24]
.L3:
	mov	r2, #1
	mov	r1, #0
	ldr	r3, [r4, #8]
	str	r1, [r4, #12]
	str	r3, [r4, #20]
	ldr	r3, .L12
	str	r2, [r4, #16]
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L10:
	ldr	r0, [r4, #28]
	bl	min
	str	r0, [r4, #24]
	b	.L3
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.size	stb0899_first_subrange, .-stb0899_first_subrange
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
