.file "titlecase.c" .text .globl titlecase .type titlecase, @function titlecase: pushl %ebp movl %esp, %ebp subl $16, %esp movl $0, -4(%ebp) jmp .L2 # while .L7: movzbl -5(%ebp), %eax # c|0x20 orl $32, %eax movb %al, -6(%ebp) # d cmpb $96, -6(%ebp) jle .L3 cmpb $122, -6(%ebp) jg .L3 movl $1, %eax jmp .L4 .L3: movl $0, %eax .L4: movl %eax, -12(%ebp) # isletter cmpl $0, -4(%ebp) jne .L5 cmpl $0, -12(%ebp) je .L5 movl $1, -4(%ebp) # state 0 && isletter movzbl -5(%ebp), %eax # c movl %eax, %edx andl $-33, %edx movl 8(%ebp), %eax # *str = movb %dl, (%eax) # uppercase .L5: cmpl $1, -4(%ebp) jne .L6 # state 1? cmpb $32, -5(%ebp) jne .L6 # c =blank? movl $0, -4(%ebp) # state = 0 .L6: addl $1, 8(%ebp) # str++ .L2: # while movl 8(%ebp), %eax # *str movzbl (%eax), %eax movb %al, -5(%ebp) # c = cmpb $0, -5(%ebp) jne .L7 leave ret .size titlecase, .-titlecase .ident "GCC: (Gentoo 4.5.2 p1.0, pie-0.4.5) 4.5.2" .section .note.GNU-stack,"",@progbits