#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 */
double atan2(int, int);
scalar_t__ calloc(int, int);
double cos(int);
double exp(int);
double fabs(int);
int /*<<< orphan*/ free(int *);
int /*<<< orphan*/ isalnum(int);
int /*<<< orphan*/ isalpha(int);
int /*<<< orphan*/ isdigit(int);
int /*<<< orphan*/ islower(int);
int /*<<< orphan*/ isspace(int);
int /*<<< orphan*/ isupper(int);
double log(int);
double log10(int);
scalar_t__ malloc(int);
double pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int rand();
int /*<<< orphan*/ resetStr(char *, char *);
double sin(int);
double sqrt(int);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ strcat(char *, char *);
char *strchr(char *, char);
int strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncat(char *, char *, int);
int strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *strrchr(char *, char);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ tolower(int);
int /*<<< orphan*/ toupper(int);
int main() {
  char b[] = "hello my ";
  char s1[] = "hello my ";
  char s2[] = "friend";
  strcat(s1, s2);
  printf("%s\n", s1);
  resetStr(s1, b);
  ;
  strncat(s1, s2, 4);
  printf("%s\n", s1);
  resetStr(s1, b);
  ;
  printf("%d\n", strcmp(s1, s2));
  printf("%d\n", strcmp("aa", "ab"));
  printf("%d\n", strncmp("aa", "aabbcc", 2));
  strcpy(s1, s2);
  printf("%s\n", s1);
  resetStr(s1, b);
  ;
  strncpy(s1, s2, 4);
  printf("%s\n", s1);
  resetStr(s1, b);
  ;
  printf("%d\n", strlen("aaa"));
  char *ret = strrchr(s1, 'l');
  ret = strchr(s1, 'l');
  if (ret == NULL)
    printf("Not found!\n");
  printf("%c\n", *(ret + 2));
  printf("String after |%c| is - |%s|\n", 'l', ret);
  int c = 'a';
  isalpha(c);
  isupper(c);
  islower(c);
  isdigit(c);
  isalnum(c);
  isspace(c);
  toupper(c);
  tolower(c);
  system("ls");
  int *test = (int *)malloc(sizeof(int));
  *test = 8;
  printf("%d\n", *test);
  int *a = (int *)calloc(10, sizeof(int));
  int i;
  for (i = 0; i < 10; ++i)
    printf("%d ", a[0]);
  printf("\n");
  free(test);
  free(a);
  printf("%f\n", sin(18));
  printf("%f\n", cos(18));
  printf("%f\n", atan2(18, 3));
  printf("%f\n", exp(2));
  printf("%f\n", log(2));
  printf("%f\n", log10(2));
  printf("%f\n", pow(2, 5));
  printf("%f\n", sqrt(81));
  printf("%f\n", fabs(-22));
  srand(time(NULL));
  printf("%d\n", (rand() % (20)));
  int x = (rand() % (80));
  printf("%d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xd3a(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xd37(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    0xd24(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xd21(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xd19(%rip),%eax
mov    %eax,-0x1f(%rbp)
mov    0xd13(%rip),%ax
mov    %ax,-0x1b(%rbp)
mov    0xd0b(%rip),%al
mov    %al,-0x19(%rbp)
lea    -0x18(%rbp),%rdi
lea    -0x1f(%rbp),%rsi
call   11c0 <strcat@plt>
lea    -0x18(%rbp),%rsi
lea    0xcf1(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
lea    -0x18(%rbp),%rdi
lea    -0xe(%rbp),%rsi
call   1040 <resetStr@plt>
lea    -0x18(%rbp),%rdi
lea    -0x1f(%rbp),%rsi
mov    $0x4,%edx
call   10e0 <strncat@plt>
lea    -0x18(%rbp),%rsi
lea    0xcc0(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
lea    -0x18(%rbp),%rdi
lea    -0xe(%rbp),%rsi
call   1040 <resetStr@plt>
lea    -0x18(%rbp),%rdi
lea    -0x1f(%rbp),%rsi
call   1120 <strcmp@plt>
mov    %eax,%esi
lea    0xc9a(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
lea    0xc9b(%rip),%rdi
lea    0xc89(%rip),%rsi
call   1120 <strcmp@plt>
mov    %eax,%esi
lea    0xc77(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
lea    0xc78(%rip),%rdi
lea    0xc69(%rip),%rsi
mov    $0x2,%edx
call   1060 <strncmp@plt>
mov    %eax,%esi
lea    0xc4f(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
lea    -0x18(%rbp),%rdi
lea    -0x1f(%rbp),%rsi
call   1070 <strcpy@plt>
lea    -0x18(%rbp),%rsi
lea    0xc2c(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
lea    -0x18(%rbp),%rdi
lea    -0xe(%rbp),%rsi
call   1040 <resetStr@plt>
lea    -0x18(%rbp),%rdi
lea    -0x1f(%rbp),%rsi
mov    $0x4,%edx
call   1050 <strncpy@plt>
lea    -0x18(%rbp),%rsi
lea    0xbfb(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
lea    -0x18(%rbp),%rdi
lea    -0xe(%rbp),%rsi
call   1040 <resetStr@plt>
lea    0xbf2(%rip),%rdi
call   1090 <strlen@plt>
mov    %eax,%esi
lea    0xbd6(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
lea    -0x18(%rbp),%rdi
mov    $0x6c,%esi
call   10d0 <strrchr@plt>
mov    %rax,-0x28(%rbp)
lea    -0x18(%rbp),%rdi
mov    $0x6c,%esi
call   10b0 <strchr@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1483 <main+0x1d3>
lea    0xbab(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x28(%rbp),%rax
movsbl 0x2(%rax),%esi
lea    0xba1(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x28(%rbp),%rdx
lea    0xb93(%rip),%rdi
mov    $0x6c,%esi
mov    $0x0,%al
call   10c0 <printf@plt>
movl   $0x61,-0x2c(%rbp)
lea    0xb96(%rip),%rdi
call   10a0 <system@plt>
mov    $0x4,%edi
call   1150 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movl   $0x8,(%rax)
mov    -0x38(%rbp),%rax
mov    (%rax),%esi
lea    0xb2d(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
mov    $0xa,%edi
mov    $0x4,%esi
call   1100 <calloc@plt>
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0xa,-0x44(%rbp)
jge    1535 <main+0x285>
mov    -0x40(%rbp),%rax
mov    (%rax),%esi
lea    0xb37(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1509 <main+0x259>
lea    0xaf5(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    $0x12,%edi
call   1130 <sin@plt>
lea    0xaf5(%rip),%rdi
mov    $0x1,%al
call   10c0 <printf@plt>
mov    $0x12,%edi
call   1170 <cos@plt>
lea    0xadd(%rip),%rdi
mov    $0x1,%al
call   10c0 <printf@plt>
mov    $0x12,%edi
mov    $0x3,%esi
call   1080 <atan2@plt>
lea    0xac0(%rip),%rdi
mov    $0x1,%al
call   10c0 <printf@plt>
mov    $0x2,%edi
call   1160 <exp@plt>
lea    0xaa8(%rip),%rdi
mov    $0x1,%al
call   10c0 <printf@plt>
mov    $0x2,%edi
call   1180 <log@plt>
lea    0xa90(%rip),%rdi
mov    $0x1,%al
call   10c0 <printf@plt>
mov    $0x2,%edi
call   11a0 <log10@plt>
lea    0xa78(%rip),%rdi
mov    $0x1,%al
call   10c0 <printf@plt>
mov    $0x2,%edi
mov    $0x5,%esi
call   1190 <pow@plt>
lea    0xa5b(%rip),%rdi
mov    $0x1,%al
call   10c0 <printf@plt>
mov    $0x51,%edi
call   11b0 <sqrt@plt>
lea    0xa43(%rip),%rdi
mov    $0x1,%al
call   10c0 <printf@plt>
mov    $0xffffffea,%edi
call   1110 <fabs@plt>
lea    0xa2b(%rip),%rdi
mov    $0x1,%al
call   10c0 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1140 <time@plt>
mov    %eax,%edi
call   10f0 <srand@plt>
mov    $0x0,%al
call   11d0 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0x9b6(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
mov    $0x0,%al
call   11d0 <rand@plt>
mov    $0x50,%ecx
cltd
idiv   %ecx
mov    %edx,-0x48(%rbp)
mov    -0x48(%rbp),%esi
lea    0x993(%rip),%rdi
mov    $0x0,%al
call   10c0 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
movabs $0x796d206f6c6c6568,%rax
20 6d 79
mov    %rax,0x18(%rsp)
movw   $0x20,0x20(%rsp)
mov    %rax,0x8(%rsp)
movw   $0x20,0x10(%rsp)
movl   $0x646e65,0x3(%rsp)
movl   $0x65697266,(%rsp)
lea    0x8(%rsp),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   11d0 <strcat@plt>
mov    %rbx,%rdi
call   1090 <puts@plt>
lea    0x18(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <resetStr@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   10f0 <strncat@plt>
mov    %rbx,%rdi
call   1090 <puts@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <resetStr@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1130 <strcmp@plt>
lea    0xcb5(%rip),%r12
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    %r12,%rdi
mov    $0xffffffff,%esi
xor    %eax,%eax
call   10e0 <printf@plt>
lea    0xc9f(%rip),%rdi
lea    0xc90(%rip),%rsi
mov    $0x2,%edx
call   1070 <strncmp@plt>
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1080 <strcpy@plt>
mov    %rbx,%rdi
call   1090 <puts@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <resetStr@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   1060 <strncpy@plt>
mov    %rbx,%rdi
call   1090 <puts@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <resetStr@plt>
lea    0xc39(%rip),%rdi
call   10b0 <strlen@plt>
mov    %r12,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    %rbx,%rdi
mov    $0x6c,%esi
call   10d0 <strchr@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1415 <main+0x155>
lea    0xc3c(%rip),%rdi
call   1090 <puts@plt>
movsbl 0x2(%rbx),%esi
lea    0xc00(%rip),%rdi
xor    %eax,%eax
call   10e0 <printf@plt>
lea    0xbf6(%rip),%rdi
mov    $0x6c,%esi
mov    %rbx,%rdx
xor    %eax,%eax
call   10e0 <printf@plt>
lea    0xbfd(%rip),%rdi
call   10c0 <system@plt>
mov    $0x4,%edi
call   1160 <malloc@plt>
mov    %rax,%r15
movl   $0x8,(%rax)
lea    0xbae(%rip),%r14
mov    %r14,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    $0xa,%edi
mov    $0x4,%esi
call   1110 <calloc@plt>
mov    %rax,%rbx
mov    (%rax),%esi
lea    0xbb7(%rip),%r12
mov    %r12,%rdi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    (%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    (%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    (%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    (%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    (%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    (%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    (%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    (%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    (%rbx),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   10e0 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    $0x12,%edi
call   1140 <sin@plt>
lea    0xb1a(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
call   10e0 <printf@plt>
mov    $0x12,%edi
call   1180 <cos@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   10e0 <printf@plt>
mov    $0x12,%edi
mov    $0x3,%esi
call   10a0 <atan2@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   10e0 <printf@plt>
mov    $0x2,%edi
call   1170 <exp@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   10e0 <printf@plt>
mov    $0x2,%edi
call   1190 <log@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   10e0 <printf@plt>
mov    $0x2,%edi
call   11b0 <log10@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   10e0 <printf@plt>
mov    $0x2,%edi
mov    $0x5,%esi
call   11a0 <pow@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   10e0 <printf@plt>
mov    $0x51,%edi
call   11c0 <sqrt@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   10e0 <printf@plt>
mov    $0xffffffea,%edi
call   1120 <fabs@plt>
mov    %rbx,%rdi
mov    $0x1,%al
call   10e0 <printf@plt>
xor    %edi,%edi
call   1150 <time@plt>
mov    %eax,%edi
call   1100 <srand@plt>
xor    %eax,%eax
call   11e0 <rand@plt>
movslq %eax,%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x23,%rax
add    %ecx,%eax
shl    $0x2,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   10e0 <printf@plt>
xor    %eax,%eax
call   11e0 <rand@plt>
movslq %eax,%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
shl    $0x4,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   10e0 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.b = [10 x i8] c"hello my \00"
@__const.main.s1 = [10 x i8] c"hello my \00"
@__const.main.s2 = [7 x i8] c"friend\00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [3 x i8] c"aa\00"
@.str.3 = [3 x i8] c"ab\00"
@.str.4 = [7 x i8] c"aabbcc\00"
@.str.5 = [4 x i8] c"aaa\00"
@.str.6 = [12 x i8] c"Not found!\0A\00"
@.str.7 = [4 x i8] c"%c\0A\00"
@.str.8 = [29 x i8] c"String after |%c| is - |%s|\0A\00"
@.str.9 = [3 x i8] c"ls\00"
@.str.10 = [4 x i8] c"%d \00"
@.str.11 = [2 x i8] c"\0A\00"
@.str.12 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = alloca [10 x i8]
%4 = alloca [7 x i8]
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
%11 = bitcast [10 x i8]* %2 to i8*
%12 = bitcast [10 x i8]* %3 to i8*
%13 = bitcast [7 x i8]* %4 to i8*
%14 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%15 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%16 = call i32 @strcat(i8* %14, i8* %15)
%17 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%20 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%21 = call i32 @resetStr(i8* %19, i8* %20)
%22 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%23 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%24 = call i32 @strncat(i8* %22, i8* %23, i32 4)
%25 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %25)
%27 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%28 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%29 = call i32 @resetStr(i8* %27, i8* %28)
%30 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%31 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%32 = call i32 @strcmp(i8* %30, i8* %31)
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %32)
%34 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %34)
%36 = call i32 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 2)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %36)
%38 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%39 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%40 = call i32 @strcpy(i8* %38, i8* %39)
%41 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %41)
%43 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%44 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%45 = call i32 @resetStr(i8* %43, i8* %44)
%46 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%47 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%48 = call i32 @strncpy(i8* %46, i8* %47, i32 4)
%49 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %49)
%51 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%52 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%53 = call i32 @resetStr(i8* %51, i8* %52)
%54 = call i32 @strlen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %54)
%56 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%57 = call i8* @strrchr(i8* %56, i8 signext 108)
store i8* %57, i8** %5
%58 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%59 = call i8* @strchr(i8* %58, i8 signext 108)
store i8* %59, i8** %5
%60 = load i8*, i8** %5
%61 = icmp eq i8* %60, null
br i1 %61, label %62, label %64
62: ; preds = %0
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
br label %64
64: ; preds = %62, %0
%65 = load i8*, i8** %5
%66 = getelementptr inbounds i8, i8* %65, i64 2
%67 = load i8, i8* %66
%68 = sext i8 %67 to i32
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %68)
%70 = load i8*, i8** %5
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i32 108, i8* %70)
store i32 97, i32* %6
%72 = load i32, i32* %6
%73 = call i32 @isalpha(i32 %72)
%74 = load i32, i32* %6
%75 = call i32 @isupper(i32 %74)
%76 = load i32, i32* %6
%77 = call i32 @islower(i32 %76)
%78 = load i32, i32* %6
%79 = call i32 @isdigit(i32 %78)
%80 = load i32, i32* %6
%81 = call i32 @isalnum(i32 %80)
%82 = load i32, i32* %6
%83 = call i32 @isspace(i32 %82)
%84 = load i32, i32* %6
%85 = call i32 @toupper(i32 %84)
%86 = load i32, i32* %6
%87 = call i32 @tolower(i32 %86)
%88 = call i32 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%89 = call i64 @malloc(i32 4)
%90 = inttoptr i64 %89 to i32*
store i32* %90, i32** %7
%91 = load i32*, i32** %7
store i32 8, i32* %91
%92 = load i32*, i32** %7
%93 = load i32, i32* %92
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %93)
%95 = call i64 @calloc(i32 10, i32 4)
%96 = inttoptr i64 %95 to i32*
store i32* %96, i32** %8
store i32 0, i32* %9
br label %97
97: ; preds = %105, %64
%98 = load i32, i32* %9
%99 = icmp slt i32 %98, 10
br i1 %99, label %100, label %108
100: ; preds = %97
%101 = load i32*, i32** %8
%102 = getelementptr inbounds i32, i32* %101, i64 0
%103 = load i32, i32* %102
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %103)
br label %105
105: ; preds = %100
%106 = load i32, i32* %9
%107 = add nsw i32 %106, 1
store i32 %107, i32* %9
br label %97
108: ; preds = %97
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%110 = load i32*, i32** %7
%111 = call i32 @free(i32* %110)
%112 = load i32*, i32** %8
%113 = call i32 @free(i32* %112)
%114 = call double @sin(i32 18)
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %114)
%116 = call double @cos(i32 18)
%117 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %116)
%118 = call double @atan2(i32 18, i32 3)
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %118)
%120 = call double @exp(i32 2)
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %120)
%122 = call double @log(i32 2)
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %122)
%124 = call double @log10(i32 2)
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %124)
%126 = call double @pow(i32 2, i32 5)
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %126)
%128 = call double @sqrt(i32 81)
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %128)
%130 = call double @fabs(i32 -22)
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %130)
%132 = call i32 @time(i32* null)
%133 = call i32 @srand(i32 %132)
%134 = call i32 (...) @rand()
%135 = srem i32 %134, 20
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %135)
%137 = call i32 (...) @rand()
%138 = srem i32 %137, 80
store i32 %138, i32* %10
%139 = load i32, i32* %10
%140 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %139)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [10 x i8] c"hello my \00"
@__const.main.s2 = [7 x i8] c"friend\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [3 x i8] c"aa\00"
@.str.4 = [7 x i8] c"aabbcc\00"
@.str.5 = [4 x i8] c"aaa\00"
@.str.7 = [4 x i8] c"%c\0A\00"
@.str.8 = [29 x i8] c"String after |%c| is - |%s|\0A\00"
@.str.9 = [3 x i8] c"ls\00"
@.str.10 = [4 x i8] c"%d \00"
@.str.12 = [4 x i8] c"%f\0A\00"
@str = [11 x i8] c"Not found!\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = alloca [10 x i8]
%3 = alloca [7 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%7 = call i32 @strcat(i8* %5, i8* %6)
%8 = call i32 @puts(i8* %5)
%9 = call i32 @resetStr(i8* %5, i8* %4)
%10 = call i32 @strncat(i8* %5, i8* %6, i32 4)
%11 = call i32 @puts(i8* %5)
%12 = call i32 @resetStr(i8* %5, i8* %4)
%13 = call i32 @strcmp(i8* %5, i8* %6)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 -1)
%16 = call i32 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 2)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = call i32 @strcpy(i8* %5, i8* %6)
%19 = call i32 @puts(i8* %5)
%20 = call i32 @resetStr(i8* %5, i8* %4)
%21 = call i32 @strncpy(i8* %5, i8* %6, i32 4)
%22 = call i32 @puts(i8* %5)
%23 = call i32 @resetStr(i8* %5, i8* %4)
%24 = call i32 @strlen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %24)
%26 = call i8* @strchr(i8* %5, i8 signext 108)
%27 = icmp eq i8* %26, null
br i1 %27, label %28, label %30
28: ; preds = %0
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %30
30: ; preds = %28, %0
%31 = getelementptr inbounds i8, i8* %26, i64 2
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 %33)
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i32 108, i8* %26)
%36 = call i32 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%37 = call i64 @malloc(i32 4)
%38 = inttoptr i64 %37 to i32*
store i32 8, i32* %38
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 8)
%40 = call i64 @calloc(i32 10, i32 4)
%41 = inttoptr i64 %40 to i32*
%42 = load i32, i32* %41
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %42)
%44 = load i32, i32* %41
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %44)
%46 = load i32, i32* %41
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %46)
%48 = load i32, i32* %41
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %48)
%50 = load i32, i32* %41
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %50)
%52 = load i32, i32* %41
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %52)
%54 = load i32, i32* %41
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %54)
%56 = load i32, i32* %41
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %56)
%58 = load i32, i32* %41
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %58)
%60 = load i32, i32* %41
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %60)
%62 = call i32 @putchar(i32 10)
%63 = call i32 @free(i32* %38)
%64 = call i32 @free(i32* %41)
%65 = call double @sin(i32 18)
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %65)
%67 = call double @cos(i32 18)
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %67)
%69 = call double @atan2(i32 18, i32 3)
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %69)
%71 = call double @exp(i32 2)
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %71)
%73 = call double @log(i32 2)
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %73)
%75 = call double @log10(i32 2)
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %75)
%77 = call double @pow(i32 2, i32 5)
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %77)
%79 = call double @sqrt(i32 81)
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %79)
%81 = call double @fabs(i32 -22)
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), double %81)
%83 = call i32 @time(i32* null)
%84 = call i32 @srand(i32 %83)
%85 = call i32 (...) @rand()
%86 = srem i32 %85, 20
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %86)
%88 = call i32 (...) @rand()
%89 = srem i32 %88, 80
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %89)
ret i32 0
}