#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 */
char *test_geolocation();
char *test_read();
char *test_write();
char *all_tests() {
  do {
    char *message = test_write();
    if (message)
      return message;
  } while (0);
  do {
    char *message = test_read();
    if (message)
      return message;
  } while (0);
  do {
    char *message = test_geolocation();
    if (message)
      return message;
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<all_tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <test_write@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115b <all_tests+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11c2 <all_tests+0x92>
jmp    1160 <all_tests+0x30>
jmp    1165 <all_tests+0x35>
mov    $0x0,%al
call   1040 <test_read@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1188 <all_tests+0x58>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11c2 <all_tests+0x92>
jmp    118d <all_tests+0x5d>
jmp    1192 <all_tests+0x62>
mov    $0x0,%al
call   1050 <test_geolocation@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     11b5 <all_tests+0x85>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11c2 <all_tests+0x92>
jmp    11ba <all_tests+0x8a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_tests>:
push   %rax
xor    %eax,%eax
call   1030 <test_write@plt>
test   %rax,%rax
jne    1149 <all_tests+0x19>
xor    %eax,%eax
call   1040 <test_read@plt>
test   %rax,%rax
je     114b <all_tests+0x1b>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1050 <test_geolocation@plt>

LLVM IR (-O0):
define i8* @all_tests() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
br label %5
5: ; preds = %0
%6 = call i8* (...) @test_write()
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = load i8*, i8** %2
store i8* %10, i8** %1
br label %29
11: ; preds = %5
br label %12
12: ; preds = %11
br label %13
13: ; preds = %12
%14 = call i8* (...) @test_read()
store i8* %14, i8** %3
%15 = load i8*, i8** %3
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %19
17: ; preds = %13
%18 = load i8*, i8** %3
store i8* %18, i8** %1
br label %29
19: ; preds = %13
br label %20
20: ; preds = %19
br label %21
21: ; preds = %20
%22 = call i8* (...) @test_geolocation()
store i8* %22, i8** %4
%23 = load i8*, i8** %4
%24 = icmp ne i8* %23, null
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = load i8*, i8** %4
store i8* %26, i8** %1
br label %29
27: ; preds = %21
br label %28
28: ; preds = %27
store i8* null, i8** %1
br label %29
29: ; preds = %28, %25, %17, %9
%30 = load i8*, i8** %1
ret i8* %30
}

LLVM IR (-O2):
define i8* @all_tests() {
%1 = tail call i8* (...) @test_write()
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i8* (...) @test_read()
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i8* (...) @test_geolocation()
br label %8
8: ; preds = %6, %3, %0
%9 = phi i8* [ %1, %0 ], [ %4, %3 ], [ %7, %6 ]
ret i8* %9
}