#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 *);
int /*<<< orphan*/ test_asn1_uint64();
int /*<<< orphan*/ test_cbb_asn1();
int /*<<< orphan*/ test_cbb_basic();
int /*<<< orphan*/ test_cbb_finish_child();
int /*<<< orphan*/ test_cbb_fixed();
int /*<<< orphan*/ test_cbb_misuse();
int /*<<< orphan*/ test_cbb_prefixed();
int /*<<< orphan*/ test_cbs_dup();
int /*<<< orphan*/ test_get_asn1();
int /*<<< orphan*/ test_get_optional_asn1_bool();
int /*<<< orphan*/ test_get_prefixed();
int /*<<< orphan*/ test_get_prefixed_bad();
int /*<<< orphan*/ test_get_u();
int /*<<< orphan*/ test_indefinite_convert();
int /*<<< orphan*/ test_offset();
int /*<<< orphan*/ test_skip();
int /*<<< orphan*/ test_write_bytes();
int main(void) {
  int failed = 0;
  failed |= !test_skip();
  failed |= !test_get_u();
  failed |= !test_get_prefixed();
  failed |= !test_get_prefixed_bad();
  failed |= !test_get_asn1();
  failed |= !test_cbb_basic();
  failed |= !test_cbb_fixed();
  failed |= !test_cbb_finish_child();
  failed |= !test_cbb_misuse();
  failed |= !test_cbb_prefixed();
  failed |= !test_cbb_asn1();
  failed |= !test_indefinite_convert();
  failed |= !test_asn1_uint64();
  failed |= !test_get_optional_asn1_bool();
  failed |= !test_offset();
  failed |= !test_write_bytes();
  failed |= !test_cbs_dup();
  if (!failed)
    printf("PASS\n");
  return failed;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1120 <test_skip@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1080 <test_get_u@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   10d0 <test_get_prefixed@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   10b0 <test_get_prefixed_bad@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   10c0 <test_get_asn1@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <test_cbb_basic@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   10e0 <test_cbb_fixed@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1100 <test_cbb_finish_child@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1140 <test_cbb_misuse@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1110 <test_cbb_prefixed@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   10a0 <test_cbb_asn1@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1060 <test_indefinite_convert@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   10f0 <test_asn1_uint64@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1090 <test_get_optional_asn1_bool@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <test_offset@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1070 <test_write_bytes@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1130 <test_cbs_dup@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1406 <main+0x1e6>
lea    0xbff(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1120 <test_skip@plt>
test   %eax,%eax
sete   %bl
xor    %eax,%eax
call   1080 <test_get_u@plt>
test   %eax,%eax
sete   %bpl
or     %bl,%bpl
xor    %eax,%eax
call   10d0 <test_get_prefixed@plt>
test   %eax,%eax
sete   %r14b
xor    %eax,%eax
call   10b0 <test_get_prefixed_bad@plt>
test   %eax,%eax
sete   %r15b
or     %r14b,%r15b
or     %bpl,%r15b
xor    %eax,%eax
call   10c0 <test_get_asn1@plt>
test   %eax,%eax
sete   %bpl
xor    %eax,%eax
call   1030 <test_cbb_basic@plt>
test   %eax,%eax
sete   %bl
or     %bpl,%bl
xor    %eax,%eax
call   10e0 <test_cbb_fixed@plt>
test   %eax,%eax
sete   %r14b
or     %bl,%r14b
or     %r15b,%r14b
xor    %eax,%eax
call   1100 <test_cbb_finish_child@plt>
test   %eax,%eax
sete   %bpl
xor    %eax,%eax
call   1140 <test_cbb_misuse@plt>
test   %eax,%eax
sete   %bl
or     %bpl,%bl
xor    %eax,%eax
call   1110 <test_cbb_prefixed@plt>
test   %eax,%eax
sete   %r15b
or     %bl,%r15b
xor    %eax,%eax
call   10a0 <test_cbb_asn1@plt>
test   %eax,%eax
sete   %bpl
or     %r15b,%bpl
or     %r14b,%bpl
xor    %eax,%eax
call   1060 <test_indefinite_convert@plt>
test   %eax,%eax
sete   %r14b
xor    %eax,%eax
call   10f0 <test_asn1_uint64@plt>
test   %eax,%eax
sete   %bl
or     %r14b,%bl
xor    %eax,%eax
call   1090 <test_get_optional_asn1_bool@plt>
test   %eax,%eax
sete   %r14b
or     %bl,%r14b
xor    %eax,%eax
call   1040 <test_offset@plt>
test   %eax,%eax
sete   %r15b
or     %r14b,%r15b
xor    %eax,%eax
call   1070 <test_write_bytes@plt>
test   %eax,%eax
sete   %bl
or     %r15b,%bl
or     %bpl,%bl
xor    %eax,%eax
call   1130 <test_cbs_dup@plt>
test   %eax,%eax
sete   %bpl
or     %bl,%bpl
test   $0x1,%bpl
jne    1341 <main+0x121>
lea    0xcc4(%rip),%rdi
call   1050 <puts@plt>
movzbl %bpl,%eax
and    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"PASS\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @test_skip()
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
%7 = load i32, i32* %2
%8 = or i32 %7, %6
store i32 %8, i32* %2
%9 = call i32 (...) @test_get_u()
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
%13 = load i32, i32* %2
%14 = or i32 %13, %12
store i32 %14, i32* %2
%15 = call i32 (...) @test_get_prefixed()
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
%19 = load i32, i32* %2
%20 = or i32 %19, %18
store i32 %20, i32* %2
%21 = call i32 (...) @test_get_prefixed_bad()
%22 = icmp ne i32 %21, 0
%23 = xor i1 %22, true
%24 = zext i1 %23 to i32
%25 = load i32, i32* %2
%26 = or i32 %25, %24
store i32 %26, i32* %2
%27 = call i32 (...) @test_get_asn1()
%28 = icmp ne i32 %27, 0
%29 = xor i1 %28, true
%30 = zext i1 %29 to i32
%31 = load i32, i32* %2
%32 = or i32 %31, %30
store i32 %32, i32* %2
%33 = call i32 (...) @test_cbb_basic()
%34 = icmp ne i32 %33, 0
%35 = xor i1 %34, true
%36 = zext i1 %35 to i32
%37 = load i32, i32* %2
%38 = or i32 %37, %36
store i32 %38, i32* %2
%39 = call i32 (...) @test_cbb_fixed()
%40 = icmp ne i32 %39, 0
%41 = xor i1 %40, true
%42 = zext i1 %41 to i32
%43 = load i32, i32* %2
%44 = or i32 %43, %42
store i32 %44, i32* %2
%45 = call i32 (...) @test_cbb_finish_child()
%46 = icmp ne i32 %45, 0
%47 = xor i1 %46, true
%48 = zext i1 %47 to i32
%49 = load i32, i32* %2
%50 = or i32 %49, %48
store i32 %50, i32* %2
%51 = call i32 (...) @test_cbb_misuse()
%52 = icmp ne i32 %51, 0
%53 = xor i1 %52, true
%54 = zext i1 %53 to i32
%55 = load i32, i32* %2
%56 = or i32 %55, %54
store i32 %56, i32* %2
%57 = call i32 (...) @test_cbb_prefixed()
%58 = icmp ne i32 %57, 0
%59 = xor i1 %58, true
%60 = zext i1 %59 to i32
%61 = load i32, i32* %2
%62 = or i32 %61, %60
store i32 %62, i32* %2
%63 = call i32 (...) @test_cbb_asn1()
%64 = icmp ne i32 %63, 0
%65 = xor i1 %64, true
%66 = zext i1 %65 to i32
%67 = load i32, i32* %2
%68 = or i32 %67, %66
store i32 %68, i32* %2
%69 = call i32 (...) @test_indefinite_convert()
%70 = icmp ne i32 %69, 0
%71 = xor i1 %70, true
%72 = zext i1 %71 to i32
%73 = load i32, i32* %2
%74 = or i32 %73, %72
store i32 %74, i32* %2
%75 = call i32 (...) @test_asn1_uint64()
%76 = icmp ne i32 %75, 0
%77 = xor i1 %76, true
%78 = zext i1 %77 to i32
%79 = load i32, i32* %2
%80 = or i32 %79, %78
store i32 %80, i32* %2
%81 = call i32 (...) @test_get_optional_asn1_bool()
%82 = icmp ne i32 %81, 0
%83 = xor i1 %82, true
%84 = zext i1 %83 to i32
%85 = load i32, i32* %2
%86 = or i32 %85, %84
store i32 %86, i32* %2
%87 = call i32 (...) @test_offset()
%88 = icmp ne i32 %87, 0
%89 = xor i1 %88, true
%90 = zext i1 %89 to i32
%91 = load i32, i32* %2
%92 = or i32 %91, %90
store i32 %92, i32* %2
%93 = call i32 (...) @test_write_bytes()
%94 = icmp ne i32 %93, 0
%95 = xor i1 %94, true
%96 = zext i1 %95 to i32
%97 = load i32, i32* %2
%98 = or i32 %97, %96
store i32 %98, i32* %2
%99 = call i32 (...) @test_cbs_dup()
%100 = icmp ne i32 %99, 0
%101 = xor i1 %100, true
%102 = zext i1 %101 to i32
%103 = load i32, i32* %2
%104 = or i32 %103, %102
store i32 %104, i32* %2
%105 = load i32, i32* %2
%106 = icmp ne i32 %105, 0
br i1 %106, label %109, label %107
107: ; preds = %0
%108 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %109
109: ; preds = %107, %0
%110 = load i32, i32* %2
ret i32 %110
}

LLVM IR (-O2):
@str = [5 x i8] c"PASS\00"
define i32 @main() {
%1 = tail call i32 (...) @test_skip()
%2 = icmp eq i32 %1, 0
%3 = tail call i32 (...) @test_get_u()
%4 = icmp eq i32 %3, 0
%5 = or i1 %2, %4
%6 = tail call i32 (...) @test_get_prefixed()
%7 = icmp eq i32 %6, 0
%8 = or i1 %5, %7
%9 = tail call i32 (...) @test_get_prefixed_bad()
%10 = icmp eq i32 %9, 0
%11 = or i1 %8, %10
%12 = tail call i32 (...) @test_get_asn1()
%13 = icmp eq i32 %12, 0
%14 = or i1 %11, %13
%15 = tail call i32 (...) @test_cbb_basic()
%16 = icmp eq i32 %15, 0
%17 = or i1 %14, %16
%18 = tail call i32 (...) @test_cbb_fixed()
%19 = icmp eq i32 %18, 0
%20 = or i1 %17, %19
%21 = tail call i32 (...) @test_cbb_finish_child()
%22 = icmp eq i32 %21, 0
%23 = or i1 %20, %22
%24 = tail call i32 (...) @test_cbb_misuse()
%25 = icmp eq i32 %24, 0
%26 = or i1 %23, %25
%27 = tail call i32 (...) @test_cbb_prefixed()
%28 = icmp eq i32 %27, 0
%29 = or i1 %26, %28
%30 = tail call i32 (...) @test_cbb_asn1()
%31 = icmp eq i32 %30, 0
%32 = or i1 %29, %31
%33 = tail call i32 (...) @test_indefinite_convert()
%34 = icmp eq i32 %33, 0
%35 = or i1 %32, %34
%36 = tail call i32 (...) @test_asn1_uint64()
%37 = icmp eq i32 %36, 0
%38 = or i1 %35, %37
%39 = tail call i32 (...) @test_get_optional_asn1_bool()
%40 = icmp eq i32 %39, 0
%41 = or i1 %38, %40
%42 = tail call i32 (...) @test_offset()
%43 = icmp eq i32 %42, 0
%44 = or i1 %41, %43
%45 = tail call i32 (...) @test_write_bytes()
%46 = icmp eq i32 %45, 0
%47 = or i1 %44, %46
%48 = tail call i32 (...) @test_cbs_dup()
%49 = icmp eq i32 %48, 0
%50 = or i1 %47, %49
br i1 %50, label %53, label %51
51: ; preds = %0
%52 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
br label %53
53: ; preds = %51, %0
%54 = zext i1 %50 to i32
ret i32 %54
}