	.file	"517955.c"
	.intel_syntax noprefix
	.text
	.globl	a17
	.data
	.align 4
	.type	a17, @object
	.size	a17, 4
a17:
	.long	1
	.globl	a7
	.bss
	.align 4
	.type	a7, @object
	.size	a7, 4
a7:
	.zero	4
	.globl	a20
	.data
	.align 4
	.type	a20, @object
	.size	a20, 4
a20:
	.long	1
	.globl	a8
	.align 4
	.type	a8, @object
	.size	a8, 4
a8:
	.long	15
	.globl	a12
	.align 4
	.type	a12, @object
	.size	a12, 4
a12:
	.long	8
	.globl	a16
	.align 4
	.type	a16, @object
	.size	a16, 4
a16:
	.long	5
	.globl	a21
	.align 4
	.type	a21, @object
	.size	a21, 4
a21:
	.long	1
	.text
	.globl	calculate_output
	.type	calculate_output, @function
calculate_output:
.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 -4[rbp], edi
	mov	eax, DWORD PTR a16[rip]
	cmp	eax, 5
	je	.L2
	mov	eax, DWORD PTR a16[rip]
	cmp	eax, 6
	jne	.L3
.L2:
	cmp	DWORD PTR -4[rbp], 1
	jne	.L3
	mov	eax, DWORD PTR a20[rip]
	cmp	eax, 1
	jne	.L3
	mov	eax, DWORD PTR a7[rip]
	cmp	eax, 1
	je	.L3
	mov	eax, 24
	jmp	.L4
.L3:
	cmp	DWORD PTR -4[rbp], 5
	jne	.L5
	mov	eax, DWORD PTR a16[rip]
	cmp	eax, 6
	jne	.L6
	mov	eax, DWORD PTR a17[rip]
	cmp	eax, 1
	je	.L7
.L6:
	mov	eax, DWORD PTR a17[rip]
	cmp	eax, 1
	jne	.L8
	mov	eax, DWORD PTR a16[rip]
	cmp	eax, 4
	je	.L7
.L8:
	mov	eax, DWORD PTR a17[rip]
	cmp	eax, 1
	jne	.L5
	mov	eax, DWORD PTR a16[rip]
	cmp	eax, 5
	jne	.L5
.L7:
	mov	eax, DWORD PTR a20[rip]
	cmp	eax, 1
	jne	.L5
	mov	eax, DWORD PTR a21[rip]
	cmp	eax, 1
	jne	.L9
.L5:
	mov	eax, DWORD PTR a21[rip]
	cmp	eax, 1
	jne	.L9
	mov	eax, DWORD PTR a12[rip]
	cmp	eax, 8
	jne	.L9
	cmp	DWORD PTR -4[rbp], 3
	jne	.L9
	mov	eax, DWORD PTR a16[rip]
	cmp	eax, 5
	je	.L10
	mov	eax, DWORD PTR a16[rip]
	cmp	eax, 6
	jne	.L9
.L10:
	mov	eax, DWORD PTR a8[rip]
	cmp	eax, 15
	jne	.L9
	mov	eax, 21
	jmp	.L4
.L9:
	mov	eax, -2
.L4:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	calculate_output, .-calculate_output
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"Invalid input: %d\n"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -12[rbp], -1
	lea	rax, -16[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -16[rbp]
	mov	edi, eax
	call	calculate_output
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -2
	jne	.L12
	mov	edx, DWORD PTR -16[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L12:
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.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	"517955.c"
	.text
	.global	a17
	.data
	.align	2
	.type	a17, %object
	.size	a17, 4
a17:
	.word	1
	.global	a7
	.bss
	.align	2
	.type	a7, %object
	.size	a7, 4
a7:
	.space	4
	.global	a20
	.data
	.align	2
	.type	a20, %object
	.size	a20, 4
a20:
	.word	1
	.global	a8
	.align	2
	.type	a8, %object
	.size	a8, 4
a8:
	.word	15
	.global	a12
	.align	2
	.type	a12, %object
	.size	a12, 4
a12:
	.word	8
	.global	a16
	.align	2
	.type	a16, %object
	.size	a16, 4
a16:
	.word	5
	.global	a21
	.align	2
	.type	a21, %object
	.size	a21, 4
a21:
	.word	1
	.text
	.align	2
	.global	calculate_output
	.syntax unified
	.arm
	.fpu softvfp
	.type	calculate_output, %function
calculate_output:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #5
	beq	.L2
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #6
	bne	.L3
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bne	.L3
	ldr	r3, .L11+4
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L3
	ldr	r3, .L11+8
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L3
	mov	r3, #24
	b	.L4
.L3:
	ldr	r3, [fp, #-8]
	cmp	r3, #5
	bne	.L5
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #6
	bne	.L6
	ldr	r3, .L11+12
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L7
.L6:
	ldr	r3, .L11+12
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L8
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L7
.L8:
	ldr	r3, .L11+12
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L5
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #5
	bne	.L5
.L7:
	ldr	r3, .L11+4
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L5
	ldr	r3, .L11+16
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L9
.L5:
	ldr	r3, .L11+16
	ldr	r3, [r3]
	cmp	r3, #1
	bne	.L9
	ldr	r3, .L11+20
	ldr	r3, [r3]
	cmp	r3, #8
	bne	.L9
	ldr	r3, [fp, #-8]
	cmp	r3, #3
	bne	.L9
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #5
	beq	.L10
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #6
	bne	.L9
.L10:
	ldr	r3, .L11+24
	ldr	r3, [r3]
	cmp	r3, #15
	bne	.L9
	mov	r3, #21
	b	.L4
.L9:
	mvn	r3, #1
.L4:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L12:
	.align	2
.L11:
	.word	a16
	.word	a20
	.word	a7
	.word	a17
	.word	a21
	.word	a12
	.word	a8
	.size	calculate_output, .-calculate_output
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.align	2
.LC1:
	.ascii	"Invalid input: %d\012\000"
	.align	2
.LC2:
	.ascii	"%d\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-12]
	sub	r3, fp, #16
	mov	r1, r3
	ldr	r0, .L17+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	calculate_output
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #2
	bne	.L14
	ldr	r3, .L17+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L17+12
	mov	r0, r3
	bl	fprintf
.L14:
	ldr	r1, [fp, #-12]
	ldr	r0, .L17+16
	bl	printf
	mov	r3, #0
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC3
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
