#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ strcmp(char *, char *);
char *authentif(char *log, char *pass) {
  if (strcmp(log, "ftp") == 0 & strcmp(pass, "ensias") == 0)
    return ("ok");
  return ("okb");
}


x86 assembly (clang, -O0):
<authentif>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xeba(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rcx
mov    -0x1c(%rbp),%eax
cmp    $0x0,%rcx
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     117d <authentif+0x6d>
lea    0xe97(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1188 <authentif+0x78>
lea    0xe8a(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<authentif>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0xee2(%rip),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rbx
lea    0xed7(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
or     %rbx,%rax
lea    0xecc(%rip),%rcx
lea    0xec8(%rip),%rax
cmove  %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"ftp\00"
@.str.1 = [7 x i8] c"ensias\00"
@.str.2 = [3 x i8] c"ok\00"
@.str.3 = [4 x i8] c"okb\00"
define i8* @authentif(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
%10 = load i8*, i8** %5
%11 = call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
%14 = and i32 %9, %13
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %2
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %18
17: ; preds = %2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %18
18: ; preds = %17, %16
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
@.str = [4 x i8] c"ftp\00"
@.str.1 = [7 x i8] c"ensias\00"
@.str.2 = [3 x i8] c"ok\00"
@.str.3 = [4 x i8] c"okb\00"
define i8* @authentif(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%5 = or i64 %4, %3
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0)
ret i8* %7
}