Submission details
Task:Niitty
Sender:MikaelM
Submission time:2025-06-02 14:34:17 +0300
Language:Assembly
Status:COMPILE ERROR

Compiler report

input/code.asm:1: error: parser: instruction expected
input/code.asm:2: error: parser: instruction expected
input/code.asm:3: warning: label alone on a line without a colon might be in error [-w+label-orphan]
input/code.asm:4: error: label or instruction expected at start of line
input/code.asm:5: error: parser: instruction expected
input/code.asm:6: error: label or instruction expected at start of line
input/code.asm:7: error: parser: instruction expected
input/code.asm:8: error: parser: instruction expected
input/code.asm:9: error: parser: instruction expected
input/code.asm:12: warning: label alone on a line without a colon might be in error [-w+label-orphan]
input/code.asm:21: warning: `PTR' is not a NASM keyword [-w+ptr]
input/code.asm:25: warning: `PTR' is not a NASM keyword [-w+ptr]
input/code.asm:32: error: parser: instruction expected
input/code.asm:33: error: parser: instruction expected
input/code.asm:38: warning: `PTR' is not a NASM keyword [-w+ptr]
input/code.asm:43: warni...

Code

	.file	"main.cpp"
	.intel_syntax noprefix
	.text
#APP
	.globl _ZSt21ios_base_library_initv
#NO_APP
	.p2align 4
	.globl	_Z5muutaiii
	.type	_Z5muutaiii, @function
_Z5muutaiii:
.LFB9881:
	.cfi_startproc
	endbr64
	add	edi, 512
	movsx	rdx, edx
	mov	r8d, esi
	movsx	rax, edi
	lea	rsi, p[rip]
	imul	rax, rax, 501
	add	rax, rdx
	mov	ecx, DWORD PTR [rsi+rax*4]
	test	ecx, r8d
	jne	.L1
	or	ecx, r8d
	mov	DWORD PTR [rsi+rax*4], ecx
	mov	ecx, edi
	shr	ecx, 31
	add	ecx, edi
	sar	ecx
	cmp	edi, 1
	jle	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	movsx	rax, ecx
	imul	rax, rax, 501
	add	rax, rdx
	or	DWORD PTR [rsi+rax*4], r8d
	sar	ecx
	jne	.L3
.L1:
	ret
	.cfi_endproc
.LFE9881:
	.size	_Z5muutaiii, .-_Z5muutaiii
	.p2align 4
	.globl	_Z4maskiii
	.type	_Z4maskiii, @function
_Z4maskiii:
.LFB9882:
	.cfi_startproc
	endbr64
	cmp	edi, esi
	lea	ecx, 512[rsi]
	lea	eax, 512[rdi]
	mov	esi, 0
	jg	.L6
	lea	r8, p[rip]
	movsx	rdi, edx
	.p2align 4,,10
	.p2align 3
.L10:
	mov	r9d, eax
	shr	r9d, 31
	lea	edx, [rax+r9]
	and	edx, 1
	sub	edx, r9d
	cmp	edx, 1
	jne	.L8
	movsx	rdx, eax
	add	eax, 1
	imul	rdx, rdx, 501
	add	rdx, rdi
	or	esi, DWORD PTR [r8+rdx*4]
.L8:
	test	cl, 1
	jne	.L9
	movsx	rdx, ecx
	sub	ecx, 1
	imul	rdx, rdx, 501
	add	rdx, rdi
	or	esi, DWORD PTR [r8+rdx*4]
.L9:
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	mov	edx, ecx
	shr	edx, 31
	sar	eax
	add	edx, ecx
	mov	ecx, edx
	sar	ecx
	cmp	eax, ecx
	jle	.L10
.L6:
	mov	eax, esi
	ret
	.cfi_endproc
.LFE9882:
	.size	_Z4maskiii, .-_Z4maskiii
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB9883:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	edi, edi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	lea	rbp, _ZSt3cin[rip]
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	_ZNSt8ios_base15sync_with_stdioEb@PLT
	lea	rsi, 36[rsp]
	mov	rdi, rbp
	mov	QWORD PTR _ZSt3cin[rip+232], 0
	call	_ZNSirsERi@PLT
	mov	edx, DWORD PTR 36[rsp]
	test	edx, edx
	jle	.L14
	lea	rax, c[rip+2004]
	mov	DWORD PTR 8[rsp], 1
	lea	r14, 35[rsp]
	mov	r12d, 1
	mov	QWORD PTR 24[rsp], rax
	mov	rbx, rax
.L16:
	mov	r15d, 1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rsi, r14
	mov	rdi, rbp
	call	_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_@PLT
	movsx	ecx, BYTE PTR 35[rsp]
	mov	eax, r12d
	mov	r13d, DWORD PTR 36[rsp]
	sub	ecx, 65
	sal	eax, cl
	or	DWORD PTR bm[rip], eax
	mov	DWORD PTR [rbx+r15*4], eax
	add	r15, 1
	cmp	r13d, r15d
	jge	.L15
	add	DWORD PTR 8[rsp], 1
	mov	eax, DWORD PTR 8[rsp]
	add	rbx, 2004
	cmp	r13d, eax
	jge	.L16
	test	r13d, r13d
	jle	.L14
	mov	QWORD PTR 8[rsp], 0
	mov	ebp, 1
.L17:
	mov	DWORD PTR 20[rsp], ebp
	mov	r11, QWORD PTR 24[rsp]
	mov	r10d, ebp
	cmp	r13d, ebp
	jl	.L19
	.p2align 4,,10
	.p2align 3
.L25:
	mov	r9d, 1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	esi, DWORD PTR [r11+r9*4]
	mov	edi, r9d
	mov	edx, r10d
	add	r9, 1
	call	_Z5muutaiii
	mov	r13d, DWORD PTR 36[rsp]
	cmp	r13d, r9d
	jge	.L18
	test	r13d, r13d
	jle	.L19
	lea	ebx, 1[r13]
	mov	r12d, DWORD PTR bm[rip]
	mov	r14d, 1
	mov	r15d, 1
	.p2align 4,,10
	.p2align 3
.L24:
	mov	edx, r10d
	mov	esi, r14d
	mov	edi, r15d
	call	_Z4maskiii
	cmp	r13d, r14d
	jle	.L20
	cmp	eax, r12d
	je	.L20
	movsx	rdx, r14d
	lea	rcx, p[rip]
	imul	rdx, rdx, 501
	add	rdx, rbp
	lea	rdx, [rcx+rdx*4]
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L47:
	cmp	eax, r12d
	je	.L20
.L21:
	add	r14d, 1
	or	eax, DWORD PTR 1028052[rdx]
	add	rdx, 2004
	cmp	r13d, r14d
	jg	.L47
.L20:
	cmp	r12d, eax
	jne	.L23
	mov	eax, r13d
	sub	eax, r14d
	add	eax, 1
	cdqe
	add	QWORD PTR 8[rsp], rax
.L23:
	add	r15d, 1
	cmp	ebx, r15d
	jne	.L24
	add	DWORD PTR 20[rsp], 1
	mov	eax, DWORD PTR 20[rsp]
	add	r11, 2004
	cmp	r13d, eax
	jge	.L25
.L19:
	add	QWORD PTR 24[rsp], 2004
	add	rbp, 1
	cmp	r13d, ebp
	jge	.L17
.L26:
	mov	rsi, QWORD PTR 8[rsp]
	lea	rdi, _ZSt4cout[rip]
	call	_ZNSo9_M_insertIxEERSoT_@PLT
	mov	edx, 1
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@PLT
	mov	rax, QWORD PTR 40[rsp]
	sub	rax, QWORD PTR fs:40
	jne	.L48
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	xor	eax, eax
	mov	QWORD PTR 8[rsp], rax
	jmp	.L26
.L48:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE9883:
	.size	main, .-main
	.globl	p
	.bss
	.align 32
	.type	p, @object
	.size	p, 2052096
p:
	.zero	2052096
	.globl	c
	.align 32
	.type	c, @object
	.size	c, 1004004
c:
	.zero	1004004
	.globl	bm
	.align 4
	.type	bm, @object
	.size	bm, 4
bm:
	.zero	4
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.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: