	.file	"ASP2x.c"
	.section	.rodata
	.p2align 5
.LC0:
	.string	"\n@Tomas Polak, PSS14, 4.5.2006\n"
	.p2align 5
.LC1:
	.string	"Chyba pri zistovani mena stroja"
.LC2:
	.string	"\nMeno stroja:%s"
.LC3:
	.string	"Chyba pri zistovani PID"
.LC4:
	.string	"\nPID %ld"
.LC5:
	.string	"Chyba pri zistovani UID"
.LC6:
	.string	"\nUID %ld"
.LC7:
	.string	"Chyba pri zistovani loginu"
.LC8:
	.string	"\nLogin:"
	.p2align 5
.LC9:
	.string	"\n\nZadajte retazec (max 100 znakov):"
.LC10:
	.string	"Toto by sa nemalo vypisat"
.LC11:
	.string	"\nPocet znakov retazca je:%d\n"
	.text
	.p2align 2,,3
.globl main
	.type	main, @function
main:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$296, %esp
	andl	$-16, %esp
	movl	$0, %eax
	subl	%eax, %esp
	subl	$12, %esp
	pushl	$.LC0
	call	printf
	addl	$16, %esp
	subl	$4, %esp
	pushl	$25
	leal	-56(%ebp), %eax
	pushl	%eax
	pushl	$87
	call	syscall
	addl	$16, %esp
	cmpl	$-1, %eax
	jne	.L10
	subl	$12, %esp
	pushl	$.LC1
	call	perror
	addl	$16, %esp
.L10:
	subl	$8, %esp
	leal	-56(%ebp), %eax
	pushl	%eax
	pushl	$.LC2
	call	printf
	addl	$16, %esp
	subl	$12, %esp
	pushl	$20
	call	syscall
	addl	$16, %esp
	movl	%eax, -12(%ebp)
	movl	-12(%ebp), %eax
	cmpl	$-1, %eax
	jne	.L11
	subl	$12, %esp
	pushl	$.LC3
	call	perror
	addl	$16, %esp
.L11:
	subl	$8, %esp
	pushl	-12(%ebp)
	pushl	$.LC4
	call	printf
	addl	$16, %esp
	subl	$8, %esp
	leal	-16(%ebp), %eax
	pushl	%eax
	pushl	$24
	call	syscall
	addl	$16, %esp
	movl	%eax, -16(%ebp)
	movl	-16(%ebp), %eax
	cmpl	$-1, %eax
	jne	.L12
	subl	$12, %esp
	pushl	$.LC5
	call	perror
	addl	$16, %esp
.L12:
	subl	$8, %esp
	pushl	-16(%ebp)
	pushl	$.LC6
	call	printf
	addl	$16, %esp
	subl	$4, %esp
	pushl	$100
	leal	-168(%ebp), %eax
	pushl	%eax
	pushl	$49
	call	syscall
	addl	$16, %esp
	cmpl	$-1, %eax
	jne	.L13
	subl	$12, %esp
	pushl	$.LC7
	call	perror
	addl	$16, %esp
.L13:
	subl	$12, %esp
	pushl	$.LC8
	call	printf
	addl	$16, %esp
	subl	$12, %esp
	leal	-168(%ebp), %eax
	pushl	%eax
	call	puts
	addl	$16, %esp
	subl	$12, %esp
	pushl	$.LC9
	call	printf
	addl	$16, %esp
	subl	$4, %esp
	pushl	__stdinp
	pushl	$102
	leal	-280(%ebp), %eax
	pushl	%eax
	call	fgets
	addl	$16, %esp
	subl	$12, %esp
	leal	-280(%ebp), %eax
	pushl	%eax
	call	puts
	addl	$16, %esp
	subl	$12, %esp
	leal	-280(%ebp), %eax
	pushl	%eax
	call	Funkcia
	addl	$16, %esp
	movl	%eax, -284(%ebp)
	call	Jump
	subl	$12, %esp
	pushl	$.LC10
	call	printf
	addl	$16, %esp
	subl	$8, %esp
	pushl	-284(%ebp)
	pushl	$.LC11
	call	printf
	addl	$16, %esp
	movl	$1, %eax
	leave
	ret
	.size	main, .-main
	.section	.rodata
	.p2align 5
.LC12:
	.string	"\n\nZadajte znak, ktory mam hladat:"
	.p2align 5
.LC13:
	.string	"V retazci \"%s\" bolo najdenych %d vyskytov znaku %c\n"
	.text
	.p2align 2,,3
.globl Funkcia
	.type	Funkcia, @function
Funkcia:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$8, %esp
	movl	$0, -8(%ebp)
.L15:
	movl	-8(%ebp), %eax
	addl	8(%ebp), %eax
	cmpb	$0, (%eax)
	jne	.L17
	jmp	.L16
.L17:
	leal	-8(%ebp), %eax
	incl	(%eax)
	jmp	.L15
.L16:
	movl	-8(%ebp), %eax
	decl	%eax
	movl	%eax, -4(%ebp)
	movl	-8(%ebp), %eax
	addl	8(%ebp), %eax
	decl	%eax
	movb	$0, (%eax)
	subl	$12, %esp
	pushl	$.LC12
	call	printf
	addl	$16, %esp
	call	getchar
	movl	%eax, -12(%ebp)
	movl	$0, -8(%ebp)
	movl	$0, -16(%ebp)
.L18:
	movl	-8(%ebp), %eax
	addl	8(%ebp), %eax
	cmpb	$0, (%eax)
	jne	.L20
	jmp	.L19
.L20:
	movl	-8(%ebp), %eax
	addl	8(%ebp), %eax
	movsbl	(%eax),%eax
	cmpl	-12(%ebp), %eax
	jne	.L21
	leal	-16(%ebp), %eax
	incl	(%eax)
.L21:
	leal	-8(%ebp), %eax
	incl	(%eax)
	jmp	.L18
.L19:
	pushl	-12(%ebp)
	pushl	-16(%ebp)
	pushl	8(%ebp)
	pushl	$.LC13
	call	printf
	addl	$16, %esp
	movl	-4(%ebp), %eax
	leave
	ret
	.size	Funkcia, .-Funkcia
	.p2align 2,,3
.globl Jump
	.type	Jump, @function
Jump:
	pushl	%ebp
	movl	%esp, %ebp
	subl	$4, %esp
	leal	4(%ebp), %eax
	addl	$16, (%eax)
	leave
	ret
	.size	Jump, .-Jump
	.ident	"GCC: (GNU) 3.3.3 [FreeBSD] 20031106"
