	.file	"271161.c"
	.intel_syntax noprefix
	.text
	.globl	idamax
	.type	idamax, @function
idamax:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -40[rbp], edx
	mov	DWORD PTR -20[rbp], 0
	cmp	DWORD PTR -36[rbp], 0
	jg	.L2
	mov	eax, DWORD PTR -20[rbp]
	jmp	.L3
.L2:
	mov	DWORD PTR -20[rbp], 1
	cmp	DWORD PTR -36[rbp], 1
	jle	.L4
	cmp	DWORD PTR -40[rbp], 0
	jg	.L5
.L4:
	mov	eax, DWORD PTR -20[rbp]
	jmp	.L3
.L5:
	cmp	DWORD PTR -40[rbp], 1
	je	.L6
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR [rax]
	movq	xmm1, QWORD PTR .LC0[rip]
	andpd	xmm0, xmm1
	movsd	QWORD PTR -16[rbp], xmm0
	mov	DWORD PTR -24[rbp], 2
	mov	eax, DWORD PTR -40[rbp]
	add	eax, 1
	mov	DWORD PTR -28[rbp], eax
	jmp	.L7
.L10:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	movq	xmm1, QWORD PTR .LC0[rip]
	andpd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	movsd	xmm0, QWORD PTR -8[rbp]
	comisd	xmm0, QWORD PTR -16[rbp]
	jbe	.L8
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -20[rbp], eax
	movsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR -16[rbp], xmm0
.L8:
	add	DWORD PTR -24[rbp], 1
	mov	eax, DWORD PTR -40[rbp]
	add	DWORD PTR -28[rbp], eax
.L7:
	mov	eax, DWORD PTR -36[rbp]
	imul	eax, DWORD PTR -40[rbp]
	cmp	DWORD PTR -28[rbp], eax
	jle	.L10
	mov	eax, DWORD PTR -20[rbp]
	jmp	.L3
.L6:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	movsd	xmm0, QWORD PTR [rax]
	movq	xmm1, QWORD PTR .LC0[rip]
	andpd	xmm0, xmm1
	movsd	QWORD PTR -16[rbp], xmm0
	mov	DWORD PTR -28[rbp], 2
	jmp	.L11
.L14:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	movsd	xmm0, QWORD PTR [rax]
	movq	xmm1, QWORD PTR .LC0[rip]
	andpd	xmm0, xmm1
	movsd	QWORD PTR -8[rbp], xmm0
	movsd	xmm0, QWORD PTR -8[rbp]
	comisd	xmm0, QWORD PTR -16[rbp]
	jbe	.L12
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -20[rbp], eax
	movsd	xmm0, QWORD PTR -8[rbp]
	movsd	QWORD PTR -16[rbp], xmm0
.L12:
	add	DWORD PTR -28[rbp], 1
.L11:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jle	.L14
	mov	eax, DWORD PTR -20[rbp]
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	idamax, .-idamax
	.section	.rodata
	.align 16
.LC0:
	.long	-1
	.long	2147483647
	.long	0
	.long	0
	.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	"271161.c"
	.text
	.global	__aeabi_dcmpgt
	.align	2
	.global	idamax
	.syntax unified
	.arm
	.fpu softvfp
	.type	idamax, %function
idamax:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	str	r2, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bgt	.L2
	ldr	r3, [fp, #-24]
	b	.L3
.L2:
	mov	r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-40]
	cmp	r3, #1
	ble	.L4
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bgt	.L5
.L4:
	ldr	r3, [fp, #-24]
	b	.L3
.L5:
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	beq	.L6
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	mov	r1, r2
	str	r1, [fp, #-20]
	bic	r3, r3, #-2147483648
	str	r3, [fp, #-16]
	mov	r3, #2
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	b	.L7
.L10:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	mov	r1, r2
	str	r1, [fp, #-12]
	bic	r3, r3, #-2147483648
	str	r3, [fp, #-8]
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpgt
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-24]
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
.L8:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-48]
	add	r3, r2, r3
	str	r3, [fp, #-32]
.L7:
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-48]
	mul	r3, r2, r3
	ldr	r2, [fp, #-32]
	cmp	r2, r3
	ble	.L10
	ldr	r3, [fp, #-24]
	b	.L3
.L6:
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldmia	r3, {r2-r3}
	mov	r1, r2
	str	r1, [fp, #-20]
	bic	r3, r3, #-2147483648
	str	r3, [fp, #-16]
	mov	r3, #2
	str	r3, [fp, #-32]
	b	.L11
.L14:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #3
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldmia	r3, {r2-r3}
	mov	r1, r2
	str	r1, [fp, #-12]
	bic	r3, r3, #-2147483648
	str	r3, [fp, #-8]
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	sub	r1, fp, #12
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpgt
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	sub	r3, fp, #12
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-20]
	str	r3, [fp, #-16]
.L12:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L11:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	ble	.L14
	ldr	r3, [fp, #-24]
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	idamax, .-idamax
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
