#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_iter_grid();
int /*<<< orphan*/ test_iter_hashmap();
int /*<<< orphan*/ test_iter_range();
int /*<<< orphan*/ test_iter_vector();
unsigned int test_iter(void) {
  printf("\nTesting iter...\n");
  if (!test_iter_range())
    return 0;
  ;
  if (!test_iter_vector())
    return 0;
  ;
  if (!test_iter_grid())
    return 0;
  ;
  if (!test_iter_hashmap())
    return 0;
  ;
  printf("All iter tests passed!\n");
}


x86 assembly (clang, -O0):
<test_iter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <test_iter_range@plt>
cmp    $0x0,%eax
jne    1180 <test_iter+0x30>
movl   $0x0,-0x4(%rbp)
jmp    11e0 <test_iter+0x90>
mov    $0x0,%al
call   1050 <test_iter_vector@plt>
cmp    $0x0,%eax
jne    119c <test_iter+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    11e0 <test_iter+0x90>
mov    $0x0,%al
call   1060 <test_iter_grid@plt>
cmp    $0x0,%eax
jne    11b8 <test_iter+0x68>
movl   $0x0,-0x4(%rbp)
jmp    11e0 <test_iter+0x90>
mov    $0x0,%al
call   1070 <test_iter_hashmap@plt>
cmp    $0x0,%eax
jne    11d4 <test_iter+0x84>
movl   $0x0,-0x4(%rbp)
jmp    11e0 <test_iter+0x90>
lea    0xe37(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_iter>:
push   %rax
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <test_iter_range@plt>
test   %eax,%eax
je     1195 <test_iter+0x45>
xor    %eax,%eax
call   1050 <test_iter_vector@plt>
test   %eax,%eax
je     1195 <test_iter+0x45>
xor    %eax,%eax
call   1060 <test_iter_grid@plt>
test   %eax,%eax
je     1195 <test_iter+0x45>
xor    %eax,%eax
call   1070 <test_iter_hashmap@plt>
test   %eax,%eax
je     1195 <test_iter+0x45>
lea    0xe81(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"\0ATesting iter...\0A\00"
@.str.1 = [24 x i8] c"All iter tests passed!\0A\00"
define i32 @test_iter() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test_iter_range()
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %0
store i32 0, i32* %1
br label %20
6: ; preds = %0
%7 = call i32 (...) @test_iter_vector()
%8 = icmp ne i32 %7, 0
br i1 %8, label %10, label %9
9: ; preds = %6
store i32 0, i32* %1
br label %20
10: ; preds = %6
%11 = call i32 (...) @test_iter_grid()
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %10
store i32 0, i32* %1
br label %20
14: ; preds = %10
%15 = call i32 (...) @test_iter_hashmap()
%16 = icmp ne i32 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %14
store i32 0, i32* %1
br label %20
18: ; preds = %14
%19 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %20
20: ; preds = %18, %17, %13, %9, %5
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
@str = [17 x i8] c"\0ATesting iter...\00"
@str.2 = [23 x i8] c"All iter tests passed!\00"
define i32 @test_iter() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @test_iter_range()
%3 = icmp eq i32 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %0
%5 = tail call i32 (...) @test_iter_vector()
%6 = icmp eq i32 %5, 0
br i1 %6, label %15, label %7
7: ; preds = %4
%8 = tail call i32 (...) @test_iter_grid()
%9 = icmp eq i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %7
%11 = tail call i32 (...) @test_iter_hashmap()
%12 = icmp eq i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.2, i64 0, i64 0))
br label %15
15: ; preds = %10, %7, %4, %0, %13
ret i32 0
}