	.file	"9051.c"
	.intel_syntax noprefix
	.text
	.globl	func
	.type	func, @function
func:
.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 -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -12[rbp], 1
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR -8[rbp], eax
	jmp	.L2
.L18:
	mov	ecx, DWORD PTR -8[rbp]
	movsx	rax, ecx
	imul	rax, rax, 780903145
	shr	rax, 32
	sar	eax
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	add	eax, edx
	mov	edx, ecx
	sub	edx, eax
	test	edx, edx
	jne	.L3
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L4
.L3:
	mov	edx, DWORD PTR -8[rbp]
	movsx	rax, edx
	imul	rax, rax, -1840700269
	shr	rax, 32
	add	eax, edx
	sar	eax, 2
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 3
	sub	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	je	.L19
	mov	edx, DWORD PTR -8[rbp]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 2
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	jne	.L7
	jmp	.L2
.L7:
	mov	edx, DWORD PTR -8[rbp]
	movsx	rax, edx
	imul	rax, rax, 1431655766
	shr	rax, 32
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	add	ecx, ecx
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	je	.L20
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -4[rbp], eax
	jmp	.L10
.L17:
	mov	ecx, DWORD PTR -4[rbp]
	movsx	rax, ecx
	imul	rax, rax, 780903145
	shr	rax, 32
	sar	eax
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	add	eax, edx
	mov	edx, ecx
	sub	edx, eax
	test	edx, edx
	jne	.L11
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L4
.L11:
	mov	edx, DWORD PTR -4[rbp]
	movsx	rax, edx
	imul	rax, rax, -1840700269
	shr	rax, 32
	add	eax, edx
	sar	eax, 2
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 3
	sub	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	je	.L21
	mov	edx, DWORD PTR -4[rbp]
	movsx	rax, edx
	imul	rax, rax, 1717986919
	shr	rax, 32
	sar	eax
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	sal	ecx, 2
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	je	.L22
	mov	edx, DWORD PTR -4[rbp]
	movsx	rax, edx
	imul	rax, rax, 1431655766
	shr	rax, 32
	mov	ecx, edx
	sar	ecx, 31
	sub	eax, ecx
	mov	ecx, eax
	add	ecx, ecx
	add	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	test	eax, eax
	je	.L23
	mov	eax, DWORD PTR -12[rbp]
	imul	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -12[rbp], eax
	jmp	.L15
.L22:
	nop
.L15:
	sub	DWORD PTR -4[rbp], 1
.L10:
	cmp	DWORD PTR -4[rbp], 0
	js	.L17
	jmp	.L13
.L21:
	nop
.L13:
	mov	eax, DWORD PTR -12[rbp]
	imul	eax, DWORD PTR -8[rbp]
	mov	DWORD PTR -12[rbp], eax
	sub	DWORD PTR -8[rbp], 1
.L2:
	cmp	DWORD PTR -8[rbp], 0
	jg	.L18
	jmp	.L6
.L19:
	nop
.L6:
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L4
.L20:
	nop
	jmp	.L9
.L23:
	nop
.L9:
	mov	eax, -1
.L4:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	func, .-func
	.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	"9051.c"
	.text
	.align	2
	.global	func
	.syntax unified
	.arm
	.fpu softvfp
	.type	func, %function
func:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-12]
	b	.L2
.L18:
	ldr	r1, [fp, #-12]
	ldr	r3, .L24
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L3
	ldr	r3, [fp, #-16]
	b	.L4
.L3:
	ldr	r2, [fp, #-12]
	ldr	r3, .L24+4
	smull	r1, r3, r2, r3
	add	r3, r3, r2
	asr	r1, r3, #2
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #3
	sub	r3, r3, r1
	sub	r1, r2, r3
	cmp	r1, #0
	beq	.L19
	ldr	r1, [fp, #-12]
	ldr	r3, .L24+8
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L7
	b	.L2
.L7:
	ldr	r1, [fp, #-12]
	ldr	r3, .L24+12
	smull	r0, r2, r3, r1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	beq	.L20
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-8]
	b	.L10
.L17:
	ldr	r1, [fp, #-8]
	ldr	r3, .L24
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	bne	.L11
	ldr	r3, [fp, #-16]
	b	.L4
.L11:
	ldr	r2, [fp, #-8]
	ldr	r3, .L24+4
	smull	r1, r3, r2, r3
	add	r3, r3, r2
	asr	r1, r3, #2
	asr	r3, r2, #31
	sub	r1, r1, r3
	mov	r3, r1
	lsl	r3, r3, #3
	sub	r3, r3, r1
	sub	r1, r2, r3
	cmp	r1, #0
	beq	.L21
	ldr	r1, [fp, #-8]
	ldr	r3, .L24+8
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	beq	.L22
	ldr	r1, [fp, #-8]
	ldr	r3, .L24+12
	smull	r0, r2, r3, r1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	sub	r2, r1, r3
	cmp	r2, #0
	beq	.L23
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	mul	r3, r2, r3
	str	r3, [fp, #-16]
	b	.L15
.L22:
	nop
.L15:
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-8]
.L10:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	blt	.L17
	b	.L13
.L21:
	nop
.L13:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-12]
	mul	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bgt	.L18
	b	.L6
.L19:
	nop
.L6:
	ldr	r3, [fp, #-16]
	b	.L4
.L20:
	nop
	b	.L9
.L23:
	nop
.L9:
	mvn	r3, #0
.L4:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L25:
	.align	2
.L24:
	.word	780903145
	.word	-1840700269
	.word	1717986919
	.word	1431655766
	.size	func, .-func
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
