#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 */
scalar_t__ isPangramStrpos(char *, int, char *);
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int main(int argc, char **argv) {
  if (argc != 3) {
    printf("Error: missing alphabet or string\n");
    printf("\n");
    printf("Example:\n");
    printf("%s ABCDEFGHIJKLMNOPQRSTUVWXYZ \"The quick brown fox jumps over the "
           "lazy dog\"\n",
           argv[0]);
    return -1;
  }
  char *alphabet = argv[1];
  char *string = argv[2];
  int alphabetLen = strlen(alphabet);
  printf("Is Pangram: %s\n",
         isPangramStrpos(alphabet, alphabetLen, string) ? "yes" : "no");
  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)
cmpl   $0x3,-0x8(%rbp)
je     119b <main+0x6b>
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf13(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11fd <main+0xcd>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1030 <isPangramStrpos@plt>
mov    %rax,%rcx
lea    0xeb5(%rip),%rsi
lea    0xeaa(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x3,%edi
jne    11a0 <main+0x50>
mov    0x8(%rbx),%r14
mov    0x10(%rbx),%rbx
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    %r14,%rdi
mov    %eax,%esi
mov    %rbx,%rdx
call   1050 <isPangramStrpos@plt>
test   %rax,%rax
lea    0xede(%rip),%rax
lea    0xed3(%rip),%rsi
cmove  %rax,%rsi
lea    0xeb8(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    11d8 <main+0x88>
lea    0xebd(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xec9(%rip),%rdi
call   1040 <puts@plt>
mov    (%rbx),%rsi
lea    0xe34(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Error: missing alphabet or string\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [10 x i8] c"Example:\0A\00"
@.str.3 = [77 x i8] c"%s ABCDEFGHIJKLMNOPQRSTUVWXYZ \22The quick brown fox jumps over the lazy dog\22\0A\00"
@.str.4 = [16 x i8] c"Is Pangram: %s\0A\00"
@.str.5 = [4 x i8] c"yes\00"
@.str.6 = [3 x i8] c"no\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 3
br i1 %10, label %11, label %19
11: ; preds = %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 0
%17 = load i8*, i8** %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.3, i64 0, i64 0), i8* %17)
store i32 -1, i32* %3
br label %36
19: ; preds = %2
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
store i8* %22, i8** %6
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 2
%25 = load i8*, i8** %24
store i8* %25, i8** %7
%26 = load i8*, i8** %6
%27 = call i32 @strlen(i8* %26)
store i32 %27, i32* %8
%28 = load i8*, i8** %6
%29 = load i32, i32* %8
%30 = load i8*, i8** %7
%31 = call i64 @isPangramStrpos(i8* %28, i32 %29, i8* %30)
%32 = icmp ne i64 %31, 0
%33 = zext i1 %32 to i64
%34 = select i1 %32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0)
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* %34)
store i32 0, i32* %3
br label %36
36: ; preds = %19, %11
%37 = load i32, i32* %3
ret i32 %37
}

LLVM IR (-O2):
@.str.3 = [77 x i8] c"%s ABCDEFGHIJKLMNOPQRSTUVWXYZ \22The quick brown fox jumps over the lazy dog\22\0A\00"
@.str.4 = [16 x i8] c"Is Pangram: %s\0A\00"
@.str.5 = [4 x i8] c"yes\00"
@.str.6 = [3 x i8] c"no\00"
@str = [34 x i8] c"Error: missing alphabet or string\00"
@str.7 = [9 x i8] c"Example:\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.7, i64 0, i64 0))
%8 = load i8*, i8** %1
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @.str.3, i64 0, i64 0), i8* %8)
br label %20
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
%15 = tail call i32 @strlen(i8* %12)
%16 = tail call i64 @isPangramStrpos(i8* %12, i32 %15, i8* %14)
%17 = icmp eq i64 %16, 0
%18 = select i1 %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* %18)
br label %20
20: ; preds = %10, %4
%21 = phi i32 [ -1, %4 ], [ 0, %10 ]
ret i32 %21
}