	.file	"685365.c"
	.intel_syntax noprefix
	.text
	.globl	rnd_16
	.type	rnd_16, @function
rnd_16:
.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 -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	movzx	eax, ax
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 32767
	ja	.L2
	mov	eax, DWORD PTR -20[rbp]
	shr	eax, 16
	jmp	.L3
.L2:
	mov	eax, DWORD PTR -20[rbp]
	shr	eax, 16
	add	eax, 1
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	rnd_16, .-rnd_16
	.section	.rodata
.LC0:
	.string	"wb"
.LC1:
	.string	"bitmap.ppm"
.LC2:
	.string	"P6\n%d %d\n255\n"
	.align 8
.LC3:
	.string	"Power level %02d, step size 0x%08x: "
.LC4:
	.string	"  sum %03d"
.LC5:
	.string	" -- error!! (%02d) --"
	.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, 64
	mov	edx, 64
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	WORD PTR -14[rbp], -1
	mov	BYTE PTR -12[rbp], -1
	mov	WORD PTR -11[rbp], 0
	mov	BYTE PTR -9[rbp], 0
	mov	DWORD PTR -44[rbp], 1
	jmp	.L5
.L11:
	mov	eax, 4194304
	cdq
	idiv	DWORD PTR -44[rbp]
	mov	DWORD PTR -28[rbp], eax
	mov	DWORD PTR -40[rbp], 0
	mov	edx, DWORD PTR -28[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -32[rbp], 0
	jmp	.L6
.L9:
	mov	eax, DWORD PTR -40[rbp]
	mov	edi, eax
	call	rnd_16
	mov	edx, DWORD PTR -32[rbp]
	cmp	eax, edx
	jne	.L7
	mov	rdx, QWORD PTR -24[rbp]
	lea	rax, -11[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 3
	mov	rdi, rax
	call	fwrite@PLT
	add	DWORD PTR -36[rbp], 1
	mov	eax, DWORD PTR -28[rbp]
	add	DWORD PTR -40[rbp], eax
	jmp	.L8
.L7:
	mov	rdx, QWORD PTR -24[rbp]
	lea	rax, -14[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 3
	mov	rdi, rax
	call	fwrite@PLT
.L8:
	add	DWORD PTR -32[rbp], 1
.L6:
	cmp	DWORD PTR -32[rbp], 63
	jle	.L9
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -36[rbp]
	cmp	eax, DWORD PTR -44[rbp]
	je	.L10
	mov	eax, DWORD PTR -44[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
.L10:
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -44[rbp], 1
.L5:
	cmp	DWORD PTR -44[rbp], 63
	jle	.L11
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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	"685365.c"
	.text
	.align	2
	.global	rnd_16
	.syntax unified
	.arm
	.fpu softvfp
	.type	rnd_16, %function
rnd_16:
	@ 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]
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #32768
	bcs	.L2
	ldr	r3, [fp, #-16]
	lsr	r3, r3, #16
	b	.L3
.L2:
	ldr	r3, [fp, #-16]
	lsr	r3, r3, #16
	add	r3, r3, #1
.L3:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	rnd_16, .-rnd_16
	.section	.rodata
	.align	2
.LC0:
	.ascii	"wb\000"
	.align	2
.LC1:
	.ascii	"bitmap.ppm\000"
	.align	2
.LC2:
	.ascii	"P6\012%d %d\012255\012\000"
	.global	__aeabi_idiv
	.align	2
.LC5:
	.ascii	"Power level %02d, step size 0x%08x: \000"
	.align	2
.LC6:
	.ascii	"  sum %03d\000"
	.align	2
.LC7:
	.ascii	" -- error!! (%02d) --\000"
	.align	2
.LC3:
	.ascii	"\377\377\377"
	.align	2
.LC4:
	.ascii	"\000\000\000"
	.align	2
.LC8:
	.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
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L14+4
	ldr	r0, .L14+8
	bl	fopen
	str	r0, [fp, #-24]
	mov	r3, #64
	mov	r2, #64
	ldr	r1, .L14+12
	ldr	r0, [fp, #-24]
	bl	fprintf
	ldr	r2, .L14+16
	sub	r3, fp, #16
	ldr	r2, [r2]
	strh	r2, [r3]	@ movhi
	add	r3, r3, #2
	lsr	r2, r2, #16
	strb	r2, [r3]
	ldr	r2, .L14+20
	sub	r3, fp, #12
	ldr	r2, [r2]
	strh	r2, [r3]	@ movhi
	add	r3, r3, #2
	lsr	r2, r2, #16
	strb	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-40]
	b	.L5
.L11:
	ldr	r1, [fp, #-40]
	mov	r0, #4194304
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-36]
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-40]
	ldr	r0, .L14+24
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L6
.L9:
	ldr	r0, [fp, #-36]
	bl	rnd_16
	mov	r2, r0
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bne	.L7
	sub	r0, fp, #12
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #3
	bl	fwrite
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	str	r3, [fp, #-36]
	b	.L8
.L7:
	sub	r0, fp, #16
	ldr	r3, [fp, #-24]
	mov	r2, #1
	mov	r1, #3
	bl	fwrite
.L8:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L6:
	ldr	r3, [fp, #-28]
	cmp	r3, #63
	ble	.L9
	ldr	r1, [fp, #-32]
	ldr	r0, .L14+28
	bl	printf
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-40]
	cmp	r2, r3
	beq	.L10
	ldr	r1, [fp, #-40]
	ldr	r0, .L14+32
	bl	printf
.L10:
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L5:
	ldr	r3, [fp, #-40]
	cmp	r3, #63
	ble	.L11
	mov	r3, #0
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
