#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 *);
scalar_t__ test_block_size1();
scalar_t__ test_block_size2();
int main() {
  if (test_block_size1() == 0)
    printf("test1 - PASS\n");
  else
    printf("test1 - FAIL\n");
  if (test_block_size2() == 0)
    printf("test2 - PASS\n");
  else
    printf("test2 - FAIL\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_block_size1@plt>
cmp    $0x0,%rax
jne    1161 <main+0x31>
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
jmp    116d <main+0x3d>
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <test_block_size2@plt>
cmp    $0x0,%rax
jne    118f <main+0x5f>
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
jmp    119b <main+0x6b>
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_block_size1@plt>
test   %rax,%rax
lea    0xee5(%rip),%rax
lea    0xeb7(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <test_block_size2@plt>
test   %rax,%rax
lea    0xeb7(%rip),%rax
lea    0xea3(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"test1 - PASS\0A\00"
@.str.1 = [14 x i8] c"test1 - FAIL\0A\00"
@.str.2 = [14 x i8] c"test2 - PASS\0A\00"
@.str.3 = [14 x i8] c"test2 - FAIL\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @test_block_size1()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = call i64 (...) @test_block_size2()
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %15
13: ; preds = %8
%14 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"test1 - FAIL\00"
@str.4 = [13 x i8] c"test2 - FAIL\00"
@str.5 = [13 x i8] c"test2 - PASS\00"
@str.6 = [13 x i8] c"test1 - PASS\00"
define i32 @main() {
%1 = tail call i64 (...) @test_block_size1()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.6, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
%5 = tail call i64 (...) @test_block_size2()
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str.4, i64 0, i64 0)
%8 = tail call i32 @puts(i8* dereferenceable(1) %7)
ret i32 0
}