#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 */
int /*<<< orphan*/ checker(char **, char **);
int my_exec(char **, char *, char **);
int /*<<< orphan*/ my_putstr(char *);
int my_comma_point(char **s1, char **s2, char **env, int point) {
  if (point != 1) {
    if (!(checker(s1, env)) == 1) {
      if ((my_exec(env, s1[0], s1)) == 1) {
        my_putstr("42sh : Command not found\n");
      }
    }
  }
  if (!(checker(s2, env)) == 1) {
    if ((my_exec(env, s2[0], s2)) == 1) {
      my_putstr("42sh : Command not found\n");
      return (-1);
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<my_comma_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
je     11a7 <my_comma_point+0x77>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <checker@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
jne    11a2 <my_comma_point+0x72>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <my_exec@plt>
cmp    $0x1,%eax
jne    119d <my_comma_point+0x6d>
lea    0xe68(%rip),%rdi
call   1040 <my_putstr@plt>
jmp    11a2 <my_comma_point+0x72>
jmp    11a7 <my_comma_point+0x77>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <checker@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
jne    1204 <my_comma_point+0xd4>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <my_exec@plt>
cmp    $0x1,%eax
jne    11ff <my_comma_point+0xcf>
lea    0xe12(%rip),%rdi
call   1040 <my_putstr@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    120b <my_comma_point+0xdb>
jmp    1204 <my_comma_point+0xd4>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_comma_point>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
cmp    $0x1,%ecx
je     116e <my_comma_point+0x3e>
mov    %rdi,%rbp
mov    %rbx,%rsi
call   1050 <checker@plt>
test   %eax,%eax
jne    116e <my_comma_point+0x3e>
mov    0x0(%rbp),%rsi
mov    %rbx,%rdi
mov    %rbp,%rdx
call   1030 <my_exec@plt>
cmp    $0x1,%eax
jne    116e <my_comma_point+0x3e>
lea    0xe97(%rip),%rdi
call   1040 <my_putstr@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <checker@plt>
xor    %ebp,%ebp
test   %eax,%eax
jne    11a3 <my_comma_point+0x73>
mov    (%r14),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <my_exec@plt>
cmp    $0x1,%eax
jne    11a3 <my_comma_point+0x73>
lea    0xe67(%rip),%rdi
call   1040 <my_putstr@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"42sh : Command not found\0A\00"
define i32 @my_comma_point(i8** %0, i8** %1, i8** %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i8**
%9 = alloca i32
store i8** %0, i8*** %6
store i8** %1, i8*** %7
store i8** %2, i8*** %8
store i32 %3, i32* %9
%10 = load i32, i32* %9
%11 = icmp ne i32 %10, 1
br i1 %11, label %12, label %32
12: ; preds = %4
%13 = load i8**, i8*** %6
%14 = load i8**, i8*** %8
%15 = call i32 @checker(i8** %13, i8** %14)
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
%19 = icmp eq i32 %18, 1
br i1 %19, label %20, label %31
20: ; preds = %12
%21 = load i8**, i8*** %8
%22 = load i8**, i8*** %6
%23 = getelementptr inbounds i8*, i8** %22, i64 0
%24 = load i8*, i8** %23
%25 = load i8**, i8*** %6
%26 = call i32 @my_exec(i8** %21, i8* %24, i8** %25)
%27 = icmp eq i32 %26, 1
br i1 %27, label %28, label %30
28: ; preds = %20
%29 = call i32 @my_putstr(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %30
30: ; preds = %28, %20
br label %31
31: ; preds = %30, %12
br label %32
32: ; preds = %31, %4
%33 = load i8**, i8*** %7
%34 = load i8**, i8*** %8
%35 = call i32 @checker(i8** %33, i8** %34)
%36 = icmp ne i32 %35, 0
%37 = xor i1 %36, true
%38 = zext i1 %37 to i32
%39 = icmp eq i32 %38, 1
br i1 %39, label %40, label %51
40: ; preds = %32
%41 = load i8**, i8*** %8
%42 = load i8**, i8*** %7
%43 = getelementptr inbounds i8*, i8** %42, i64 0
%44 = load i8*, i8** %43
%45 = load i8**, i8*** %7
%46 = call i32 @my_exec(i8** %41, i8* %44, i8** %45)
%47 = icmp eq i32 %46, 1
br i1 %47, label %48, label %50
48: ; preds = %40
%49 = call i32 @my_putstr(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %5
br label %52
50: ; preds = %40
br label %51
51: ; preds = %50, %32
store i32 0, i32* %5
br label %52
52: ; preds = %51, %48
%53 = load i32, i32* %5
ret i32 %53
}

LLVM IR (-O2):
@.str = [26 x i8] c"42sh : Command not found\0A\00"
define i32 @my_comma_point(i8** %0, i8** %1, i8** %2, i32 %3) {
%5 = icmp eq i32 %3, 1
br i1 %5, label %15, label %6
6: ; preds = %4
%7 = tail call i32 @checker(i8** %0, i8** %2)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load i8*, i8** %0
%11 = tail call i32 @my_exec(i8** %2, i8* %10, i8** %0)
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = tail call i32 @my_putstr(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %6, %13, %9, %4
%16 = tail call i32 @checker(i8** %1, i8** %2)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = load i8*, i8** %1
%20 = tail call i32 @my_exec(i8** %2, i8* %19, i8** %1)
%21 = icmp eq i32 %20, 1
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = tail call i32 @my_putstr(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %24
24: ; preds = %15, %18, %22
%25 = phi i32 [ -1, %22 ], [ 0, %18 ], [ 0, %15 ]
ret i32 %25
}