	.file	"6389094.c"
	.intel_syntax noprefix
	.text
	.globl	fortfile
	.section	.rodata
.LC0:
	.string	"/usr/games/lib/fortunes"
	.section	.data.rel.local,"aw"
	.align 8
	.type	fortfile, @object
	.size	fortfile, 8
fortfile:
	.quad	.LC0
	.section	.rodata
.LC1:
	.string	"r"
.LC2:
	.string	"%s: cannot open \"%s\"\n"
	.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
	push	r13
	push	r12
	push	rbx
	sub	rsp, 72
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -84[rbp], 1
	jle	.L2
	mov	rax, QWORD PTR -96[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR fortfile[rip], rax
.L2:
	mov	rax, QWORD PTR fortfile[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	r12, rax
	test	r12, r12
	jne	.L3
	mov	rcx, QWORD PTR fortfile[rip]
	mov	rax, QWORD PTR -96[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	edx, 2
	mov	esi, 0
	mov	rdi, r12
	call	fseek@PLT
	mov	rdi, r12
	call	ftell@PLT
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, rax
	movsd	xmm1, QWORD PTR .LC3[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -72[rbp], xmm0
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	ftime@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	edx, eax
	movzx	eax, WORD PTR -56[rbp]
	movzx	eax, ax
	xor	eax, edx
	mov	edi, eax
	mov	eax, 0
	call	srand@PLT
	mov	ebx, 0
	jmp	.L4
.L5:
	mov	eax, 0
	call	rand@PLT
	add	ebx, 1
.L4:
	cmp	ebx, 99
	jle	.L5
	mov	eax, 0
	call	rand@PLT
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR -72[rbp]
	cvttsd2si	rax, xmm0
	mov	edx, 0
	mov	rsi, rax
	mov	rdi, r12
	call	fseek@PLT
	mov	r13d, 0
	jmp	.L6
.L9:
	cmp	r13d, 10
	jne	.L7
	cmp	ebx, 10
	je	.L18
.L7:
	mov	r13d, ebx
.L6:
	mov	rdi, r12
	call	fgetc@PLT
	mov	ebx, eax
	cmp	ebx, -1
	jne	.L9
	jmp	.L8
.L18:
	nop
.L8:
	cmp	ebx, -1
	je	.L10
	mov	rdi, r12
	call	fgetc@PLT
	mov	ebx, eax
	cmp	ebx, -1
	jne	.L11
.L10:
	mov	edx, 0
	mov	esi, 0
	mov	rdi, r12
	call	fseek@PLT
	jmp	.L12
.L11:
	mov	rsi, r12
	mov	edi, ebx
	call	ungetc@PLT
.L12:
	mov	r13d, 0
	jmp	.L13
.L16:
	cmp	r13d, 10
	jne	.L14
	cmp	ebx, 10
	je	.L15
.L14:
	mov	edi, ebx
	call	putchar@PLT
	mov	r13d, ebx
.L13:
	mov	rdi, r12
	call	fgetc@PLT
	mov	ebx, eax
	cmp	ebx, -1
	jne	.L16
.L15:
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.long	0
	.long	1088421824
	.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	"6389094.c"
	.text
	.global	fortfile
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/usr/games/lib/fortunes\000"
	.data
	.align	2
	.type	fortfile, %object
	.size	fortfile, 4
fortfile:
	.word	.LC0
	.section	.rodata
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"%s: cannot open \"%s\"\012\000"
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.global	__aeabi_dmul
	.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 = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #36
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	ble	.L2
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #4]
	ldr	r2, .L19+4
	str	r3, [r2]
.L2:
	ldr	r3, .L19+4
	ldr	r3, [r3]
	ldr	r1, .L19+8
	mov	r0, r3
	bl	fopen
	mov	r5, r0
	cmp	r5, #0
	bne	.L3
	ldr	r3, .L19+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-52]
	ldr	r2, [r3]
	ldr	r3, .L19+4
	ldr	r3, [r3]
	ldr	r1, .L19+16
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	mov	r2, #2
	mov	r1, #0
	mov	r0, r5
	bl	fseek
	mov	r0, r5
	bl	ftell
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L19+20
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	sub	r3, fp, #36
	mov	r0, r3
	bl	ftime
	ldr	r3, [fp, #-36]
	ldrh	r2, [fp, #-32]
	eor	r3, r3, r2
	mov	r0, r3
	bl	srand
	mov	r4, #0
	b	.L4
.L5:
	bl	rand
	add	r4, r4, #1
.L4:
	cmp	r4, #99
	ble	.L5
	bl	rand
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_i2d
	sub	r3, fp, #44
	ldmia	r3, {r2-r3}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	mov	r2, #0
	mov	r1, r3
	mov	r0, r5
	bl	fseek
	mov	r6, #0
	b	.L6
.L9:
	cmp	r6, #10
	bne	.L7
	cmp	r4, #10
	beq	.L18
.L7:
	mov	r6, r4
.L6:
	mov	r0, r5
	bl	fgetc
	mov	r4, r0
	cmn	r4, #1
	bne	.L9
	b	.L8
.L18:
	nop
.L8:
	cmn	r4, #1
	beq	.L10
	mov	r0, r5
	bl	fgetc
	mov	r4, r0
	cmn	r4, #1
	bne	.L11
.L10:
	mov	r2, #0
	mov	r1, #0
	mov	r0, r5
	bl	fseek
	b	.L12
.L11:
	mov	r1, r5
	mov	r0, r4
	bl	ungetc
.L12:
	mov	r6, #0
	b	.L13
.L16:
	cmp	r6, #10
	bne	.L14
	cmp	r4, #10
	beq	.L15
.L14:
	mov	r0, r4
	bl	putchar
	mov	r6, r4
.L13:
	mov	r0, r5
	bl	fgetc
	mov	r4, r0
	cmn	r4, #1
	bne	.L16
.L15:
	mov	r0, #0
	bl	exit
.L20:
	.align	2
.L19:
	.word	.LC3
	.word	fortfile
	.word	.LC1
	.word	stderr
	.word	.LC2
	.word	1088421824
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
