#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 */
scalar_t__ test_array_end();
scalar_t__ test_array_next_item();
scalar_t__ test_array_start();
scalar_t__ test_dict_end();
scalar_t__ test_dict_next_key();
scalar_t__ test_dict_start();
scalar_t__ test_dict_with_many_escape_chars();
scalar_t__ test_dict_with_normal_key();
scalar_t__ test_dict_with_quote_in_key();
scalar_t__ test_string_repr();
scalar_t__ test_time_repr();
scalar_t__ test_ul_arr_repr();
scalar_t__ test_unsigned_long_repr();
scalar_t__ test_unsigned_long_repr_for_one_char_string();
scalar_t__ test_unsigned_long_repr_for_zero();
int json_helpers_tests() {
  int failure_count = 0;
  failure_count += test_ul_arr_repr();
  failure_count += test_array_start();
  failure_count += test_array_next_item();
  failure_count += test_array_end();
  failure_count += test_dict_start();
  failure_count += test_dict_next_key();
  failure_count += test_dict_end();
  failure_count += test_dict_with_normal_key();
  failure_count += test_dict_with_quote_in_key();
  failure_count += test_dict_with_many_escape_chars();
  failure_count += test_string_repr();
  failure_count += test_time_repr();
  failure_count += test_unsigned_long_repr();
  failure_count += test_unsigned_long_repr_for_zero();
  failure_count += test_unsigned_long_repr_for_one_char_string();
  return failure_count;
}


x86 assembly (clang, -O0):
<json_helpers_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   10f0 <test_ul_arr_repr@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1100 <test_array_start@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1090 <test_array_next_item@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1070 <test_array_end@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1080 <test_dict_start@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10c0 <test_dict_next_key@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_dict_end@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1060 <test_dict_with_normal_key@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10a0 <test_dict_with_quote_in_key@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1110 <test_dict_with_many_escape_chars@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10b0 <test_string_repr@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10e0 <test_time_repr@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_unsigned_long_repr@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   10d0 <test_unsigned_long_repr_for_zero@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <test_unsigned_long_repr_for_one_char_string@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<json_helpers_tests>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   10f0 <test_ul_arr_repr@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1100 <test_array_start@plt>
mov    %rax,%r15
add    %r14d,%r15d
xor    %eax,%eax
call   1090 <test_array_next_item@plt>
mov    %rax,%rbx
add    %r15d,%ebx
xor    %eax,%eax
call   1070 <test_array_end@plt>
mov    %rax,%r14
add    %ebx,%r14d
xor    %eax,%eax
call   1080 <test_dict_start@plt>
mov    %rax,%rbx
add    %r14d,%ebx
xor    %eax,%eax
call   10c0 <test_dict_next_key@plt>
mov    %rax,%r14
add    %ebx,%r14d
xor    %eax,%eax
call   1030 <test_dict_end@plt>
mov    %rax,%rbx
add    %r14d,%ebx
xor    %eax,%eax
call   1060 <test_dict_with_normal_key@plt>
mov    %rax,%r14
add    %ebx,%r14d
xor    %eax,%eax
call   10a0 <test_dict_with_quote_in_key@plt>
mov    %rax,%rbx
add    %r14d,%ebx
xor    %eax,%eax
call   1110 <test_dict_with_many_escape_chars@plt>
mov    %rax,%r14
add    %ebx,%r14d
xor    %eax,%eax
call   10b0 <test_string_repr@plt>
mov    %rax,%rbx
add    %r14d,%ebx
xor    %eax,%eax
call   10e0 <test_time_repr@plt>
mov    %rax,%r14
add    %ebx,%r14d
xor    %eax,%eax
call   1050 <test_unsigned_long_repr@plt>
mov    %rax,%rbx
add    %r14d,%ebx
xor    %eax,%eax
call   10d0 <test_unsigned_long_repr_for_zero@plt>
mov    %rax,%r14
add    %ebx,%r14d
xor    %eax,%eax
call   1040 <test_unsigned_long_repr_for_one_char_string@plt>
add    %r14d,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @json_helpers_tests() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @test_ul_arr_repr()
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = add nsw i64 %4, %2
%6 = trunc i64 %5 to i32
store i32 %6, i32* %1
%7 = call i64 (...) @test_array_start()
%8 = load i32, i32* %1
%9 = sext i32 %8 to i64
%10 = add nsw i64 %9, %7
%11 = trunc i64 %10 to i32
store i32 %11, i32* %1
%12 = call i64 (...) @test_array_next_item()
%13 = load i32, i32* %1
%14 = sext i32 %13 to i64
%15 = add nsw i64 %14, %12
%16 = trunc i64 %15 to i32
store i32 %16, i32* %1
%17 = call i64 (...) @test_array_end()
%18 = load i32, i32* %1
%19 = sext i32 %18 to i64
%20 = add nsw i64 %19, %17
%21 = trunc i64 %20 to i32
store i32 %21, i32* %1
%22 = call i64 (...) @test_dict_start()
%23 = load i32, i32* %1
%24 = sext i32 %23 to i64
%25 = add nsw i64 %24, %22
%26 = trunc i64 %25 to i32
store i32 %26, i32* %1
%27 = call i64 (...) @test_dict_next_key()
%28 = load i32, i32* %1
%29 = sext i32 %28 to i64
%30 = add nsw i64 %29, %27
%31 = trunc i64 %30 to i32
store i32 %31, i32* %1
%32 = call i64 (...) @test_dict_end()
%33 = load i32, i32* %1
%34 = sext i32 %33 to i64
%35 = add nsw i64 %34, %32
%36 = trunc i64 %35 to i32
store i32 %36, i32* %1
%37 = call i64 (...) @test_dict_with_normal_key()
%38 = load i32, i32* %1
%39 = sext i32 %38 to i64
%40 = add nsw i64 %39, %37
%41 = trunc i64 %40 to i32
store i32 %41, i32* %1
%42 = call i64 (...) @test_dict_with_quote_in_key()
%43 = load i32, i32* %1
%44 = sext i32 %43 to i64
%45 = add nsw i64 %44, %42
%46 = trunc i64 %45 to i32
store i32 %46, i32* %1
%47 = call i64 (...) @test_dict_with_many_escape_chars()
%48 = load i32, i32* %1
%49 = sext i32 %48 to i64
%50 = add nsw i64 %49, %47
%51 = trunc i64 %50 to i32
store i32 %51, i32* %1
%52 = call i64 (...) @test_string_repr()
%53 = load i32, i32* %1
%54 = sext i32 %53 to i64
%55 = add nsw i64 %54, %52
%56 = trunc i64 %55 to i32
store i32 %56, i32* %1
%57 = call i64 (...) @test_time_repr()
%58 = load i32, i32* %1
%59 = sext i32 %58 to i64
%60 = add nsw i64 %59, %57
%61 = trunc i64 %60 to i32
store i32 %61, i32* %1
%62 = call i64 (...) @test_unsigned_long_repr()
%63 = load i32, i32* %1
%64 = sext i32 %63 to i64
%65 = add nsw i64 %64, %62
%66 = trunc i64 %65 to i32
store i32 %66, i32* %1
%67 = call i64 (...) @test_unsigned_long_repr_for_zero()
%68 = load i32, i32* %1
%69 = sext i32 %68 to i64
%70 = add nsw i64 %69, %67
%71 = trunc i64 %70 to i32
store i32 %71, i32* %1
%72 = call i64 (...) @test_unsigned_long_repr_for_one_char_string()
%73 = load i32, i32* %1
%74 = sext i32 %73 to i64
%75 = add nsw i64 %74, %72
%76 = trunc i64 %75 to i32
store i32 %76, i32* %1
%77 = load i32, i32* %1
ret i32 %77
}

LLVM IR (-O2):
define i32 @json_helpers_tests() {
%1 = tail call i64 (...) @test_ul_arr_repr()
%2 = tail call i64 (...) @test_array_start()
%3 = add i64 %2, %1
%4 = tail call i64 (...) @test_array_next_item()
%5 = add i64 %3, %4
%6 = tail call i64 (...) @test_array_end()
%7 = add i64 %5, %6
%8 = tail call i64 (...) @test_dict_start()
%9 = add i64 %7, %8
%10 = tail call i64 (...) @test_dict_next_key()
%11 = add i64 %9, %10
%12 = tail call i64 (...) @test_dict_end()
%13 = add i64 %11, %12
%14 = tail call i64 (...) @test_dict_with_normal_key()
%15 = add i64 %13, %14
%16 = tail call i64 (...) @test_dict_with_quote_in_key()
%17 = add i64 %15, %16
%18 = tail call i64 (...) @test_dict_with_many_escape_chars()
%19 = add i64 %17, %18
%20 = tail call i64 (...) @test_string_repr()
%21 = add i64 %19, %20
%22 = tail call i64 (...) @test_time_repr()
%23 = add i64 %21, %22
%24 = tail call i64 (...) @test_unsigned_long_repr()
%25 = add i64 %23, %24
%26 = tail call i64 (...) @test_unsigned_long_repr_for_zero()
%27 = add i64 %25, %26
%28 = tail call i64 (...) @test_unsigned_long_repr_for_one_char_string()
%29 = add i64 %27, %28
%30 = trunc i64 %29 to i32
ret i32 %30
}