	.file	"198580419.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%u%c"
.LC1:
	.string	"wb"
.LC2:
	.string	"out.bin"
	.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -32[rbp], 0
	mov	BYTE PTR -33[rbp], 0
	cmp	DWORD PTR -52[rbp], 1
	jg	.L2
	mov	DWORD PTR -32[rbp], 524288
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rcx, -33[rbp]
	lea	rdx, -32[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
.L3:
	movzx	eax, BYTE PTR -33[rbp]
	movsx	eax, al
	cmp	eax, 109
	je	.L4
	cmp	eax, 109
	jg	.L5
	cmp	eax, 107
	je	.L6
	cmp	eax, 107
	jg	.L5
	cmp	eax, 75
	je	.L6
	cmp	eax, 77
	je	.L4
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -32[rbp]
	sal	eax, 10
	mov	DWORD PTR -32[rbp], eax
	jmp	.L5
.L4:
	mov	eax, DWORD PTR -32[rbp]
	sal	eax, 20
	mov	DWORD PTR -32[rbp], eax
	nop
.L5:
	lea	rsi, .LC1[rip]
	lea	rdi, .LC2[rip]
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, 4
	jg	.L7
	mov	DWORD PTR -28[rbp], 0
	lea	rax, -28[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	__builtin_ia32_rdrand32_step@PLT
	mov	eax, DWORD PTR -32[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -16[rbp]
	lea	rax, -28[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	jmp	.L8
.L7:
	mov	eax, DWORD PTR -32[rbp]
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	movsd	xmm1, QWORD PTR .LC3[rip]
	divsd	xmm0, xmm1
	movq	rax, xmm0
	movq	xmm0, rax
	call	floor@PLT
	cvttsd2si	ecx, xmm0
	mov	eax, DWORD PTR -32[rbp]
	cdq
	shr	edx, 30
	add	eax, edx
	and	eax, 3
	sub	eax, edx
	add	eax, ecx
	mov	DWORD PTR -20[rbp], eax
	mov	DWORD PTR -24[rbp], 0
	jmp	.L9
.L10:
	mov	DWORD PTR -28[rbp], 0
	lea	rax, -28[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	__builtin_ia32_rdrand32_step@PLT
	mov	rdx, QWORD PTR -16[rbp]
	lea	rax, -28[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 4
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -24[rbp], 1
.L9:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L10
.L8:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1074790400
	.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	"198580419.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%u%c\000"
	.align	2
.LC1:
	.ascii	"wb\000"
	.align	2
.LC2:
	.ascii	"out.bin\000"
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.global	__aeabi_d2iz
	.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 = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	strb	r3, [fp, #-29]
	ldr	r3, [fp, #-40]
	cmp	r3, #1
	bgt	.L2
	mov	r3, #524288
	str	r3, [fp, #-28]
	b	.L3
.L2:
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r0, [r3]
	sub	r3, fp, #29
	sub	r2, fp, #28
	ldr	r1, .L13+4
	bl	__isoc99_sscanf
.L3:
	ldrb	r3, [fp, #-29]	@ zero_extendqisi2
	cmp	r3, #109
	beq	.L4
	cmp	r3, #109
	bgt	.L5
	cmp	r3, #107
	beq	.L6
	cmp	r3, #107
	bgt	.L5
	cmp	r3, #75
	beq	.L6
	cmp	r3, #77
	beq	.L4
	b	.L5
.L6:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #10
	str	r3, [fp, #-28]
	b	.L5
.L4:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #20
	str	r3, [fp, #-28]
	nop
.L5:
	ldr	r1, .L13+8
	ldr	r0, .L13+12
	bl	fopen
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r3, #4
	bgt	.L7
	mov	r3, #0
	str	r3, [fp, #-24]
	sub	r3, fp, #24
	mov	r0, r3
	bl	__builtin_ia32_rdrand32_step
	ldr	r3, [fp, #-28]
	mov	r2, r3
	sub	r0, fp, #24
	ldr	r3, [fp, #-16]
	mov	r1, #1
	bl	fwrite
	b	.L8
.L7:
	ldr	r3, [fp, #-28]
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L13+16
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	floor
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r1, r0
	ldr	r3, [fp, #-28]
	rsbs	r2, r3, #0
	and	r3, r3, #3
	and	r2, r2, #3
	rsbpl	r3, r2, #0
	add	r3, r1, r3
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L9
.L10:
	mov	r3, #0
	str	r3, [fp, #-24]
	sub	r3, fp, #24
	mov	r0, r3
	bl	__builtin_ia32_rdrand32_step
	sub	r0, fp, #24
	ldr	r3, [fp, #-16]
	mov	r2, #1
	mov	r1, #4
	bl	fwrite
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L9:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L10
.L8:
	ldr	r0, [fp, #-16]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	1074790400
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
