	.file	"468815.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Ticket numbers..."
.LC1:
	.string	"%d "
.LC2:
	.string	"Ticket marks..."
	.text
	.globl	print_ticket
	.type	print_ticket, @function
print_ticket:
.LFB6:
	.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
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L2
.L5:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rcx
	mov	eax, DWORD PTR 16[rbp+rax*4]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L3:
	cmp	DWORD PTR -4[rbp], 4
	jle	.L4
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -8[rbp], 1
.L2:
	cmp	DWORD PTR -8[rbp], 4
	jle	.L5
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	DWORD PTR -8[rbp], 0
	jmp	.L6
.L9:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L7
.L8:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rcx
	add	rax, 24
	mov	eax, DWORD PTR 20[rbp+rax*4]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -4[rbp], 1
.L7:
	cmp	DWORD PTR -4[rbp], 4
	jle	.L8
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -8[rbp], 1
.L6:
	cmp	DWORD PTR -8[rbp], 4
	jle	.L9
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	print_ticket, .-print_ticket
	.globl	print_tickets
	.type	print_tickets, @function
print_tickets:
.LFB7:
	.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	DWORD PTR -20[rbp], 0
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	sub	rsp, 8
	sub	rsp, 200
	mov	rdx, rsp
	mov	rcx, QWORD PTR [rax]
	mov	rbx, QWORD PTR 8[rax]
	mov	QWORD PTR [rdx], rcx
	mov	QWORD PTR 8[rdx], rbx
	mov	rcx, QWORD PTR 16[rax]
	mov	rbx, QWORD PTR 24[rax]
	mov	QWORD PTR 16[rdx], rcx
	mov	QWORD PTR 24[rdx], rbx
	mov	rcx, QWORD PTR 32[rax]
	mov	rbx, QWORD PTR 40[rax]
	mov	QWORD PTR 32[rdx], rcx
	mov	QWORD PTR 40[rdx], rbx
	mov	rcx, QWORD PTR 48[rax]
	mov	rbx, QWORD PTR 56[rax]
	mov	QWORD PTR 48[rdx], rcx
	mov	QWORD PTR 56[rdx], rbx
	mov	rcx, QWORD PTR 64[rax]
	mov	rbx, QWORD PTR 72[rax]
	mov	QWORD PTR 64[rdx], rcx
	mov	QWORD PTR 72[rdx], rbx
	mov	rcx, QWORD PTR 80[rax]
	mov	rbx, QWORD PTR 88[rax]
	mov	QWORD PTR 80[rdx], rcx
	mov	QWORD PTR 88[rdx], rbx
	mov	rcx, QWORD PTR 96[rax]
	mov	rbx, QWORD PTR 104[rax]
	mov	QWORD PTR 96[rdx], rcx
	mov	QWORD PTR 104[rdx], rbx
	mov	rcx, QWORD PTR 112[rax]
	mov	rbx, QWORD PTR 120[rax]
	mov	QWORD PTR 112[rdx], rcx
	mov	QWORD PTR 120[rdx], rbx
	mov	rcx, QWORD PTR 128[rax]
	mov	rbx, QWORD PTR 136[rax]
	mov	QWORD PTR 128[rdx], rcx
	mov	QWORD PTR 136[rdx], rbx
	mov	rcx, QWORD PTR 144[rax]
	mov	rbx, QWORD PTR 152[rax]
	mov	QWORD PTR 144[rdx], rcx
	mov	QWORD PTR 152[rdx], rbx
	mov	rcx, QWORD PTR 160[rax]
	mov	rbx, QWORD PTR 168[rax]
	mov	QWORD PTR 160[rdx], rcx
	mov	QWORD PTR 168[rdx], rbx
	mov	rcx, QWORD PTR 176[rax]
	mov	rbx, QWORD PTR 184[rax]
	mov	QWORD PTR 176[rdx], rcx
	mov	QWORD PTR 184[rdx], rbx
	mov	rax, QWORD PTR 192[rax]
	mov	QWORD PTR 192[rdx], rax
	call	print_ticket
	add	rsp, 208
	add	DWORD PTR -20[rbp], 1
.L11:
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	jl	.L12
	nop
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	print_tickets, .-print_tickets
	.globl	check_row
	.type	check_row, @function
check_row:
.LFB8:
	.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 -4[rbp], 1
	mov	DWORD PTR -8[rbp], 0
	jmp	.L14
.L17:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rcx
	add	rax, 24
	mov	eax, DWORD PTR 20[rbp+rax*4]
	test	eax, eax
	jne	.L15
	mov	DWORD PTR -4[rbp], 0
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L16
.L15:
	add	DWORD PTR -8[rbp], 1
.L14:
	cmp	DWORD PTR -8[rbp], 4
	jle	.L17
	mov	eax, DWORD PTR -4[rbp]
.L16:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	check_row, .-check_row
	.globl	check_column
	.type	check_column, @function
check_column:
.LFB9:
	.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 -4[rbp], 1
	mov	DWORD PTR -8[rbp], 0
	jmp	.L19
.L22:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rcx
	add	rax, 24
	mov	eax, DWORD PTR 20[rbp+rax*4]
	test	eax, eax
	jne	.L20
	mov	DWORD PTR -4[rbp], 0
	mov	eax, DWORD PTR -4[rbp]
	jmp	.L21
.L20:
	add	DWORD PTR -8[rbp], 1
.L19:
	cmp	DWORD PTR -8[rbp], 4
	jle	.L22
	mov	eax, DWORD PTR -4[rbp]
.L21:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	check_column, .-check_column
	.globl	check_ticket
	.type	check_ticket, @function
check_ticket:
.LFB10:
	.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], 0
	mov	DWORD PTR -8[rbp], 0
	jmp	.L24
.L25:
	mov	eax, DWORD PTR -8[rbp]
	push	QWORD PTR 208[rbp]
	push	QWORD PTR 200[rbp]
	push	QWORD PTR 192[rbp]
	push	QWORD PTR 184[rbp]
	push	QWORD PTR 176[rbp]
	push	QWORD PTR 168[rbp]
	push	QWORD PTR 160[rbp]
	push	QWORD PTR 152[rbp]
	push	QWORD PTR 144[rbp]
	push	QWORD PTR 136[rbp]
	push	QWORD PTR 128[rbp]
	push	QWORD PTR 120[rbp]
	push	QWORD PTR 112[rbp]
	push	QWORD PTR 104[rbp]
	push	QWORD PTR 96[rbp]
	push	QWORD PTR 88[rbp]
	push	QWORD PTR 80[rbp]
	push	QWORD PTR 72[rbp]
	push	QWORD PTR 64[rbp]
	push	QWORD PTR 56[rbp]
	push	QWORD PTR 48[rbp]
	push	QWORD PTR 40[rbp]
	push	QWORD PTR 32[rbp]
	push	QWORD PTR 24[rbp]
	push	QWORD PTR 16[rbp]
	mov	edi, eax
	call	check_row
	add	rsp, 200
	or	DWORD PTR -4[rbp], eax
	add	DWORD PTR -8[rbp], 1
.L24:
	cmp	DWORD PTR -8[rbp], 4
	jle	.L25
	mov	DWORD PTR -8[rbp], 0
	jmp	.L26
.L27:
	mov	eax, DWORD PTR -8[rbp]
	push	QWORD PTR 208[rbp]
	push	QWORD PTR 200[rbp]
	push	QWORD PTR 192[rbp]
	push	QWORD PTR 184[rbp]
	push	QWORD PTR 176[rbp]
	push	QWORD PTR 168[rbp]
	push	QWORD PTR 160[rbp]
	push	QWORD PTR 152[rbp]
	push	QWORD PTR 144[rbp]
	push	QWORD PTR 136[rbp]
	push	QWORD PTR 128[rbp]
	push	QWORD PTR 120[rbp]
	push	QWORD PTR 112[rbp]
	push	QWORD PTR 104[rbp]
	push	QWORD PTR 96[rbp]
	push	QWORD PTR 88[rbp]
	push	QWORD PTR 80[rbp]
	push	QWORD PTR 72[rbp]
	push	QWORD PTR 64[rbp]
	push	QWORD PTR 56[rbp]
	push	QWORD PTR 48[rbp]
	push	QWORD PTR 40[rbp]
	push	QWORD PTR 32[rbp]
	push	QWORD PTR 24[rbp]
	push	QWORD PTR 16[rbp]
	mov	edi, eax
	call	check_column
	add	rsp, 200
	or	DWORD PTR -4[rbp], eax
	add	DWORD PTR -8[rbp], 1
.L26:
	cmp	DWORD PTR -8[rbp], 4
	jle	.L27
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	check_ticket, .-check_ticket
	.globl	mark_ticket
	.type	mark_ticket, @function
mark_ticket:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -8[rbp], 0
	jmp	.L30
.L34:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L31
.L33:
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	add	rax, rsi
	mov	eax, DWORD PTR [rdx+rax*4]
	cmp	DWORD PTR -28[rbp], eax
	jne	.L32
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 2
	add	rax, rcx
	add	rax, rsi
	add	rax, 24
	mov	DWORD PTR 4[rdx+rax*4], 1
.L32:
	add	DWORD PTR -4[rbp], 1
.L31:
	cmp	DWORD PTR -4[rbp], 4
	jle	.L33
	add	DWORD PTR -8[rbp], 1
.L30:
	cmp	DWORD PTR -8[rbp], 4
	jle	.L34
	nop
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	mark_ticket, .-mark_ticket
	.globl	sum_unmarked
	.type	sum_unmarked, @function
sum_unmarked:
.LFB12:
	.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], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L36
.L40:
	mov	DWORD PTR -8[rbp], 0
	jmp	.L37
.L39:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rcx
	add	rax, 24
	mov	eax, DWORD PTR 20[rbp+rax*4]
	test	eax, eax
	jne	.L38
	mov	eax, DWORD PTR -8[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	add	rax, rcx
	mov	eax, DWORD PTR 16[rbp+rax*4]
	add	DWORD PTR -4[rbp], eax
.L38:
	add	DWORD PTR -8[rbp], 1
.L37:
	cmp	DWORD PTR -8[rbp], 4
	jle	.L39
	add	DWORD PTR -12[rbp], 1
.L36:
	cmp	DWORD PTR -12[rbp], 4
	jle	.L40
	mov	eax, DWORD PTR -4[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	sum_unmarked, .-sum_unmarked
	.globl	mark_check_tickets
	.type	mark_check_tickets, @function
mark_check_tickets:
.LFB13:
	.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, 32
	.cfi_offset 3, -24
	mov	QWORD PTR -32[rbp], rdi
	mov	DWORD PTR -36[rbp], esi
	mov	DWORD PTR -40[rbp], edx
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L43
.L46:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, eax
	mov	rdi, rdx
	call	mark_ticket
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	sub	rsp, 200
	mov	rdx, rsp
	mov	rcx, QWORD PTR [rax]
	mov	rbx, QWORD PTR 8[rax]
	mov	QWORD PTR [rdx], rcx
	mov	QWORD PTR 8[rdx], rbx
	mov	rcx, QWORD PTR 16[rax]
	mov	rbx, QWORD PTR 24[rax]
	mov	QWORD PTR 16[rdx], rcx
	mov	QWORD PTR 24[rdx], rbx
	mov	rcx, QWORD PTR 32[rax]
	mov	rbx, QWORD PTR 40[rax]
	mov	QWORD PTR 32[rdx], rcx
	mov	QWORD PTR 40[rdx], rbx
	mov	rcx, QWORD PTR 48[rax]
	mov	rbx, QWORD PTR 56[rax]
	mov	QWORD PTR 48[rdx], rcx
	mov	QWORD PTR 56[rdx], rbx
	mov	rcx, QWORD PTR 64[rax]
	mov	rbx, QWORD PTR 72[rax]
	mov	QWORD PTR 64[rdx], rcx
	mov	QWORD PTR 72[rdx], rbx
	mov	rcx, QWORD PTR 80[rax]
	mov	rbx, QWORD PTR 88[rax]
	mov	QWORD PTR 80[rdx], rcx
	mov	QWORD PTR 88[rdx], rbx
	mov	rcx, QWORD PTR 96[rax]
	mov	rbx, QWORD PTR 104[rax]
	mov	QWORD PTR 96[rdx], rcx
	mov	QWORD PTR 104[rdx], rbx
	mov	rcx, QWORD PTR 112[rax]
	mov	rbx, QWORD PTR 120[rax]
	mov	QWORD PTR 112[rdx], rcx
	mov	QWORD PTR 120[rdx], rbx
	mov	rcx, QWORD PTR 128[rax]
	mov	rbx, QWORD PTR 136[rax]
	mov	QWORD PTR 128[rdx], rcx
	mov	QWORD PTR 136[rdx], rbx
	mov	rcx, QWORD PTR 144[rax]
	mov	rbx, QWORD PTR 152[rax]
	mov	QWORD PTR 144[rdx], rcx
	mov	QWORD PTR 152[rdx], rbx
	mov	rcx, QWORD PTR 160[rax]
	mov	rbx, QWORD PTR 168[rax]
	mov	QWORD PTR 160[rdx], rcx
	mov	QWORD PTR 168[rdx], rbx
	mov	rcx, QWORD PTR 176[rax]
	mov	rbx, QWORD PTR 184[rax]
	mov	QWORD PTR 176[rdx], rcx
	mov	QWORD PTR 184[rdx], rbx
	mov	rax, QWORD PTR 192[rax]
	mov	QWORD PTR 192[rdx], rax
	call	check_ticket
	add	rsp, 200
	test	eax, eax
	je	.L44
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	sub	rsp, 200
	mov	rdx, rsp
	mov	rcx, QWORD PTR [rax]
	mov	rbx, QWORD PTR 8[rax]
	mov	QWORD PTR [rdx], rcx
	mov	QWORD PTR 8[rdx], rbx
	mov	rcx, QWORD PTR 16[rax]
	mov	rbx, QWORD PTR 24[rax]
	mov	QWORD PTR 16[rdx], rcx
	mov	QWORD PTR 24[rdx], rbx
	mov	rcx, QWORD PTR 32[rax]
	mov	rbx, QWORD PTR 40[rax]
	mov	QWORD PTR 32[rdx], rcx
	mov	QWORD PTR 40[rdx], rbx
	mov	rcx, QWORD PTR 48[rax]
	mov	rbx, QWORD PTR 56[rax]
	mov	QWORD PTR 48[rdx], rcx
	mov	QWORD PTR 56[rdx], rbx
	mov	rcx, QWORD PTR 64[rax]
	mov	rbx, QWORD PTR 72[rax]
	mov	QWORD PTR 64[rdx], rcx
	mov	QWORD PTR 72[rdx], rbx
	mov	rcx, QWORD PTR 80[rax]
	mov	rbx, QWORD PTR 88[rax]
	mov	QWORD PTR 80[rdx], rcx
	mov	QWORD PTR 88[rdx], rbx
	mov	rcx, QWORD PTR 96[rax]
	mov	rbx, QWORD PTR 104[rax]
	mov	QWORD PTR 96[rdx], rcx
	mov	QWORD PTR 104[rdx], rbx
	mov	rcx, QWORD PTR 112[rax]
	mov	rbx, QWORD PTR 120[rax]
	mov	QWORD PTR 112[rdx], rcx
	mov	QWORD PTR 120[rdx], rbx
	mov	rcx, QWORD PTR 128[rax]
	mov	rbx, QWORD PTR 136[rax]
	mov	QWORD PTR 128[rdx], rcx
	mov	QWORD PTR 136[rdx], rbx
	mov	rcx, QWORD PTR 144[rax]
	mov	rbx, QWORD PTR 152[rax]
	mov	QWORD PTR 144[rdx], rcx
	mov	QWORD PTR 152[rdx], rbx
	mov	rcx, QWORD PTR 160[rax]
	mov	rbx, QWORD PTR 168[rax]
	mov	QWORD PTR 160[rdx], rcx
	mov	QWORD PTR 168[rdx], rbx
	mov	rcx, QWORD PTR 176[rax]
	mov	rbx, QWORD PTR 184[rax]
	mov	QWORD PTR 176[rdx], rcx
	mov	QWORD PTR 184[rdx], rbx
	mov	rax, QWORD PTR 192[rax]
	mov	QWORD PTR 192[rdx], rax
	call	sum_unmarked
	add	rsp, 200
	mov	edx, DWORD PTR -40[rbp]
	imul	eax, edx
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L45
.L44:
	add	DWORD PTR -16[rbp], 1
.L43:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -36[rbp]
	jl	.L46
	mov	eax, -1
.L45:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	mark_check_tickets, .-mark_check_tickets
	.section	.rodata
.LC3:
	.string	"r"
.LC4:
	.string	"input_1"
.LC5:
	.string	"Failed to open the file"
.LC6:
	.string	",\n"
.LC7:
	.string	"\n"
.LC8:
	.string	"%d %d %d %d %d"
.LC9:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 1096
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -5188[rbp], 0
	mov	DWORD PTR -5184[rbp], 0
	mov	DWORD PTR -5180[rbp], 0
	mov	esi, 200
	mov	edi, 1000
	call	calloc@PLT
	mov	QWORD PTR -5168[rbp], rax
	lea	rsi, .LC3[rip]
	lea	rdi, .LC4[rip]
	call	fopen@PLT
	mov	QWORD PTR -5160[rbp], rax
	cmp	QWORD PTR -5160[rbp], 0
	jne	.L48
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L61
.L48:
	mov	rdx, QWORD PTR -5160[rbp]
	lea	rax, -1056[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -1056[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -5176[rbp], rax
	mov	ebx, DWORD PTR -5188[rbp]
	lea	eax, 1[rbx]
	mov	DWORD PTR -5188[rbp], eax
	mov	rax, QWORD PTR -5176[rbp]
	mov	rdi, rax
	call	atoi@PLT
	movsx	rdx, ebx
	mov	DWORD PTR -5152[rbp+rdx*4], eax
	jmp	.L50
.L51:
	lea	rsi, .LC6[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -5176[rbp], rax
	cmp	QWORD PTR -5176[rbp], 0
	je	.L50
	mov	ebx, DWORD PTR -5188[rbp]
	lea	eax, 1[rbx]
	mov	DWORD PTR -5188[rbp], eax
	mov	rax, QWORD PTR -5176[rbp]
	mov	rdi, rax
	call	atoi@PLT
	movsx	rdx, ebx
	mov	DWORD PTR -5152[rbp+rdx*4], eax
.L50:
	cmp	QWORD PTR -5176[rbp], 0
	jne	.L51
	mov	DWORD PTR -5180[rbp], -1
	jmp	.L52
.L56:
	lea	rax, -1056[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L53
	add	DWORD PTR -5180[rbp], 1
.L53:
	mov	DWORD PTR -5192[rbp], 0
	jmp	.L54
.L55:
	mov	rdx, QWORD PTR -5160[rbp]
	lea	rax, -1056[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	mov	eax, DWORD PTR -5180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -5168[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -5192[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, 16
	lea	rsi, [rcx+rax]
	mov	eax, DWORD PTR -5180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -5168[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -5192[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, 12
	lea	r8, [rcx+rax]
	mov	eax, DWORD PTR -5180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -5168[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -5192[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, 8
	lea	rdi, [rcx+rax]
	mov	eax, DWORD PTR -5180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -5168[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -5192[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	add	rax, 4
	add	rcx, rax
	mov	eax, DWORD PTR -5180[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	lea	rdx, 0[0+rax*4]
	add	rax, rdx
	sal	rax, 3
	mov	rdx, rax
	mov	rax, QWORD PTR -5168[rbp]
	lea	r9, [rdx+rax]
	mov	eax, DWORD PTR -5192[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 2
	add	rax, rdx
	sal	rax, 2
	lea	rdx, [r9+rax]
	lea	rax, -1056[rbp]
	sub	rsp, 8
	push	rsi
	mov	r9, r8
	mov	r8, rdi
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	add	rsp, 16
	add	DWORD PTR -5192[rbp], 1
.L54:
	cmp	DWORD PTR -5192[rbp], 4
	jle	.L55
.L52:
	mov	rdx, QWORD PTR -5160[rbp]
	lea	rax, -1056[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L56
	add	DWORD PTR -5180[rbp], 1
	mov	DWORD PTR -5192[rbp], 0
	jmp	.L57
.L60:
	mov	eax, DWORD PTR -5192[rbp]
	cdqe
	mov	edx, DWORD PTR -5152[rbp+rax*4]
	mov	ecx, DWORD PTR -5180[rbp]
	mov	rax, QWORD PTR -5168[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	mark_check_tickets
	mov	DWORD PTR -5184[rbp], eax
	cmp	DWORD PTR -5184[rbp], -1
	jne	.L63
	add	DWORD PTR -5192[rbp], 1
.L57:
	mov	eax, DWORD PTR -5192[rbp]
	cmp	eax, DWORD PTR -5188[rbp]
	jl	.L60
	jmp	.L59
.L63:
	nop
.L59:
	mov	eax, DWORD PTR -5184[rbp]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -5160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
.L61:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L62
	call	__stack_chk_fail@PLT
.L62:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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	"468815.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Ticket numbers...\000"
	.align	2
.LC1:
	.ascii	"%d \000"
	.align	2
.LC2:
	.ascii	"Ticket marks...\000"
	.text
	.align	2
	.global	print_ticket
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_ticket, %function
print_ticket:
	@ args = 200, pretend = 16, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #16
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	add	ip, fp, #4
	stm	ip, {r0, r1, r2, r3}
	ldr	r0, .L10
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L5:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L3
.L4:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, fp, r3
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L10+4
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L3:
	ldr	r3, [fp, #-8]
	cmp	r3, #4
	ble	.L4
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	ble	.L5
	ldr	r0, .L10+8
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L6
.L9:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L7
.L8:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	add	r3, r3, #24
	lsl	r3, r3, #2
	add	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L10+4
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L7:
	ldr	r3, [fp, #-8]
	cmp	r3, #4
	ble	.L8
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L6:
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	ble	.L9
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #16
	bx	lr
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	print_ticket, .-print_ticket
	.align	2
	.global	print_tickets
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_tickets, %function
print_tickets:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #204
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L13
.L14:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r4, r3, r2
	mov	r0, sp
	add	r3, r4, #16
	mov	r2, #184
	mov	r1, r3
	bl	memcpy
	ldm	r4, {r0, r1, r2, r3}
	bl	print_ticket
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L13:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L14
	nop
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	print_tickets, .-print_tickets
	.align	2
	.global	check_row
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_row, %function
check_row:
	@ args = 204, pretend = 16, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	sub	sp, sp, #16
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	add	ip, fp, #4
	stm	ip, {r0, r1, r2, r3}
	mov	r3, #1
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L16
.L19:
	ldr	r2, [fp, #204]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	add	r3, r3, #24
	lsl	r3, r3, #2
	add	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L17
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	b	.L18
.L17:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L16:
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	ble	.L19
	ldr	r3, [fp, #-8]
.L18:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	add	sp, sp, #16
	bx	lr
	.size	check_row, .-check_row
	.align	2
	.global	check_column
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_column, %function
check_column:
	@ args = 204, pretend = 16, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	sub	sp, sp, #16
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	add	ip, fp, #4
	stm	ip, {r0, r1, r2, r3}
	mov	r3, #1
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L21
.L24:
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #204]
	add	r3, r3, r2
	add	r3, r3, #24
	lsl	r3, r3, #2
	add	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L22
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	b	.L23
.L22:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L21:
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	ble	.L24
	ldr	r3, [fp, #-8]
.L23:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	add	sp, sp, #16
	bx	lr
	.size	check_column, .-check_column
	.align	2
	.global	check_ticket
	.syntax unified
	.arm
	.fpu softvfp
	.type	check_ticket, %function
check_ticket:
	@ args = 200, pretend = 16, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #16
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #200
	add	ip, fp, #4
	stm	ip, {r0, r1, r2, r3}
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L26
.L27:
	ldr	r3, [fp, #-12]
	str	r3, [sp, #184]
	mov	r0, sp
	add	r3, fp, #20
	mov	r2, #184
	mov	r1, r3
	bl	memcpy
	add	r3, fp, #4
	ldm	r3, {r0, r1, r2, r3}
	bl	check_row
	mov	r2, r0
	ldr	r3, [fp, #-8]
	orr	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L26:
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	ble	.L27
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L28
.L29:
	ldr	r3, [fp, #-12]
	str	r3, [sp, #184]
	mov	r0, sp
	add	r3, fp, #20
	mov	r2, #184
	mov	r1, r3
	bl	memcpy
	add	r3, fp, #4
	ldm	r3, {r0, r1, r2, r3}
	bl	check_column
	mov	r2, r0
	ldr	r3, [fp, #-8]
	orr	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L28:
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	ble	.L29
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #16
	bx	lr
	.size	check_ticket, .-check_ticket
	.align	2
	.global	mark_ticket
	.syntax unified
	.arm
	.fpu softvfp
	.type	mark_ticket, %function
mark_ticket:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L32
.L36:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L33
.L35:
	ldr	r1, [fp, #-16]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	ldr	r3, [r1, r3, lsl #2]
	ldr	r2, [fp, #-20]
	cmp	r2, r3
	bne	.L34
	ldr	r1, [fp, #-16]
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-8]
	add	r3, r3, r2
	add	r3, r3, #24
	lsl	r3, r3, #2
	add	r3, r1, r3
	mov	r2, #1
	str	r2, [r3, #4]
.L34:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L33:
	ldr	r3, [fp, #-8]
	cmp	r3, #4
	ble	.L35
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L32:
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	ble	.L36
	nop
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	mark_ticket, .-mark_ticket
	.align	2
	.global	sum_unmarked
	.syntax unified
	.arm
	.fpu softvfp
	.type	sum_unmarked, %function
sum_unmarked:
	@ args = 200, pretend = 16, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	sub	sp, sp, #16
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	add	ip, fp, #4
	stm	ip, {r0, r1, r2, r3}
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L38
.L42:
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L39
.L41:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	add	r3, r3, #24
	lsl	r3, r3, #2
	add	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L40
	ldr	r2, [fp, #-16]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	ldr	r2, [fp, #-12]
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, fp, r3
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	str	r3, [fp, #-8]
.L40:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L39:
	ldr	r3, [fp, #-12]
	cmp	r3, #4
	ble	.L41
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L38:
	ldr	r3, [fp, #-16]
	cmp	r3, #4
	ble	.L42
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	add	sp, sp, #16
	bx	lr
	.size	sum_unmarked, .-sum_unmarked
	.align	2
	.global	mark_check_tickets
	.syntax unified
	.arm
	.fpu softvfp
	.type	mark_check_tickets, %function
mark_check_tickets:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #212
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L45
.L48:
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r3, r2
	ldr	r1, [fp, #-32]
	mov	r0, r3
	bl	mark_ticket
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r4, r3, r2
	mov	r0, sp
	add	r3, r4, #16
	mov	r2, #184
	mov	r1, r3
	bl	memcpy
	ldm	r4, {r0, r1, r2, r3}
	bl	check_ticket
	mov	r3, r0
	cmp	r3, #0
	beq	.L46
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r4, r3, r2
	mov	r0, sp
	add	r3, r4, #16
	mov	r2, #184
	mov	r1, r3
	bl	memcpy
	ldm	r4, {r0, r1, r2, r3}
	bl	sum_unmarked
	mov	r2, r0
	ldr	r3, [fp, #-32]
	mul	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	b	.L47
.L46:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L45:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L48
	mvn	r3, #0
.L47:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	mark_check_tickets, .-mark_check_tickets
	.section	.rodata
	.align	2
.LC3:
	.ascii	"r\000"
	.align	2
.LC4:
	.ascii	"input_1\000"
	.align	2
.LC5:
	.ascii	"Failed to open the file\000"
	.align	2
.LC6:
	.ascii	",\012\000"
	.align	2
.LC7:
	.ascii	"\012\000"
	.align	2
.LC8:
	.ascii	"%d %d %d %d %d\000"
	.align	2
.LC9:
	.ascii	"%d\012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 5152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #5120
	sub	sp, sp, #52
	ldr	r3, .L66
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-1052]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-1048]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-1044]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	mov	r1, #200
	mov	r0, #1000
	bl	calloc
	mov	r3, r0
	str	r3, [r4, #-1036]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L66+4
	ldr	r0, .L66+8
	bl	fopen
	str	r0, [r4, #-1032]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1032]
	cmp	r3, #0
	bne	.L50
	ldr	r0, .L66+12
	bl	perror
	mov	r3, #1
	b	.L63
.L50:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [r2, #-1032]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, .L66+16
	mov	r0, r3
	bl	strtok
	str	r0, [r4, #-1040]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r4, [r3, #-1052]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	add	r3, r4, #1
	str	r3, [r2, #-1052]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-1040]
	bl	atoi
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	lsl	r3, r4, #2
	add	r3, r1, r3
	str	r2, [r3, #-1028]
	b	.L52
.L53:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L66+16
	mov	r0, #0
	bl	strtok
	str	r0, [r4, #-1040]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1052]
	str	r3, [r2, #-1052]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1040]
	cmp	r3, #0
	beq	.L52
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r4, [r3, #-1052]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	add	r3, r4, #1
	str	r3, [r2, #-1052]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-1040]
	bl	atoi
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	lsl	r3, r4, #2
	add	r3, r1, r3
	str	r2, [r3, #-1028]
.L52:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1040]
	cmp	r3, #0
	bne	.L53
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-1044]
	b	.L54
.L58:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, .L66+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L55
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1044]
	add	r3, r3, #1
	str	r3, [r2, #-1044]
.L55:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-1056]
	b	.L56
.L57:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [r2, #-1032]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-1044]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1036]
	add	r1, r3, r2
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-1056]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	lr, r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-1044]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1036]
	add	r1, r3, r2
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-1056]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, #4
	add	r4, r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-1044]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1036]
	add	r1, r3, r2
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-1056]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, #8
	add	r1, r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-1044]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1036]
	add	r0, r3, r2
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-1056]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, #12
	add	ip, r0, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-1044]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r2, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #3
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1036]
	add	r0, r3, r2
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-1056]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #2
	add	r3, r3, #16
	add	r3, r0, r3
	sub	r0, fp, #1024
	sub	r0, r0, #12
	sub	r0, r0, #4
	str	r3, [sp, #8]
	str	ip, [sp, #4]
	str	r1, [sp]
	mov	r3, r4
	mov	r2, lr
	ldr	r1, .L66+24
	bl	__isoc99_sscanf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1056]
	add	r3, r3, #1
	str	r3, [r2, #-1056]
.L56:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1056]
	cmp	r3, #4
	ble	.L57
.L54:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [r2, #-1032]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L58
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1044]
	add	r3, r3, #1
	str	r3, [r2, #-1044]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-1056]
	b	.L59
.L62:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1056]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #-1028]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r4, r2
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r2
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, r3
	ldr	r1, [r1, #-1044]
	ldr	r0, [r0, #-1036]
	bl	mark_check_tickets
	str	r0, [r4, #-1048]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1048]
	cmn	r3, #1
	bne	.L65
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-1056]
	add	r3, r3, #1
	str	r3, [r2, #-1056]
.L59:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-1056]
	ldr	r3, [r3, #-1052]
	cmp	r2, r3
	blt	.L62
	b	.L61
.L65:
	nop
.L61:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r3, #-1048]
	ldr	r0, .L66+28
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-1032]
	bl	fclose
	mov	r3, #0
.L63:
	ldr	r2, .L66
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L64
	bl	__stack_chk_fail
.L64:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L67:
	.align	2
.L66:
	.word	.LC10
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
