#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_invalid_hour();
int /*<<< orphan*/ test_invalid_minute();
int /*<<< orphan*/ test_negative_angle();
int /*<<< orphan*/ test_positive_angle();
int /*<<< orphan*/ test_zero_angle();
void main() {
  int counter = 0;
  if (!test_invalid_hour()) {
    counter++;
    printf("Invalid hour test failed!\n");
  }
  if (!test_invalid_minute()) {
    counter++;
    printf("Invalid minute test failed!\n");
  }
  if (!test_positive_angle()) {
    counter++;
    printf("Positive angle test failed!\n");
  }
  if (!test_negative_angle()) {
    counter++;
    printf("Negative angle test failed!\n");
  }
  if (!test_zero_angle()) {
    counter++;
    printf("Zero angle test failed!\n");
  }
  printf("%d tests failed.\n", counter);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_invalid_hour@plt>
cmp    $0x0,%eax
jne    1196 <main+0x36>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <test_invalid_minute@plt>
cmp    $0x0,%eax
jne    11bd <main+0x5d>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1080 <test_positive_angle@plt>
cmp    $0x0,%eax
jne    11e4 <main+0x84>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <test_negative_angle@plt>
cmp    $0x0,%eax
jne    120b <main+0xab>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <test_zero_angle@plt>
cmp    $0x0,%eax
jne    1232 <main+0xd2>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <test_invalid_hour@plt>
test   %eax,%eax
jne    118f <main+0x1f>
lea    0xe8d(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%ebx
xor    %eax,%eax
call   1080 <test_invalid_minute@plt>
test   %eax,%eax
jne    11a9 <main+0x39>
add    $0x1,%ebx
lea    0xe88(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1090 <test_positive_angle@plt>
test   %eax,%eax
jne    11c3 <main+0x53>
add    $0x1,%ebx
lea    0xe8a(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <test_negative_angle@plt>
test   %eax,%eax
jne    11dd <main+0x6d>
add    $0x1,%ebx
lea    0xe8c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <test_zero_angle@plt>
test   %eax,%eax
jne    11f7 <main+0x87>
add    $0x1,%ebx
lea    0xe8e(%rip),%rdi
call   1030 <puts@plt>
lea    0xe02(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1060 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Invalid hour test failed!\0A\00"
@.str.1 = [29 x i8] c"Invalid minute test failed!\0A\00"
@.str.2 = [29 x i8] c"Positive angle test failed!\0A\00"
@.str.3 = [29 x i8] c"Negative angle test failed!\0A\00"
@.str.4 = [25 x i8] c"Zero angle test failed!\0A\00"
@.str.5 = [18 x i8] c"%d tests failed.\0A\00"
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_invalid_hour()
%3 = icmp ne i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %0
%5 = load i32, i32* %1
%6 = add nsw i32 %5, 1
store i32 %6, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %4, %0
%9 = call i32 (...) @test_invalid_minute()
%10 = icmp ne i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %8
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %11, %8
%16 = call i32 (...) @test_positive_angle()
%17 = icmp ne i32 %16, 0
br i1 %17, label %22, label %18
18: ; preds = %15
%19 = load i32, i32* %1
%20 = add nsw i32 %19, 1
store i32 %20, i32* %1
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %22
22: ; preds = %18, %15
%23 = call i32 (...) @test_negative_angle()
%24 = icmp ne i32 %23, 0
br i1 %24, label %29, label %25
25: ; preds = %22
%26 = load i32, i32* %1
%27 = add nsw i32 %26, 1
store i32 %27, i32* %1
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0))
br label %29
29: ; preds = %25, %22
%30 = call i32 (...) @test_zero_angle()
%31 = icmp ne i32 %30, 0
br i1 %31, label %36, label %32
32: ; preds = %29
%33 = load i32, i32* %1
%34 = add nsw i32 %33, 1
store i32 %34, i32* %1
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
br label %36
36: ; preds = %32, %29
%37 = load i32, i32* %1
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %37)
ret void
}

LLVM IR (-O2):
@.str.5 = [18 x i8] c"%d tests failed.\0A\00"
@str = [26 x i8] c"Invalid hour test failed!\00"
@str.6 = [28 x i8] c"Invalid minute test failed!\00"
@str.7 = [28 x i8] c"Positive angle test failed!\00"
@str.8 = [28 x i8] c"Negative angle test failed!\00"
@str.9 = [24 x i8] c"Zero angle test failed!\00"
define void @main() {
%1 = tail call i32 (...) @test_invalid_hour()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ 0, %0 ], [ 1, %3 ]
%7 = tail call i32 (...) @test_invalid_minute()
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = add nuw nsw i32 %6, 1
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.6, i64 0, i64 0))
br label %12
12: ; preds = %9, %5
%13 = phi i32 [ %6, %5 ], [ %10, %9 ]
%14 = tail call i32 (...) @test_positive_angle()
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = add nuw nsw i32 %13, 1
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.7, i64 0, i64 0))
br label %19
19: ; preds = %16, %12
%20 = phi i32 [ %13, %12 ], [ %17, %16 ]
%21 = tail call i32 (...) @test_negative_angle()
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %19
%24 = add nuw nsw i32 %20, 1
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.8, i64 0, i64 0))
br label %26
26: ; preds = %23, %19
%27 = phi i32 [ %20, %19 ], [ %24, %23 ]
%28 = tail call i32 (...) @test_zero_angle()
%29 = icmp eq i32 %28, 0
br i1 %29, label %30, label %33
30: ; preds = %26
%31 = add nuw nsw i32 %27, 1
%32 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.9, i64 0, i64 0))
br label %33
33: ; preds = %30, %26
%34 = phi i32 [ %27, %26 ], [ %31, %30 ]
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %34)
ret void
}