#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*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ codeln(char *);
int /*<<< orphan*/ commentln(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
void t_unity(char *xs, char *ys) {
  char buf[512];
  assert(xs != NULL);
  assert(ys != NULL);
  commentln("Unity function");
  sprintf(buf, "%s = %s;", ys, xs);
  codeln(buf);
}


x86 assembly (clang, -O0):
<t_unity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
lea    0xe82(%rip),%rdi
call   1050 <commentln@plt>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xe76(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x210(%rbp),%rdi
call   1040 <codeln@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_unity>:
push   %r15
push   %r14
push   %rbx
sub    $0x200,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1030 <assert@plt>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
lea    0xe8b(%rip),%rdi
call   1050 <commentln@plt>
lea    0xe8e(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1060 <sprintf@plt>
mov    %r15,%rdi
call   1040 <codeln@plt>
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Unity function\00"
@.str.1 = [9 x i8] c"%s = %s;\00"
define void @t_unity(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [512 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i8*, i8** %4
%11 = icmp ne i8* %10, null
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = call i32 @commentln(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%15 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%16 = load i8*, i8** %4
%17 = load i8*, i8** %3
%18 = call i32 @sprintf(i8* %15, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %16, i8* %17)
%19 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%20 = call i32 @codeln(i8* %19)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Unity function\00"
@.str.1 = [9 x i8] c"%s = %s;\00"
define void @t_unity(i8* %0, i8* %1) {
%3 = alloca [512 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = icmp ne i8* %0, null
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = icmp ne i8* %1, null
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = tail call i32 @commentln(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %0)
%13 = call i32 @codeln(i8* %4)
ret void
}