#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_discard_child();
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_discard_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   1130 <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   1110 <test_cbb_discard_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   1150 <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   1120 <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   1140 <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    1430 <main+0x200>
lea    0xbd5(%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   1130 <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   1110 <test_cbb_discard_child@plt>
test   %eax,%eax
sete   %bl
or     %bpl,%bl
xor    %eax,%eax
call   1150 <test_cbb_misuse@plt>
test   %eax,%eax
sete   %r15b
or     %bl,%r15b
xor    %eax,%eax
call   1120 <test_cbb_prefixed@plt>
test   %eax,%eax
sete   %bpl
or     %r15b,%bpl
or     %r14b,%bpl
xor    %eax,%eax
call   10a0 <test_cbb_asn1@plt>
test   %eax,%eax
sete   %r14b
xor    %eax,%eax
call   1060 <test_indefinite_convert@plt>
test   %eax,%eax
sete   %bl
or     %r14b,%bl
xor    %eax,%eax
call   10f0 <test_asn1_uint64@plt>
test   %eax,%eax
sete   %r14b
or     %bl,%r14b
xor    %eax,%eax
call   1090 <test_get_optional_asn1_bool@plt>
test   %eax,%eax
sete   %bl
or     %r14b,%bl
xor    %eax,%eax
call   1040 <test_offset@plt>
test   %eax,%eax
sete   %r14b
or     %bl,%r14b
or     %bpl,%r14b
xor    %eax,%eax
call   1070 <test_write_bytes@plt>
test   %eax,%eax
sete   %bpl
xor    %eax,%eax
call   1140 <test_cbs_dup@plt>
test   %eax,%eax
sete   %bl
or     %bpl,%bl
or     %r14b,%bl
test   $0x1,%bl
jne    135f <main+0x12f>
lea    0xca6(%rip),%rdi
call   1050 <puts@plt>
movzbl %bl,%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_discard_child()
%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_misuse()
%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_prefixed()
%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_cbb_asn1()
%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_indefinite_convert()
%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_asn1_uint64()
%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_get_optional_asn1_bool()
%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_offset()
%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_write_bytes()
%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 = call i32 (...) @test_cbs_dup()
%106 = icmp ne i32 %105, 0
%107 = xor i1 %106, true
%108 = zext i1 %107 to i32
%109 = load i32, i32* %2
%110 = or i32 %109, %108
store i32 %110, i32* %2
%111 = load i32, i32* %2
%112 = icmp ne i32 %111, 0
br i1 %112, label %115, label %113
113: ; preds = %0
%114 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %115
115: ; preds = %113, %0
%116 = load i32, i32* %2
ret i32 %116
}

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_discard_child()
%25 = icmp eq i32 %24, 0
%26 = or i1 %23, %25
%27 = tail call i32 (...) @test_cbb_misuse()
%28 = icmp eq i32 %27, 0
%29 = or i1 %26, %28
%30 = tail call i32 (...) @test_cbb_prefixed()
%31 = icmp eq i32 %30, 0
%32 = or i1 %29, %31
%33 = tail call i32 (...) @test_cbb_asn1()
%34 = icmp eq i32 %33, 0
%35 = or i1 %32, %34
%36 = tail call i32 (...) @test_indefinite_convert()
%37 = icmp eq i32 %36, 0
%38 = or i1 %35, %37
%39 = tail call i32 (...) @test_asn1_uint64()
%40 = icmp eq i32 %39, 0
%41 = or i1 %38, %40
%42 = tail call i32 (...) @test_get_optional_asn1_bool()
%43 = icmp eq i32 %42, 0
%44 = or i1 %41, %43
%45 = tail call i32 (...) @test_offset()
%46 = icmp eq i32 %45, 0
%47 = or i1 %44, %46
%48 = tail call i32 (...) @test_write_bytes()
%49 = icmp eq i32 %48, 0
%50 = or i1 %47, %49
%51 = tail call i32 (...) @test_cbs_dup()
%52 = icmp eq i32 %51, 0
%53 = or i1 %50, %52
br i1 %53, label %56, label %54
54: ; preds = %0
%55 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
br label %56
56: ; preds = %54, %0
%57 = zext i1 %53 to i32
ret i32 %57
}