#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__ power_of_ten(int);
int test_positive() {
  return power_of_ten(1) && power_of_ten(10) && power_of_ten(100) &&
         power_of_ten(1000) && power_of_ten(10000) && power_of_ten(100000);
}


x86 assembly (clang, -O0):
<test_positive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <power_of_ten@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     11b8 <test_positive+0xa8>
mov    $0xa,%edi
call   1030 <power_of_ten@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     11b8 <test_positive+0xa8>
mov    $0x64,%edi
call   1030 <power_of_ten@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     11b8 <test_positive+0xa8>
mov    $0x3e8,%edi
call   1030 <power_of_ten@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     11b8 <test_positive+0xa8>
mov    $0x2710,%edi
call   1030 <power_of_ten@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     11b8 <test_positive+0xa8>
mov    $0x186a0,%edi
call   1030 <power_of_ten@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_positive>:
push   %rbx
mov    $0x1,%edi
call   1030 <power_of_ten@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1170 <test_positive+0x60>
mov    $0xa,%edi
call   1030 <power_of_ten@plt>
test   %rax,%rax
je     1170 <test_positive+0x60>
mov    $0x64,%edi
call   1030 <power_of_ten@plt>
test   %rax,%rax
je     1170 <test_positive+0x60>
mov    $0x3e8,%edi
call   1030 <power_of_ten@plt>
test   %rax,%rax
je     1170 <test_positive+0x60>
mov    $0x2710,%edi
call   1030 <power_of_ten@plt>
test   %rax,%rax
je     1170 <test_positive+0x60>
mov    $0x186a0,%edi
call   1030 <power_of_ten@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_positive() {
%1 = call i64 @power_of_ten(i32 1)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %18
3: ; preds = %0
%4 = call i64 @power_of_ten(i32 10)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %18
6: ; preds = %3
%7 = call i64 @power_of_ten(i32 100)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = call i64 @power_of_ten(i32 1000)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = call i64 @power_of_ten(i32 10000)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = call i64 @power_of_ten(i32 100000)
%17 = icmp ne i64 %16, 0
br label %18
18: ; preds = %15, %12, %9, %6, %3, %0
%19 = phi i1 [ false, %12 ], [ false, %9 ], [ false, %6 ], [ false, %3 ], [ false, %0 ], [ %17, %15 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @test_positive() {
%1 = tail call i64 @power_of_ten(i32 1)
%2 = icmp eq i64 %1, 0
br i1 %2, label %19, label %3
3: ; preds = %0
%4 = tail call i64 @power_of_ten(i32 10)
%5 = icmp eq i64 %4, 0
br i1 %5, label %19, label %6
6: ; preds = %3
%7 = tail call i64 @power_of_ten(i32 100)
%8 = icmp eq i64 %7, 0
br i1 %8, label %19, label %9
9: ; preds = %6
%10 = tail call i64 @power_of_ten(i32 1000)
%11 = icmp eq i64 %10, 0
br i1 %11, label %19, label %12
12: ; preds = %9
%13 = tail call i64 @power_of_ten(i32 10000)
%14 = icmp eq i64 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %12
%16 = tail call i64 @power_of_ten(i32 100000)
%17 = icmp ne i64 %16, 0
%18 = zext i1 %17 to i32
br label %19
19: ; preds = %15, %12, %9, %6, %3, %0
%20 = phi i32 [ 0, %12 ], [ 0, %9 ], [ 0, %6 ], [ 0, %3 ], [ 0, %0 ], [ %18, %15 ]
ret i32 %20
}