#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 i;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int toupper1(int);
void bool_test() {
  int *s, a, b, t, f, i;
  a = 0;
  s = (void *)0;
  printf("!s=%d\n", !s);
  if (!s || !s[0])
    a = 1;
  printf("a=%d\n", a);
  printf("a=%d %d %d\n", 0 || 0, 0 || 1, 1 || 1);
  printf("a=%d %d %d\n", 0 && 0, 0 && 1, 1 && 1);
  printf("a=%d %d\n", 1 ? 1 : 0, 0 ? 1 : 0);
  printf("a1\n");
  printf("a2\n");
  printf("a4\n");
  a = 4;
  printf("b=%d\n", a + (0 ? 1 : a / 2));
  a = 10;
  b = 10;
  a = (a + b) * ((a < b) ? ((b - a) * (a - b)) : a + b);
  printf("a=%d\n", a);
  t = 1;
  f = 0;
  a = 32;
  printf("exp=%d\n", f == (32 <= a && a <= 3));
  printf("r=%d\n", (t || f) + (t && f));
  {
    int aspect_on;
    int aspect_native = 65536;
    double bfu_aspect = 1.0;
    int aspect;
    for (aspect_on = 0; aspect_on < 2; aspect_on++) {
      aspect = aspect_on ? (aspect_native * bfu_aspect + 0.5) : 65535UL;
      printf("aspect=%d\n", aspect);
    }
  }
  {
    static int v1 = 34 ?: -1;
    static int v2 = 0 ?: -1;
    int a = 30;
    printf("%d %d\n", v1, v2);
    printf("%d %d\n", a - 30 ?: a * 2, a + 1 ?: a * 2);
  }
  for (i = 0; i < 256; i++) {
    if (toupper1(i) != (('a' <= (i) && (i) <= 'z') ? 'A' + ((i) - 'a') : (i)))
      printf("error %d\n", i);
  }
}


x86 assembly (clang, -O0):
<bool_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0xc(%rbp)
movq   $0x0,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x8(%rbp)
je     116f <bool_test+0x4f>
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1176 <bool_test+0x56>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe97(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe80(%rip),%rdi
xor    %edx,%edx
mov    $0x1,%ecx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe75(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe55(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x4,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    %eax,%esi
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xa,-0xc(%rbp)
movl   $0xa,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1253 <bool_test+0x133>
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x10(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x40(%rbp)
jmp    125c <bool_test+0x13c>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x40(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xdad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x20,-0xc(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x48(%rbp)
xor    %eax,%eax
mov    $0x20,%ecx
cmp    -0xc(%rbp),%ecx
mov    %al,-0x41(%rbp)
jg     12b1 <bool_test+0x191>
cmpl   $0x3,-0xc(%rbp)
setle  %al
mov    %al,-0x41(%rbp)
mov    -0x48(%rbp),%eax
mov    -0x41(%rbp),%cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xd7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%al
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x49(%rbp)
jne    12ee <bool_test+0x1ce>
cmpl   $0x0,-0x18(%rbp)
setne  %al
mov    %al,-0x49(%rbp)
mov    -0x49(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x50(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x14(%rbp)
mov    %al,-0x4a(%rbp)
je     1312 <bool_test+0x1f2>
cmpl   $0x0,-0x18(%rbp)
setne  %al
mov    %al,-0x4a(%rbp)
mov    -0x50(%rbp),%esi
mov    -0x4a(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    %eax,%esi
lea    0xd2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x10000,-0x24(%rbp)
movsd  0xcc4(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x2,-0x20(%rbp)
jge    13bd <bool_test+0x29d>
cmpl   $0x0,-0x20(%rbp)
je     1380 <bool_test+0x260>
cvtsi2sdl -0x24(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc9e(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1392 <bool_test+0x272>
movsd  0xc80(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1392 <bool_test+0x272>
movsd  -0x58(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
lea    0xcb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1348 <bool_test+0x228>
movl   $0x1e,-0x38(%rbp)
mov    0x2c66(%rip),%esi
mov    0x2c64(%rip),%edx
lea    0xc53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%eax
sub    $0x1e,%eax
mov    %eax,-0x5c(%rbp)
cmp    $0x0,%eax
je     13fb <bool_test+0x2db>
mov    -0x5c(%rbp),%eax
mov    %eax,-0x60(%rbp)
jmp    1404 <bool_test+0x2e4>
mov    -0x38(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
cmp    $0x0,%eax
je     1427 <bool_test+0x307>
mov    -0x64(%rbp),%eax
mov    %eax,-0x6c(%rbp)
jmp    1430 <bool_test+0x310>
mov    -0x38(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x68(%rbp),%esi
mov    -0x6c(%rbp),%edx
lea    0xbed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x100,-0x1c(%rbp)
jge    14c4 <bool_test+0x3a4>
mov    -0x1c(%rbp),%edi
call   1040 <toupper1@plt>
mov    %eax,-0x70(%rbp)
mov    $0x61,%eax
cmp    -0x1c(%rbp),%eax
jg     148c <bool_test+0x36c>
cmpl   $0x7a,-0x1c(%rbp)
jg     148c <bool_test+0x36c>
mov    -0x1c(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x74(%rbp)
jmp    1492 <bool_test+0x372>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x70(%rbp),%eax
mov    -0x74(%rbp),%ecx
cmp    %ecx,%eax
je     14b1 <bool_test+0x391>
mov    -0x1c(%rbp),%esi
lea    0xbbb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14b6 <bool_test+0x396>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    144b <bool_test+0x32b>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bool_test>:
push   %rbp
push   %r14
push   %rbx
lea    0xec5(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb9(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea9(%rip),%rbp
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe85(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
lea    0xe99(%rip),%rdi
call   1030 <puts@plt>
lea    0xe90(%rip),%rdi
call   1030 <puts@plt>
lea    0xe55(%rip),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x190,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe39(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe2e(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe21(%rip),%rbx
mov    %rbx,%rdi
mov    $0xffff,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x10000,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdd8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x22,%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3c,%esi
mov    $0x1f,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xffffff9f,%ebx
lea    0xdd3(%rip),%r14
jmp    127b <bool_test+0x14b>
add    $0x1,%ebx
cmp    $0x9f,%ebx
je     12a0 <bool_test+0x170>
lea    0x61(%rbx),%ebp
mov    %ebp,%edi
call   1050 <toupper1@plt>
lea    0x41(%rbx),%ecx
cmp    $0x1a,%ebx
cmovae %ebp,%ecx
cmp    %ecx,%eax
je     1270 <bool_test+0x140>
mov    %r14,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1270 <bool_test+0x140>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"!s=%d\0A\00"
@.str.1 = [6 x i8] c"a=%d\0A\00"
@.str.2 = [12 x i8] c"a=%d %d %d\0A\00"
@.str.3 = [9 x i8] c"a=%d %d\0A\00"
@.str.4 = [4 x i8] c"a1\0A\00"
@.str.5 = [4 x i8] c"a2\0A\00"
@.str.6 = [4 x i8] c"a4\0A\00"
@.str.7 = [6 x i8] c"b=%d\0A\00"
@.str.8 = [8 x i8] c"exp=%d\0A\00"
@.str.9 = [6 x i8] c"r=%d\0A\00"
@.str.10 = [11 x i8] c"aspect=%d\0A\00"
@bool_test.v1 = internal global i32 34
@bool_test.v2 = internal global i32 -1
@.str.11 = [7 x i8] c"%d %d\0A\00"
@.str.12 = [10 x i8] c"error %d\0A\00"
define void @bool_test() {
%1 = alloca i32*
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %2
store i32* null, i32** %1
%12 = load i32*, i32** %1
%13 = icmp ne i32* %12, null
%14 = xor i1 %13, true
%15 = zext i1 %14 to i32
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = load i32*, i32** %1
%18 = icmp ne i32* %17, null
br i1 %18, label %19, label %24
19: ; preds = %0
%20 = load i32*, i32** %1
%21 = getelementptr inbounds i32, i32* %20, i64 0
%22 = load i32, i32* %21
%23 = icmp ne i32 %22, 0
br i1 %23, label %25, label %24
24: ; preds = %19, %0
store i32 1, i32* %2
br label %25
25: ; preds = %24, %19
%26 = load i32, i32* %2
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %26)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 1, i32 1)
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0, i32 1)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 1, i32 0)
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
store i32 4, i32* %2
%34 = load i32, i32* %2
%35 = load i32, i32* %2
%36 = sdiv i32 %35, 2
%37 = add nsw i32 %34, %36
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 %37)
store i32 10, i32* %2
store i32 10, i32* %3
%39 = load i32, i32* %2
%40 = load i32, i32* %3
%41 = add nsw i32 %39, %40
%42 = load i32, i32* %2
%43 = load i32, i32* %3
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %53
45: ; preds = %25
%46 = load i32, i32* %3
%47 = load i32, i32* %2
%48 = sub nsw i32 %46, %47
%49 = load i32, i32* %2
%50 = load i32, i32* %3
%51 = sub nsw i32 %49, %50
%52 = mul nsw i32 %48, %51
br label %57
53: ; preds = %25
%54 = load i32, i32* %2
%55 = load i32, i32* %3
%56 = add nsw i32 %54, %55
br label %57
57: ; preds = %53, %45
%58 = phi i32 [ %52, %45 ], [ %56, %53 ]
%59 = mul nsw i32 %41, %58
store i32 %59, i32* %2
%60 = load i32, i32* %2
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %60)
store i32 1, i32* %4
store i32 0, i32* %5
store i32 32, i32* %2
%62 = load i32, i32* %5
%63 = load i32, i32* %2
%64 = icmp sle i32 32, %63
br i1 %64, label %65, label %68
65: ; preds = %57
%66 = load i32, i32* %2
%67 = icmp sle i32 %66, 3
br label %68
68: ; preds = %65, %57
%69 = phi i1 [ false, %57 ], [ %67, %65 ]
%70 = zext i1 %69 to i32
%71 = icmp eq i32 %62, %70
%72 = zext i1 %71 to i32
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 %72)
%74 = load i32, i32* %4
%75 = icmp ne i32 %74, 0
br i1 %75, label %79, label %76
76: ; preds = %68
%77 = load i32, i32* %5
%78 = icmp ne i32 %77, 0
br label %79
79: ; preds = %76, %68
%80 = phi i1 [ true, %68 ], [ %78, %76 ]
%81 = zext i1 %80 to i32
%82 = load i32, i32* %4
%83 = icmp ne i32 %82, 0
br i1 %83, label %84, label %87
84: ; preds = %79
%85 = load i32, i32* %5
%86 = icmp ne i32 %85, 0
br label %87
87: ; preds = %84, %79
%88 = phi i1 [ false, %79 ], [ %86, %84 ]
%89 = zext i1 %88 to i32
%90 = add nsw i32 %81, %89
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %90)
store i32 65536, i32* %8
store double 1.000000e+00, double* %9
store i32 0, i32* %7
br label %92
92: ; preds = %109, %87
%93 = load i32, i32* %7
%94 = icmp slt i32 %93, 2
br i1 %94, label %95, label %112
95: ; preds = %92
%96 = load i32, i32* %7
%97 = icmp ne i32 %96, 0
br i1 %97, label %98, label %103
98: ; preds = %95
%99 = load i32, i32* %8
%100 = sitofp i32 %99 to double
%101 = load double, double* %9
%102 = call double @llvm.fmuladd.f64(double %100, double %101, double 5.000000e-01)
br label %104
103: ; preds = %95
br label %104
104: ; preds = %103, %98
%105 = phi double [ %102, %98 ], [ 6.553500e+04, %103 ]
%106 = fptosi double %105 to i32
store i32 %106, i32* %10
%107 = load i32, i32* %10
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 %107)
br label %109
109: ; preds = %104
%110 = load i32, i32* %7
%111 = add nsw i32 %110, 1
store i32 %111, i32* %7
br label %92
112: ; preds = %92
store i32 30, i32* %11
%113 = load i32, i32* @bool_test.v1
%114 = load i32, i32* @bool_test.v2
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 %113, i32 %114)
%116 = load i32, i32* %11
%117 = sub nsw i32 %116, 30
%118 = icmp ne i32 %117, 0
br i1 %118, label %119, label %120
119: ; preds = %112
br label %123
120: ; preds = %112
%121 = load i32, i32* %11
%122 = mul nsw i32 %121, 2
br label %123
123: ; preds = %120, %119
%124 = phi i32 [ %117, %119 ], [ %122, %120 ]
%125 = load i32, i32* %11
%126 = add nsw i32 %125, 1
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %129
128: ; preds = %123
br label %132
129: ; preds = %123
%130 = load i32, i32* %11
%131 = mul nsw i32 %130, 2
br label %132
132: ; preds = %129, %128
%133 = phi i32 [ %126, %128 ], [ %131, %129 ]
%134 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 %124, i32 %133)
store i32 0, i32* %6
br label %135
135: ; preds = %159, %132
%136 = load i32, i32* %6
%137 = icmp slt i32 %136, 256
br i1 %137, label %138, label %162
138: ; preds = %135
%139 = load i32, i32* %6
%140 = call i32 @toupper1(i32 %139)
%141 = load i32, i32* %6
%142 = icmp sle i32 97, %141
br i1 %142, label %143, label %150
143: ; preds = %138
%144 = load i32, i32* %6
%145 = icmp sle i32 %144, 122
br i1 %145, label %146, label %150
146: ; preds = %143
%147 = load i32, i32* %6
%148 = sub nsw i32 %147, 97
%149 = add nsw i32 65, %148
br label %152
150: ; preds = %143, %138
%151 = load i32, i32* %6
br label %152
152: ; preds = %150, %146
%153 = phi i32 [ %149, %146 ], [ %151, %150 ]
%154 = icmp ne i32 %140, %153
br i1 %154, label %155, label %158
155: ; preds = %152
%156 = load i32, i32* %6
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %156)
br label %158
158: ; preds = %155, %152
br label %159
159: ; preds = %158
%160 = load i32, i32* %6
%161 = add nsw i32 %160, 1
store i32 %161, i32* %6
br label %135
162: ; preds = %135
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"!s=%d\0A\00"
@.str.1 = [6 x i8] c"a=%d\0A\00"
@.str.2 = [12 x i8] c"a=%d %d %d\0A\00"
@.str.3 = [9 x i8] c"a=%d %d\0A\00"
@.str.7 = [6 x i8] c"b=%d\0A\00"
@.str.8 = [8 x i8] c"exp=%d\0A\00"
@.str.9 = [6 x i8] c"r=%d\0A\00"
@.str.10 = [11 x i8] c"aspect=%d\0A\00"
@.str.11 = [7 x i8] c"%d %d\0A\00"
@.str.12 = [10 x i8] c"error %d\0A\00"
@str = [3 x i8] c"a1\00"
@str.13 = [3 x i8] c"a2\00"
@str.14 = [3 x i8] c"a4\00"
define void @bool_test() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 1, i32 1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 0, i32 1)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 1, i32 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.13, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.14, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i32 6)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 400)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0), i32 1)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 1)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 65535)
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i32 65536)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 34, i32 -1)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i32 60, i32 31)
br label %17
17: ; preds = %0, %27
%18 = phi i32 [ 0, %0 ], [ %28, %27 ]
%19 = tail call i32 @toupper1(i32 %18)
%20 = add nsw i32 %18, -97
%21 = icmp ult i32 %20, 26
%22 = add nsw i32 %18, -32
%23 = select i1 %21, i32 %22, i32 %18
%24 = icmp eq i32 %19, %23
br i1 %24, label %27, label %25
25: ; preds = %17
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %18)
br label %27
27: ; preds = %17, %25
%28 = add nuw nsw i32 %18, 1
%29 = icmp eq i32 %28, 256
br i1 %29, label %30, label %17
30: ; preds = %27
ret void
}