#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*/ printf(char *, char *, char *);
scalar_t__ strend(char *, char *);
int main(int argc, char *argv[]) {
  char s[] = "javascript";
  char t[] = "script";
  char t1[] = "python";
  if (strend(s, t)) {
    printf("%s is end of %s\n", s, t);
  } else {
    printf("%s is not end of %s\n", s, t);
  }
  if (strend(s, t1)) {
    printf("%s is end of %s\n", s, t1);
  } else {
    printf("%s is not end of %s\n", s, t1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x1b(%rbp)
mov    0xec0(%rip),%ax
mov    %ax,-0x13(%rbp)
mov    0xeb8(%rip),%al
mov    %al,-0x11(%rbp)
mov    0xea9(%rip),%eax
mov    %eax,-0x22(%rbp)
mov    0xea3(%rip),%ax
mov    %ax,-0x1e(%rbp)
mov    0xe9b(%rip),%al
mov    %al,-0x1c(%rbp)
mov    0xe93(%rip),%eax
mov    %eax,-0x29(%rbp)
mov    0xe8d(%rip),%ax
mov    %ax,-0x25(%rbp)
mov    0xe85(%rip),%al
mov    %al,-0x23(%rbp)
lea    -0x1b(%rbp),%rdi
lea    -0x22(%rbp),%rsi
call   1040 <strend@plt>
cmp    $0x0,%rax
je     11bf <main+0x9f>
lea    -0x1b(%rbp),%rsi
lea    -0x22(%rbp),%rdx
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
jmp    11d3 <main+0xb3>
lea    -0x1b(%rbp),%rsi
lea    -0x22(%rbp),%rdx
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
lea    -0x1b(%rbp),%rdi
lea    -0x29(%rbp),%rsi
call   1040 <strend@plt>
cmp    $0x0,%rax
je     1203 <main+0xe3>
lea    -0x1b(%rbp),%rsi
lea    -0x29(%rbp),%rdx
lea    0xe19(%rip),%rdi
call   1030 <printf@plt>
jmp    1217 <main+0xf7>
lea    -0x1b(%rbp),%rsi
lea    -0x29(%rbp),%rdx
lea    0xe11(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
movabs $0x697263736176616a,%rax
63 72 69
mov    %rax,0x18(%rsp)
movl   $0x747069,0x1f(%rsp)
movl   $0x747069,0x13(%rsp)
movl   $0x69726373,0x10(%rsp)
69
movl   $0x6e6f68,0xb(%rsp)
movl   $0x68747970,0x8(%rsp)
68
lea    0x18(%rsp),%r15
lea    0x10(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <strend@plt>
test   %rax,%rax
lea    0xea2(%rip),%r12
lea    0xe8a(%rip),%rbx
mov    %rbx,%rdi
cmove  %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
lea    0x8(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <strend@plt>
test   %rax,%rax
cmove  %r12,%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.s = [11 x i8] c"javascript\00"
@__const.main.t = [7 x i8] c"script\00"
@__const.main.t1 = [7 x i8] c"python\00"
@.str = [17 x i8] c"%s is end of %s\0A\00"
@.str.1 = [21 x i8] c"%s is not end of %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [11 x i8]
%7 = alloca [7 x i8]
%8 = alloca [7 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [11 x i8]* %6 to i8*
%10 = bitcast [7 x i8]* %7 to i8*
%11 = bitcast [7 x i8]* %8 to i8*
%12 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [7 x i8], [7 x i8]* %7, i64 0, i64 0
%14 = call i64 @strend(i8* %12, i8* %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %2
%17 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%18 = getelementptr inbounds [7 x i8], [7 x i8]* %7, i64 0, i64 0
%19 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %17, i8* %18)
br label %24
20: ; preds = %2
%21 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%22 = getelementptr inbounds [7 x i8], [7 x i8]* %7, i64 0, i64 0
%23 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %21, i8* %22)
br label %24
24: ; preds = %20, %16
%25 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%26 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 0
%27 = call i64 @strend(i8* %25, i8* %26)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %33
29: ; preds = %24
%30 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%31 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 0
%32 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %30, i8* %31)
br label %37
33: ; preds = %24
%34 = getelementptr inbounds [11 x i8], [11 x i8]* %6, i64 0, i64 0
%35 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 0
%36 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %34, i8* %35)
br label %37
37: ; preds = %33, %29
ret i32 0
}

LLVM IR (-O2):
@__const.main.s = [11 x i8] c"javascript\00"
@__const.main.t = [7 x i8] c"script\00"
@__const.main.t1 = [7 x i8] c"python\00"
@.str = [17 x i8] c"%s is end of %s\0A\00"
@.str.1 = [21 x i8] c"%s is not end of %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [11 x i8]
%4 = alloca [7 x i8]
%5 = alloca [7 x i8]
%6 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [7 x i8], [7 x i8]* %5, i64 0, i64 0
%9 = call i64 @strend(i8* %6, i8* %7)
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
%12 = call i32 @printf(i8* %11, i8* %6, i8* %7)
%13 = call i64 @strend(i8* %6, i8* %8)
%14 = icmp eq i64 %13, 0
%15 = select i1 %14, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
%16 = call i32 @printf(i8* %15, i8* %6, i8* %8)
ret i32 0
}