#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);
int pandigital_test_digits(char *, int);
void pandigital_test_digits_test(void) {
  char digits[10] = {0, 1, 1, 1, 1, 1, 1, 0, 0, 0};
  assert(!pandigital_test_digits(digits, 5));
  assert(pandigital_test_digits(digits, 6));
  assert(!pandigital_test_digits(digits, 7));
}


x86 assembly (clang, -O0):
<pandigital_test_digits_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xa(%rbp)
mov    0xece(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0xa(%rbp),%rdi
mov    $0x5,%esi
call   1040 <pandigital_test_digits@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
lea    -0xa(%rbp),%rdi
mov    $0x6,%esi
call   1040 <pandigital_test_digits@plt>
mov    %eax,%edi
call   1030 <assert@plt>
lea    -0xa(%rbp),%rdi
mov    $0x7,%esi
call   1040 <pandigital_test_digits@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pandigital_test_digits_test>:
push   %rbx
sub    $0x10,%rsp
movabs $0x1010101010100,%rax
mov    %rax,(%rsp)
movw   $0x0,0x8(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <pandigital_test_digits@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1040 <pandigital_test_digits@plt>
mov    %eax,%edi
call   1030 <assert@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1040 <pandigital_test_digits@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.pandigital_test_digits_test.digits = [10 x i8] c"\00\01\01\01\01\01\01\00\00\00"
define void @pandigital_test_digits_test() {
%1 = alloca [10 x i8]
%2 = bitcast [10 x i8]* %1 to i8*
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%4 = call i32 @pandigital_test_digits(i8* %3, i32 5)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%10 = call i32 @pandigital_test_digits(i8* %9, i32 6)
%11 = call i32 @assert(i32 %10)
%12 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%13 = call i32 @pandigital_test_digits(i8* %12, i32 7)
%14 = icmp ne i32 %13, 0
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
ret void
}

LLVM IR (-O2):
@__const.pandigital_test_digits_test.digits = [10 x i8] c"\00\01\01\01\01\01\01\00\00\00"
define void @pandigital_test_digits_test() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @pandigital_test_digits(i8* %2, i32 5)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = call i32 @pandigital_test_digits(i8* %2, i32 6)
%8 = call i32 @assert(i32 %7)
%9 = call i32 @pandigital_test_digits(i8* %2, i32 7)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret void
}