#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*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char name[100];
  char *description;
  strcpy(name, "Zara Ali");
  description = (char *)malloc(200 * sizeof(char));
  if (description == NULL) {
    fprintf(stderr, "Error - unable to allocate required memory\n");
  } else {
    strcpy(description, "Zara ali a DPS student in class 10th");
  }
  printf("Name = %s\n", name);
  printf("Description: %s\n", description);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1030 <strcpy@plt>
mov    $0xc8,%edi
call   1060 <malloc@plt>
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x78(%rbp)
jne    1195 <main+0x55>
mov    0x2e5e(%rip),%rax
mov    (%rax),%edi
lea    0xe7e(%rip),%rsi
call   1050 <fprintf@plt>
jmp    11a5 <main+0x65>
mov    -0x78(%rbp),%rdi
lea    0xe95(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x70(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
mov    -0x78(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x70,%rsp
lea    0xeb4(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
mov    $0xc8,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1177 <main+0x37>
lea    0xec8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
jmp    118c <main+0x4c>
mov    0x2e62(%rip),%rax
mov    (%rax),%edi
lea    0xe82(%rip),%rsi
call   1050 <fprintf@plt>
lea    0xec7(%rip),%rdi
mov    %rsp,%rsi
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Zara Ali\00"
@stderr = global i32 0
@.str.1 = [44 x i8] c"Error - unable to allocate required memory\0A\00"
@.str.2 = [37 x i8] c"Zara ali a DPS student in class 10th\00"
@.str.3 = [11 x i8] c"Name = %s\0A\00"
@.str.4 = [17 x i8] c"Description: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = call i64 @malloc(i32 200)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
br label %16
13: ; preds = %0
%14 = load i8*, i8** %3
%15 = call i32 @strcpy(i8* %14, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %13, %10
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%18 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* %17)
%19 = load i8*, i8** %3
%20 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* %19)
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
@.str = [9 x i8] c"Zara Ali\00"
@stderr = global i32 0
@.str.1 = [44 x i8] c"Error - unable to allocate required memory\0A\00"
@.str.2 = [37 x i8] c"Zara ali a DPS student in class 10th\00"
@.str.3 = [11 x i8] c"Name = %s\0A\00"
@.str.4 = [17 x i8] c"Description: %s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = call i64 @malloc(i32 200)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %10, %7
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%14 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8* %5)
ret i32 0
}