#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 */
typedef int /*<<< orphan*/ omp_sched_t;
typedef int /*<<< orphan*/ omp_nest_lock_t;
typedef int /*<<< orphan*/ omp_lock_t;

/* Variables and functions */
int /*<<< orphan*/ omp_destroy_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ omp_destroy_nest_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ omp_get_active_level();
int /*<<< orphan*/ omp_get_ancestor_thread_num(int /*<<< orphan*/);
int /*<<< orphan*/ omp_get_dynamic();
int /*<<< orphan*/ omp_get_level();
int /*<<< orphan*/ omp_get_max_active_levels();
int /*<<< orphan*/ omp_get_max_threads();
int /*<<< orphan*/ omp_get_nested();
int /*<<< orphan*/ omp_get_num_procs();
int /*<<< orphan*/ omp_get_num_threads();
int /*<<< orphan*/ omp_get_schedule(int /*<<< orphan*/ *, int *);
int /*<<< orphan*/ omp_get_team_size(int /*<<< orphan*/);
int /*<<< orphan*/ omp_get_thread_limit();
int /*<<< orphan*/ omp_get_thread_num();
int /*<<< orphan*/ omp_get_wtick();
int /*<<< orphan*/ omp_get_wtime();
int /*<<< orphan*/ omp_in_parallel();
int /*<<< orphan*/ omp_init_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ omp_init_nest_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ omp_sched_static;
int /*<<< orphan*/ omp_set_dynamic(int /*<<< orphan*/);
int /*<<< orphan*/ omp_set_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ omp_set_max_active_levels(int);
int /*<<< orphan*/ omp_set_nest_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ omp_set_nested(int /*<<< orphan*/);
int /*<<< orphan*/ omp_set_num_threads(int);
int /*<<< orphan*/ omp_set_schedule(int /*<<< orphan*/, int);
int /*<<< orphan*/ omp_test_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ omp_test_nest_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ omp_unset_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ omp_unset_nest_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *);
int main() {
  omp_lock_t lock1;
  omp_nest_lock_t lock2;
  omp_sched_t sched;
  int mod;
  omp_init_lock(&lock1);
  omp_init_nest_lock(&lock2);
  omp_set_lock(&lock1);
  omp_set_nest_lock(&lock2);
  omp_unset_lock(&lock1);
  omp_unset_nest_lock(&lock2);
  omp_test_lock(&lock1);
  omp_test_nest_lock(&lock2);
  omp_destroy_lock(&lock1);
  omp_destroy_nest_lock(&lock2);
  omp_set_num_threads(4);
  omp_set_dynamic(0);
  omp_set_schedule(omp_sched_static, 1);
  omp_set_nested(0);
  omp_set_max_active_levels(2);
  omp_get_num_threads();
  omp_get_max_threads();
  omp_get_thread_num();
  omp_get_num_procs();
  omp_in_parallel();
  omp_get_nested();
  omp_get_dynamic();
  omp_get_schedule(&sched, &mod);
  omp_get_thread_limit();
  omp_get_max_active_levels();
  omp_get_level();
  omp_get_ancestor_thread_num(0);
  omp_get_team_size(0);
  omp_get_active_level();
  omp_get_wtime();
  omp_get_wtick();
  printf("omp_init_lock(i)   \n");
  printf("omp_init_lock(i)\"test\"omp_init_lock(i)omp_init_lock(i)\"\"\"\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   11f0 <omp_init_lock@plt>
lea    -0x8(%rbp),%rdi
call   10d0 <omp_init_nest_lock@plt>
lea    -0x4(%rbp),%rdi
call   1150 <omp_set_lock@plt>
lea    -0x8(%rbp),%rdi
call   1220 <omp_set_nest_lock@plt>
lea    -0x4(%rbp),%rdi
call   10b0 <omp_unset_lock@plt>
lea    -0x8(%rbp),%rdi
call   1060 <omp_unset_nest_lock@plt>
lea    -0x4(%rbp),%rdi
call   11e0 <omp_test_lock@plt>
lea    -0x8(%rbp),%rdi
call   1160 <omp_test_nest_lock@plt>
lea    -0x4(%rbp),%rdi
call   1200 <omp_destroy_lock@plt>
lea    -0x8(%rbp),%rdi
call   11b0 <omp_destroy_nest_lock@plt>
mov    $0x4,%edi
call   1180 <omp_set_num_threads@plt>
xor    %edi,%edi
call   1110 <omp_set_dynamic@plt>
mov    0x2c6e(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   10a0 <omp_set_schedule@plt>
xor    %edi,%edi
call   1130 <omp_set_nested@plt>
mov    $0x2,%edi
call   1050 <omp_set_max_active_levels@plt>
mov    $0x0,%al
call   10f0 <omp_get_num_threads@plt>
mov    $0x0,%al
call   11c0 <omp_get_max_threads@plt>
mov    $0x0,%al
call   1080 <omp_get_thread_num@plt>
mov    $0x0,%al
call   1140 <omp_get_num_procs@plt>
mov    $0x0,%al
call   1030 <omp_in_parallel@plt>
mov    $0x0,%al
call   1120 <omp_get_nested@plt>
mov    $0x0,%al
call   1210 <omp_get_dynamic@plt>
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1190 <omp_get_schedule@plt>
mov    $0x0,%al
call   1100 <omp_get_thread_limit@plt>
mov    $0x0,%al
call   1070 <omp_get_max_active_levels@plt>
mov    $0x0,%al
call   1170 <omp_get_level@plt>
xor    %edi,%edi
call   1040 <omp_get_ancestor_thread_num@plt>
xor    %edi,%edi
call   11a0 <omp_get_team_size@plt>
mov    $0x0,%al
call   11d0 <omp_get_active_level@plt>
mov    $0x0,%al
call   1090 <omp_get_wtime@plt>
mov    $0x0,%al
call   10e0 <omp_get_wtick@plt>
lea    0xbec(%rip),%rdi
call   10c0 <printf@plt>
lea    0xbf5(%rip),%rdi
call   10c0 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0x14(%rsp),%r14
mov    %r14,%rdi
call   11f0 <omp_init_lock@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   10d0 <omp_init_nest_lock@plt>
mov    %r14,%rdi
call   1150 <omp_set_lock@plt>
mov    %rbx,%rdi
call   1220 <omp_set_nest_lock@plt>
mov    %r14,%rdi
call   10c0 <omp_unset_lock@plt>
mov    %rbx,%rdi
call   1060 <omp_unset_nest_lock@plt>
mov    %r14,%rdi
call   11e0 <omp_test_lock@plt>
mov    %rbx,%rdi
call   1160 <omp_test_nest_lock@plt>
mov    %r14,%rdi
call   1200 <omp_destroy_lock@plt>
mov    %rbx,%rdi
call   11b0 <omp_destroy_nest_lock@plt>
mov    $0x4,%edi
call   1180 <omp_set_num_threads@plt>
xor    %edi,%edi
call   1110 <omp_set_dynamic@plt>
mov    0x2c6f(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   10b0 <omp_set_schedule@plt>
xor    %edi,%edi
call   1130 <omp_set_nested@plt>
mov    $0x2,%edi
call   1050 <omp_set_max_active_levels@plt>
xor    %eax,%eax
call   10f0 <omp_get_num_threads@plt>
xor    %eax,%eax
call   11c0 <omp_get_max_threads@plt>
xor    %eax,%eax
call   1090 <omp_get_thread_num@plt>
xor    %eax,%eax
call   1140 <omp_get_num_procs@plt>
xor    %eax,%eax
call   1030 <omp_in_parallel@plt>
xor    %eax,%eax
call   1120 <omp_get_nested@plt>
xor    %eax,%eax
call   1210 <omp_get_dynamic@plt>
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1190 <omp_get_schedule@plt>
xor    %eax,%eax
call   1100 <omp_get_thread_limit@plt>
xor    %eax,%eax
call   1070 <omp_get_max_active_levels@plt>
xor    %eax,%eax
call   1170 <omp_get_level@plt>
xor    %edi,%edi
call   1040 <omp_get_ancestor_thread_num@plt>
xor    %edi,%edi
call   11a0 <omp_get_team_size@plt>
xor    %eax,%eax
call   11d0 <omp_get_active_level@plt>
xor    %eax,%eax
call   10a0 <omp_get_wtime@plt>
xor    %eax,%eax
call   10e0 <omp_get_wtick@plt>
lea    0xbeb(%rip),%rdi
call   1080 <puts@plt>
lea    0xbf3(%rip),%rdi
call   1080 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@omp_sched_static = global i32 0
@.str = [21 x i8] c"omp_init_lock(i) \0A\00"
@.str.1 = [59 x i8] c"omp_init_lock(i)\22test\22omp_init_lock(i)omp_init_lock(i)\22\22\22\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @omp_init_lock(i32* %1)
%6 = call i32 @omp_init_nest_lock(i32* %2)
%7 = call i32 @omp_set_lock(i32* %1)
%8 = call i32 @omp_set_nest_lock(i32* %2)
%9 = call i32 @omp_unset_lock(i32* %1)
%10 = call i32 @omp_unset_nest_lock(i32* %2)
%11 = call i32 @omp_test_lock(i32* %1)
%12 = call i32 @omp_test_nest_lock(i32* %2)
%13 = call i32 @omp_destroy_lock(i32* %1)
%14 = call i32 @omp_destroy_nest_lock(i32* %2)
%15 = call i32 @omp_set_num_threads(i32 4)
%16 = call i32 @omp_set_dynamic(i32 0)
%17 = load i32, i32* @omp_sched_static
%18 = call i32 @omp_set_schedule(i32 %17, i32 1)
%19 = call i32 @omp_set_nested(i32 0)
%20 = call i32 @omp_set_max_active_levels(i32 2)
%21 = call i32 (...) @omp_get_num_threads()
%22 = call i32 (...) @omp_get_max_threads()
%23 = call i32 (...) @omp_get_thread_num()
%24 = call i32 (...) @omp_get_num_procs()
%25 = call i32 (...) @omp_in_parallel()
%26 = call i32 (...) @omp_get_nested()
%27 = call i32 (...) @omp_get_dynamic()
%28 = call i32 @omp_get_schedule(i32* %3, i32* %4)
%29 = call i32 (...) @omp_get_thread_limit()
%30 = call i32 (...) @omp_get_max_active_levels()
%31 = call i32 (...) @omp_get_level()
%32 = call i32 @omp_get_ancestor_thread_num(i32 0)
%33 = call i32 @omp_get_team_size(i32 0)
%34 = call i32 (...) @omp_get_active_level()
%35 = call i32 (...) @omp_get_wtime()
%36 = call i32 (...) @omp_get_wtick()
%37 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%38 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@omp_sched_static = global i32 0
@str = [20 x i8] c"omp_init_lock(i) \00"
@str.2 = [58 x i8] c"omp_init_lock(i)\22test\22omp_init_lock(i)omp_init_lock(i)\22\22\22\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @omp_init_lock(i32* %1)
%10 = call i32 @omp_init_nest_lock(i32* %2)
%11 = call i32 @omp_set_lock(i32* %1)
%12 = call i32 @omp_set_nest_lock(i32* %2)
%13 = call i32 @omp_unset_lock(i32* %1)
%14 = call i32 @omp_unset_nest_lock(i32* %2)
%15 = call i32 @omp_test_lock(i32* %1)
%16 = call i32 @omp_test_nest_lock(i32* %2)
%17 = call i32 @omp_destroy_lock(i32* %1)
%18 = call i32 @omp_destroy_nest_lock(i32* %2)
%19 = call i32 @omp_set_num_threads(i32 4)
%20 = call i32 @omp_set_dynamic(i32 0)
%21 = load i32, i32* @omp_sched_static
%22 = call i32 @omp_set_schedule(i32 %21, i32 1)
%23 = call i32 @omp_set_nested(i32 0)
%24 = call i32 @omp_set_max_active_levels(i32 2)
%25 = call i32 (...) @omp_get_num_threads()
%26 = call i32 (...) @omp_get_max_threads()
%27 = call i32 (...) @omp_get_thread_num()
%28 = call i32 (...) @omp_get_num_procs()
%29 = call i32 (...) @omp_in_parallel()
%30 = call i32 (...) @omp_get_nested()
%31 = call i32 (...) @omp_get_dynamic()
%32 = call i32 @omp_get_schedule(i32* %3, i32* %4)
%33 = call i32 (...) @omp_get_thread_limit()
%34 = call i32 (...) @omp_get_max_active_levels()
%35 = call i32 (...) @omp_get_level()
%36 = call i32 @omp_get_ancestor_thread_num(i32 0)
%37 = call i32 @omp_get_team_size(i32 0)
%38 = call i32 (...) @omp_get_active_level()
%39 = call i32 (...) @omp_get_wtime()
%40 = call i32 (...) @omp_get_wtick()
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%42 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}