int foo1(int in)
{
if(in)
return 1;
else
return 0;
}
int foo2(int in)
{
return in == 1;
}
after compiling:
080483b4 <foo1>:
80483b4: 55 push %ebp
80483b5: 89 e5 mov %esp,%ebp
80483b7: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
80483bb: 0f 95 c0 setne %al
80483be: 0f b6 c0 movzbl %al,%eax
80483c1: 5d pop %ebp
80483c2: c3 ret
080483c3 <foo2>:
80483c3: 55 push %ebp
80483c4: 89 e5 mov %esp,%ebp
80483c6: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
80483ca: 0f 94 c0 sete %al
80483cd: 0f b6 c0 movzbl %al,%eax
80483d0: 5d pop %ebp
80483d1: c3 ret
{
if(in)
return 1;
else
return 0;
}
int foo2(int in)
{
return in == 1;
}
after compiling:
080483b4 <foo1>:
80483b4: 55 push %ebp
80483b5: 89 e5 mov %esp,%ebp
80483b7: 83 7d 08 00 cmpl $0x0,0x8(%ebp)
80483bb: 0f 95 c0 setne %al
80483be: 0f b6 c0 movzbl %al,%eax
80483c1: 5d pop %ebp
80483c2: c3 ret
080483c3 <foo2>:
80483c3: 55 push %ebp
80483c4: 89 e5 mov %esp,%ebp
80483c6: 83 7d 08 01 cmpl $0x1,0x8(%ebp)
80483ca: 0f 94 c0 sete %al
80483cd: 0f b6 c0 movzbl %al,%eax
80483d0: 5d pop %ebp
80483d1: c3 ret