	.file	"76701635.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Input number of students"
.LC1:
	.string	"%d"
.LC2:
	.string	"Input number of seats"
	.align 8
.LC3:
	.string	"There are %lld ways for %d students to occupy %d seats"
.LC4:
	.string	"Entry is invalid"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rax, -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rax, -20[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, edx
	mov	edi, eax
	call	isValid
	test	al, al
	je	.L2
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	esi, edx
	mov	edi, eax
	call	permutation
	mov	QWORD PTR -16[rbp], rax
	mov	ecx, DWORD PTR -20[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L3
.L2:
	lea	rdi, .LC4[rip]
	call	perror@PLT
.L3:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	permutation
	.type	permutation, @function
permutation:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	factorial
	mov	rbx, rax
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	factorial
	mov	rcx, rax
	mov	rax, rbx
	cqo
	idiv	rcx
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	permutation, .-permutation
	.globl	factorial
	.type	factorial, @function
factorial:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -20[rbp], edi
	cmp	DWORD PTR -20[rbp], 1
	jne	.L9
	mov	eax, 1
	jmp	.L10
.L9:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rbx, eax
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 1
	mov	edi, eax
	call	factorial
	imul	rax, rbx
.L10:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	factorial, .-factorial
	.section	.rodata
	.align 8
.LC5:
	.string	"students must be a positive non zero value"
	.align 8
.LC6:
	.string	"seats must be a positive non zero value"
	.align 8
.LC7:
	.string	"students must be greater than seats"
	.text
	.globl	isValid
	.type	isValid, @function
isValid:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR -8[rbp], esi
	cmp	DWORD PTR -4[rbp], 0
	jg	.L12
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L13
.L12:
	cmp	DWORD PTR -8[rbp], 0
	jg	.L14
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jge	.L15
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, 0
	jmp	.L13
.L15:
	mov	eax, 1
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	isValid, .-isValid
	.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	"76701635.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Input number of students\000"
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"Input number of seats\000"
	.align	2
.LC3:
	.ascii	"There are %lld ways for %d students to occupy %d se"
	.ascii	"ats\000"
	.align	2
.LC4:
	.ascii	"Entry is invalid\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L6+4
	bl	puts
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L6+8
	bl	__isoc99_scanf
	ldr	r0, .L6+12
	bl	puts
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L6+8
	bl	__isoc99_scanf
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	mov	r1, r2
	mov	r0, r3
	bl	isValid
	mov	r3, r0
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	mov	r1, r2
	mov	r0, r3
	bl	permutation
	str	r0, [fp, #-20]
	str	r1, [fp, #-16]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	str	r2, [sp, #4]
	str	r3, [sp]
	sub	r3, fp, #20
	ldmia	r3, {r2-r3}
	ldr	r0, .L6+16
	bl	printf
	b	.L3
.L2:
	ldr	r0, .L6+20
	bl	perror
.L3:
	mov	r3, #0
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.global	__aeabi_ldivmod
	.align	2
	.global	permutation
	.syntax unified
	.arm
	.fpu softvfp
	.type	permutation, %function
permutation:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #8
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	factorial
	mov	r4, r0
	mov	r5, r1
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	sub	r3, r2, r3
	mov	r0, r3
	bl	factorial
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_ldivmod
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	permutation, .-permutation
	.align	2
	.global	factorial
	.syntax unified
	.arm
	.fpu softvfp
	.type	factorial, %function
factorial:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #8
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bne	.L11
	mov	r0, #1
	mov	r1, #0
	b	.L12
.L11:
	ldr	r3, [fp, #-16]
	mov	r4, r3
	asr	r5, r4, #31
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	mov	r0, r3
	bl	factorial
	mov	r2, r0
	mov	r3, r1
	mul	r0, r2, r5
	mul	r1, r4, r3
	add	ip, r0, r1
	umull	r0, r1, r4, r2
	add	r3, ip, r1
	mov	r1, r3
.L12:
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
	.size	factorial, .-factorial
	.section	.rodata
	.align	2
.LC6:
	.ascii	"students must be a positive non zero value\000"
	.align	2
.LC7:
	.ascii	"seats must be a positive non zero value\000"
	.align	2
.LC8:
	.ascii	"students must be greater than seats\000"
	.text
	.align	2
	.global	isValid
	.syntax unified
	.arm
	.fpu softvfp
	.type	isValid, %function
isValid:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L14
	ldr	r0, .L18
	bl	puts
	mov	r3, #0
	b	.L15
.L14:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bgt	.L16
	ldr	r0, .L18+4
	bl	puts
	mov	r3, #0
	b	.L15
.L16:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bge	.L17
	ldr	r0, .L18+8
	bl	puts
	mov	r3, #0
	b	.L15
.L17:
	mov	r3, #1
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	isValid, .-isValid
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
