#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 *, char *, ...);
int /*<<< orphan*/ test_body_wo_raise();
int /*<<< orphan*/ test_catch_all_wo_raise();
int /*<<< orphan*/ test_nested_catch_w_reraise();
int /*<<< orphan*/ test_nested_w_2_finally();
int /*<<< orphan*/ test_pthread_isolation();
int /*<<< orphan*/ test_raise_in_catch();
int /*<<< orphan*/ test_raise_in_finally();
int /*<<< orphan*/ test_raise_in_finally_uncaught();
int /*<<< orphan*/ test_raise_in_finally_wo_catch();
int /*<<< orphan*/ test_raise_w_catch();
int /*<<< orphan*/ test_raise_w_nested_body();
int /*<<< orphan*/ test_return();
int /*<<< orphan*/ test_return_in_body();
int /*<<< orphan*/ test_return_in_catch();
int /*<<< orphan*/ test_uncaught_exc_handler();
int main(int argc, char **argv) {
  printf("%s %s ...\n", argv[0], "test_body_wo_raise");
  test_body_wo_raise();
  printf("%s %s  OK\n", argv[0], "test_body_wo_raise");
  printf("%s %s ...\n", argv[0], "test_raise_w_catch");
  test_raise_w_catch();
  printf("%s %s  OK\n", argv[0], "test_raise_w_catch");
  printf("%s %s ...\n", argv[0], "test_raise_w_nested_body");
  test_raise_w_nested_body();
  printf("%s %s  OK\n", argv[0], "test_raise_w_nested_body");
  printf("%s %s ...\n", argv[0], "test_nested_catch_w_reraise");
  test_nested_catch_w_reraise();
  printf("%s %s  OK\n", argv[0], "test_nested_catch_w_reraise");
  printf("%s %s ...\n", argv[0], "test_nested_w_2_finally");
  test_nested_w_2_finally();
  printf("%s %s  OK\n", argv[0], "test_nested_w_2_finally");
  printf("%s %s ...\n", argv[0], "test_uncaught_exc_handler");
  test_uncaught_exc_handler();
  printf("%s %s  OK\n", argv[0], "test_uncaught_exc_handler");
  printf("%s %s ...\n", argv[0], "test_catch_all_wo_raise");
  test_catch_all_wo_raise();
  printf("%s %s  OK\n", argv[0], "test_catch_all_wo_raise");
  printf("%s %s ...\n", argv[0], "test_raise_in_catch");
  test_raise_in_catch();
  printf("%s %s  OK\n", argv[0], "test_raise_in_catch");
  printf("%s %s ...\n", argv[0], "test_raise_in_finally");
  test_raise_in_finally();
  printf("%s %s  OK\n", argv[0], "test_raise_in_finally");
  printf("%s %s ...\n", argv[0], "test_raise_in_finally_wo_catch");
  test_raise_in_finally_wo_catch();
  printf("%s %s  OK\n", argv[0], "test_raise_in_finally_wo_catch");
  printf("%s %s ...\n", argv[0], "test_raise_in_finally_uncaught");
  test_raise_in_finally_uncaught();
  printf("%s %s  OK\n", argv[0], "test_raise_in_finally_uncaught");
  printf("%s %s ...\n", argv[0], "test_return");
  test_return();
  printf("%s %s  OK\n", argv[0], "test_return");
  printf("%s %s ...\n", argv[0], "test_return_in_body");
  test_return_in_body();
  printf("%s %s  OK\n", argv[0], "test_return_in_body");
  printf("%s %s ...\n", argv[0], "test_return_in_catch");
  test_return_in_catch();
  printf("%s %s  OK\n", argv[0], "test_return_in_catch");
  printf("%s %s ...\n", argv[0], "test_pthread_isolation");
  test_pthread_isolation();
  printf("%s %s  OK\n", argv[0], "test_pthread_isolation");
  printf("%s ALL TESTS PASS\n", argv[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xddc(%rip),%rdi
lea    0xde0(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <test_body_wo_raise@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xdd7(%rip),%rdi
lea    0xdbd(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xd9d(%rip),%rdi
lea    0xdbf(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10c0 <test_raise_w_catch@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xd98(%rip),%rdi
lea    0xd9c(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xd5e(%rip),%rdi
lea    0xd93(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1110 <test_raise_w_nested_body@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xd59(%rip),%rdi
lea    0xd70(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xd1f(%rip),%rdi
lea    0xd6d(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <test_nested_catch_w_reraise@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xd1a(%rip),%rdi
lea    0xd4a(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xce0(%rip),%rdi
lea    0xd4a(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1090 <test_nested_w_2_finally@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xcdb(%rip),%rdi
lea    0xd27(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xca1(%rip),%rdi
lea    0xd23(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1100 <test_uncaught_exc_handler@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xc9c(%rip),%rdi
lea    0xd00(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xc62(%rip),%rdi
lea    0xcfe(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10e0 <test_catch_all_wo_raise@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xc5d(%rip),%rdi
lea    0xcdb(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xc23(%rip),%rdi
lea    0xcd7(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10a0 <test_raise_in_catch@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xc1e(%rip),%rdi
lea    0xcb4(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xbe4(%rip),%rdi
lea    0xcac(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <test_raise_in_finally@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xbdf(%rip),%rdi
lea    0xc89(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xba5(%rip),%rdi
lea    0xc83(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10f0 <test_raise_in_finally_wo_catch@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xba0(%rip),%rdi
lea    0xc60(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xb66(%rip),%rdi
lea    0xc63(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10d0 <test_raise_in_finally_uncaught@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xb61(%rip),%rdi
lea    0xc40(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xb27(%rip),%rdi
lea    0xc43(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   10b0 <test_return@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xb22(%rip),%rdi
lea    0xc20(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xae8(%rip),%rdi
lea    0xc10(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1080 <test_return_in_body@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xae3(%rip),%rdi
lea    0xbed(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xaa9(%rip),%rdi
lea    0xbe5(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <test_return_in_catch@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xaa4(%rip),%rdi
lea    0xbc2(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xa6a(%rip),%rdi
lea    0xbbb(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1120 <test_pthread_isolation@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xa65(%rip),%rdi
lea    0xb98(%rip),%rdx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xb9a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    (%rsi),%rsi
lea    0xdeb(%rip),%r14
lea    0xdef(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <test_body_wo_raise@plt>
mov    (%rbx),%rsi
lea    0xde4(%rip),%r15
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xdd8(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   10c0 <test_raise_w_catch@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xdbd(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1110 <test_raise_w_nested_body@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xda8(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <test_nested_catch_w_reraise@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xd96(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1090 <test_nested_w_2_finally@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xd80(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1100 <test_uncaught_exc_handler@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xd6c(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   10e0 <test_catch_all_wo_raise@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xd56(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   10a0 <test_raise_in_catch@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xd3c(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1070 <test_raise_in_finally@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xd24(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   10f0 <test_raise_in_finally_wo_catch@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xd15(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   10d0 <test_raise_in_finally_uncaught@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xd06(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   10b0 <test_return@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xce4(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1080 <test_return_in_body@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xcca(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <test_return_in_catch@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xcb1(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
call   1120 <test_pthread_isolation@plt>
mov    (%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xc9a(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%s %s ...\0A\00"
@.str.1 = [19 x i8] c"test_body_wo_raise\00"
@.str.2 = [11 x i8] c"%s %s OK\0A\00"
@.str.3 = [19 x i8] c"test_raise_w_catch\00"
@.str.4 = [25 x i8] c"test_raise_w_nested_body\00"
@.str.5 = [28 x i8] c"test_nested_catch_w_reraise\00"
@.str.6 = [24 x i8] c"test_nested_w_2_finally\00"
@.str.7 = [26 x i8] c"test_uncaught_exc_handler\00"
@.str.8 = [24 x i8] c"test_catch_all_wo_raise\00"
@.str.9 = [20 x i8] c"test_raise_in_catch\00"
@.str.10 = [22 x i8] c"test_raise_in_finally\00"
@.str.11 = [31 x i8] c"test_raise_in_finally_wo_catch\00"
@.str.12 = [31 x i8] c"test_raise_in_finally_uncaught\00"
@.str.13 = [12 x i8] c"test_return\00"
@.str.14 = [20 x i8] c"test_return_in_body\00"
@.str.15 = [21 x i8] c"test_return_in_catch\00"
@.str.16 = [23 x i8] c"test_pthread_isolation\00"
@.str.17 = [19 x i8] c"%s ALL TESTS PASS\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (...) @test_body_wo_raise()
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %13, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 0
%17 = load i8*, i8** %16
%18 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %17, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 (...) @test_raise_w_catch()
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 0
%22 = load i8*, i8** %21
%23 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %22, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 0
%26 = load i8*, i8** %25
%27 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %26, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%28 = call i32 (...) @test_raise_w_nested_body()
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 0
%31 = load i8*, i8** %30
%32 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %31, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 0
%35 = load i8*, i8** %34
%36 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %35, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%37 = call i32 (...) @test_nested_catch_w_reraise()
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 0
%40 = load i8*, i8** %39
%41 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %40, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 0
%44 = load i8*, i8** %43
%45 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %44, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%46 = call i32 (...) @test_nested_w_2_finally()
%47 = load i8**, i8*** %5
%48 = getelementptr inbounds i8*, i8** %47, i64 0
%49 = load i8*, i8** %48
%50 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %49, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 0
%53 = load i8*, i8** %52
%54 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %53, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%55 = call i32 (...) @test_uncaught_exc_handler()
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 0
%58 = load i8*, i8** %57
%59 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %58, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%60 = load i8**, i8*** %5
%61 = getelementptr inbounds i8*, i8** %60, i64 0
%62 = load i8*, i8** %61
%63 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %62, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%64 = call i32 (...) @test_catch_all_wo_raise()
%65 = load i8**, i8*** %5
%66 = getelementptr inbounds i8*, i8** %65, i64 0
%67 = load i8*, i8** %66
%68 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %67, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%69 = load i8**, i8*** %5
%70 = getelementptr inbounds i8*, i8** %69, i64 0
%71 = load i8*, i8** %70
%72 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %71, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%73 = call i32 (...) @test_raise_in_catch()
%74 = load i8**, i8*** %5
%75 = getelementptr inbounds i8*, i8** %74, i64 0
%76 = load i8*, i8** %75
%77 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %76, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%78 = load i8**, i8*** %5
%79 = getelementptr inbounds i8*, i8** %78, i64 0
%80 = load i8*, i8** %79
%81 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %80, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
%82 = call i32 (...) @test_raise_in_finally()
%83 = load i8**, i8*** %5
%84 = getelementptr inbounds i8*, i8** %83, i64 0
%85 = load i8*, i8** %84
%86 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %85, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
%87 = load i8**, i8*** %5
%88 = getelementptr inbounds i8*, i8** %87, i64 0
%89 = load i8*, i8** %88
%90 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %89, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
%91 = call i32 (...) @test_raise_in_finally_wo_catch()
%92 = load i8**, i8*** %5
%93 = getelementptr inbounds i8*, i8** %92, i64 0
%94 = load i8*, i8** %93
%95 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %94, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
%96 = load i8**, i8*** %5
%97 = getelementptr inbounds i8*, i8** %96, i64 0
%98 = load i8*, i8** %97
%99 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %98, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0))
%100 = call i32 (...) @test_raise_in_finally_uncaught()
%101 = load i8**, i8*** %5
%102 = getelementptr inbounds i8*, i8** %101, i64 0
%103 = load i8*, i8** %102
%104 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %103, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0))
%105 = load i8**, i8*** %5
%106 = getelementptr inbounds i8*, i8** %105, i64 0
%107 = load i8*, i8** %106
%108 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %107, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0))
%109 = call i32 (...) @test_return()
%110 = load i8**, i8*** %5
%111 = getelementptr inbounds i8*, i8** %110, i64 0
%112 = load i8*, i8** %111
%113 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %112, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0))
%114 = load i8**, i8*** %5
%115 = getelementptr inbounds i8*, i8** %114, i64 0
%116 = load i8*, i8** %115
%117 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %116, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0))
%118 = call i32 (...) @test_return_in_body()
%119 = load i8**, i8*** %5
%120 = getelementptr inbounds i8*, i8** %119, i64 0
%121 = load i8*, i8** %120
%122 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %121, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0))
%123 = load i8**, i8*** %5
%124 = getelementptr inbounds i8*, i8** %123, i64 0
%125 = load i8*, i8** %124
%126 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %125, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
%127 = call i32 (...) @test_return_in_catch()
%128 = load i8**, i8*** %5
%129 = getelementptr inbounds i8*, i8** %128, i64 0
%130 = load i8*, i8** %129
%131 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %130, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
%132 = load i8**, i8*** %5
%133 = getelementptr inbounds i8*, i8** %132, i64 0
%134 = load i8*, i8** %133
%135 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %134, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0))
%136 = call i32 (...) @test_pthread_isolation()
%137 = load i8**, i8*** %5
%138 = getelementptr inbounds i8*, i8** %137, i64 0
%139 = load i8*, i8** %138
%140 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %139, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0))
%141 = load i8**, i8*** %5
%142 = getelementptr inbounds i8*, i8** %141, i64 0
%143 = load i8*, i8** %142
%144 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), i8* %143)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s %s ...\0A\00"
@.str.1 = [19 x i8] c"test_body_wo_raise\00"
@.str.2 = [11 x i8] c"%s %s OK\0A\00"
@.str.3 = [19 x i8] c"test_raise_w_catch\00"
@.str.4 = [25 x i8] c"test_raise_w_nested_body\00"
@.str.5 = [28 x i8] c"test_nested_catch_w_reraise\00"
@.str.6 = [24 x i8] c"test_nested_w_2_finally\00"
@.str.7 = [26 x i8] c"test_uncaught_exc_handler\00"
@.str.8 = [24 x i8] c"test_catch_all_wo_raise\00"
@.str.9 = [20 x i8] c"test_raise_in_catch\00"
@.str.10 = [22 x i8] c"test_raise_in_finally\00"
@.str.11 = [31 x i8] c"test_raise_in_finally_wo_catch\00"
@.str.12 = [31 x i8] c"test_raise_in_finally_uncaught\00"
@.str.13 = [12 x i8] c"test_return\00"
@.str.14 = [20 x i8] c"test_return_in_body\00"
@.str.15 = [21 x i8] c"test_return_in_catch\00"
@.str.16 = [23 x i8] c"test_pthread_isolation\00"
@.str.17 = [19 x i8] c"%s ALL TESTS PASS\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (...) @test_body_wo_raise()
%6 = load i8*, i8** %1
%7 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%8 = load i8*, i8** %1
%9 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 (...) @test_raise_w_catch()
%11 = load i8*, i8** %1
%12 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %11, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%13 = load i8*, i8** %1
%14 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %13, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%15 = tail call i32 (...) @test_raise_w_nested_body()
%16 = load i8*, i8** %1
%17 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %16, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%18 = load i8*, i8** %1
%19 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %18, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%20 = tail call i32 (...) @test_nested_catch_w_reraise()
%21 = load i8*, i8** %1
%22 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %21, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.5, i64 0, i64 0))
%23 = load i8*, i8** %1
%24 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %23, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%25 = tail call i32 (...) @test_nested_w_2_finally()
%26 = load i8*, i8** %1
%27 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %26, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
%28 = load i8*, i8** %1
%29 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %28, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%30 = tail call i32 (...) @test_uncaught_exc_handler()
%31 = load i8*, i8** %1
%32 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %31, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0))
%33 = load i8*, i8** %1
%34 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %33, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%35 = tail call i32 (...) @test_catch_all_wo_raise()
%36 = load i8*, i8** %1
%37 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %36, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0))
%38 = load i8*, i8** %1
%39 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %38, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%40 = tail call i32 (...) @test_raise_in_catch()
%41 = load i8*, i8** %1
%42 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %41, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0))
%43 = load i8*, i8** %1
%44 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %43, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
%45 = tail call i32 (...) @test_raise_in_finally()
%46 = load i8*, i8** %1
%47 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %46, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
%48 = load i8*, i8** %1
%49 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %48, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
%50 = tail call i32 (...) @test_raise_in_finally_wo_catch()
%51 = load i8*, i8** %1
%52 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %51, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.11, i64 0, i64 0))
%53 = load i8*, i8** %1
%54 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %53, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0))
%55 = tail call i32 (...) @test_raise_in_finally_uncaught()
%56 = load i8*, i8** %1
%57 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %56, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.12, i64 0, i64 0))
%58 = load i8*, i8** %1
%59 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %58, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0))
%60 = tail call i32 (...) @test_return()
%61 = load i8*, i8** %1
%62 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %61, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0))
%63 = load i8*, i8** %1
%64 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %63, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0))
%65 = tail call i32 (...) @test_return_in_body()
%66 = load i8*, i8** %1
%67 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %66, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0))
%68 = load i8*, i8** %1
%69 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %68, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
%70 = tail call i32 (...) @test_return_in_catch()
%71 = load i8*, i8** %1
%72 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %71, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0))
%73 = load i8*, i8** %1
%74 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %73, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0))
%75 = tail call i32 (...) @test_pthread_isolation()
%76 = load i8*, i8** %1
%77 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %76, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.16, i64 0, i64 0))
%78 = load i8*, i8** %1
%79 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.17, i64 0, i64 0), i8* %78)
ret i32 0
}