#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*/ HAdder(char *, char *, char *, char *);
void FAdder(char *Pa, char *Pb, char *Pc, char *Psum, char *Pcary) {
  char Ts = 0;
  char Tc1 = 0;
  char Tc2 = 0;
  HAdder(Pa, Pb, &Ts, &Tc1);
  HAdder(Pc, &Ts, Psum, &Tc2);
  *Pcary = Tc1 || Tc2;
}


x86 assembly (clang, -O0):
<FAdder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movb   $0x0,-0x29(%rbp)
movb   $0x0,-0x2a(%rbp)
movb   $0x0,-0x2b(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x29(%rbp),%rdx
lea    -0x2a(%rbp),%rcx
call   1030 <HAdder@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    -0x29(%rbp),%rsi
lea    -0x2b(%rbp),%rcx
call   1030 <HAdder@plt>
movsbl -0x2a(%rbp),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x2c(%rbp)
jne    1181 <FAdder+0x71>
movsbl -0x2b(%rbp),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x2c(%rbp)
mov    -0x2c(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %cl,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FAdder>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%rbx
movb   $0x0,0x7(%rsp)
movb   $0x0,0x6(%rsp)
movb   $0x0,0x5(%rsp)
lea    0x7(%rsp),%r12
lea    0x6(%rsp),%rcx
mov    %r12,%rdx
call   1030 <HAdder@plt>
lea    0x5(%rsp),%rcx
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1030 <HAdder@plt>
mov    0x6(%rsp),%al
or     0x5(%rsp),%al
setne  (%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @FAdder(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8
%12 = alloca i8
%13 = alloca i8
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
store i8 0, i8* %11
store i8 0, i8* %12
store i8 0, i8* %13
%14 = load i8*, i8** %6
%15 = load i8*, i8** %7
%16 = call i32 @HAdder(i8* %14, i8* %15, i8* %11, i8* %12)
%17 = load i8*, i8** %8
%18 = load i8*, i8** %9
%19 = call i32 @HAdder(i8* %17, i8* %11, i8* %18, i8* %13)
%20 = load i8, i8* %12
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 0
br i1 %22, label %27, label %23
23: ; preds = %5
%24 = load i8, i8* %13
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 0
br label %27
27: ; preds = %23, %5
%28 = phi i1 [ true, %5 ], [ %26, %23 ]
%29 = zext i1 %28 to i32
%30 = trunc i32 %29 to i8
%31 = load i8*, i8** %10
store i8 %30, i8* %31
ret void
}

LLVM IR (-O2):
define void @FAdder(i8* %0, i8* %1, i8* %2, i8* %3, i8* nocapture writeonly %4) {
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8 0, i8* %6
store i8 0, i8* %7
store i8 0, i8* %8
%9 = call i32 @HAdder(i8* %0, i8* %1, i8* %6, i8* %7)
%10 = call i32 @HAdder(i8* %2, i8* %6, i8* %3, i8* %8)
%11 = load i8, i8* %7
%12 = icmp ne i8 %11, 0
%13 = load i8, i8* %8
%14 = icmp ne i8 %13, 0
%15 = select i1 %12, i1 true, i1 %14
%16 = zext i1 %15 to i8
store i8 %16, i8* %4
ret void
}