#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 strlen(char *);
char unsigned_range(int, int);
void test_elim_range(char c) {
  do {
    char a[] = "1";
    a[0] = unsigned_range((1), (2));
    if (!(strlen(a) == 1))
      do {
        extern void call_in_true_branch_not_eliminated_on_line_55(void);
        call_in_true_branch_not_eliminated_on_line_55();
      } while (0);
    else
      (void)0;
  } while (0);
  do {
    char a[] = "1";
    a[0] = unsigned_range((1), (127));
    if (!(strlen(a) == 1))
      do {
        extern void call_in_true_branch_not_eliminated_on_line_56(void);
        call_in_true_branch_not_eliminated_on_line_56();
      } while (0);
    else
      (void)0;
  } while (0);
  do {
    char a[] = "1";
    a[0] = unsigned_range(('0'), ('9'));
    if (!(strlen(a) == 1))
      do {
        extern void call_in_true_branch_not_eliminated_on_line_57(void);
        call_in_true_branch_not_eliminated_on_line_57();
      } while (0);
    else
      (void)0;
  } while (0);
  do {
    char a[] = "12";
    a[0] = unsigned_range((1), (127));
    if (!(strlen(a) == 2))
      do {
        extern void call_in_true_branch_not_eliminated_on_line_59(void);
        call_in_true_branch_not_eliminated_on_line_59();
      } while (0);
    else
      (void)0;
  } while (0);
  do {
    char a[] = "12";
    a[1] = unsigned_range((1), (127));
    if (!(strlen(a) == 2))
      do {
        extern void call_in_true_branch_not_eliminated_on_line_60(void);
        call_in_true_branch_not_eliminated_on_line_60();
      } while (0);
    else
      (void)0;
  } while (0);
  do {
    char a[] = "123";
    a[0] = unsigned_range((1), (9));
    if (!(strlen(a) == 3))
      do {
        extern void call_in_true_branch_not_eliminated_on_line_62(void);
        call_in_true_branch_not_eliminated_on_line_62();
      } while (0);
    else
      (void)0;
  } while (0);
  do {
    char a[] = "123";
    a[1] = unsigned_range((10), (99));
    if (!(strlen(a) == 3))
      do {
        extern void call_in_true_branch_not_eliminated_on_line_63(void);
        call_in_true_branch_not_eliminated_on_line_63();
      } while (0);
    else
      (void)0;
  } while (0);
  do {
    char a[] = "123";
    a[2] = unsigned_range((100), (127));
    if (!(strlen(a) == 3))
      do {
        extern void call_in_true_branch_not_eliminated_on_line_64(void);
        call_in_true_branch_not_eliminated_on_line_64();
      } while (0);
    else
      (void)0;
  } while (0);
}


x86 assembly (clang, -O0):
<test_elim_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0xe4b(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1080 <unsigned_range@plt>
mov    %al,-0x3(%rbp)
lea    -0x3(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
je     11ec <test_elim_range+0x4c>
jmp    11e2 <test_elim_range+0x42>
call   1090 <call_in_true_branch_not_eliminated_on_line_55@plt>
jmp    11f1 <test_elim_range+0x51>
jmp    11f1 <test_elim_range+0x51>
jmp    11f6 <test_elim_range+0x56>
jmp    11fb <test_elim_range+0x5b>
mov    0xdfe(%rip),%ax
mov    %ax,-0x5(%rbp)
mov    $0x1,%edi
mov    $0x7f,%esi
call   1080 <unsigned_range@plt>
mov    %al,-0x5(%rbp)
lea    -0x5(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
je     1239 <test_elim_range+0x99>
jmp    122f <test_elim_range+0x8f>
call   1040 <call_in_true_branch_not_eliminated_on_line_56@plt>
jmp    123e <test_elim_range+0x9e>
jmp    123e <test_elim_range+0x9e>
jmp    1243 <test_elim_range+0xa3>
jmp    1248 <test_elim_range+0xa8>
mov    0xdb1(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    $0x30,%edi
mov    $0x39,%esi
call   1080 <unsigned_range@plt>
mov    %al,-0x7(%rbp)
lea    -0x7(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
je     1286 <test_elim_range+0xe6>
jmp    127c <test_elim_range+0xdc>
call   1070 <call_in_true_branch_not_eliminated_on_line_57@plt>
jmp    128b <test_elim_range+0xeb>
jmp    128b <test_elim_range+0xeb>
jmp    1290 <test_elim_range+0xf0>
jmp    1295 <test_elim_range+0xf5>
mov    0xd66(%rip),%ax
mov    %ax,-0xa(%rbp)
mov    0xd5e(%rip),%al
mov    %al,-0x8(%rbp)
mov    $0x1,%edi
mov    $0x7f,%esi
call   1080 <unsigned_range@plt>
mov    %al,-0xa(%rbp)
lea    -0xa(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x2,%eax
je     12dc <test_elim_range+0x13c>
jmp    12d2 <test_elim_range+0x132>
call   1060 <call_in_true_branch_not_eliminated_on_line_59@plt>
jmp    12e1 <test_elim_range+0x141>
jmp    12e1 <test_elim_range+0x141>
jmp    12e6 <test_elim_range+0x146>
jmp    12eb <test_elim_range+0x14b>
mov    0xd10(%rip),%ax
mov    %ax,-0xd(%rbp)
mov    0xd08(%rip),%al
mov    %al,-0xb(%rbp)
mov    $0x1,%edi
mov    $0x7f,%esi
call   1080 <unsigned_range@plt>
mov    %al,-0xc(%rbp)
lea    -0xd(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x2,%eax
je     1332 <test_elim_range+0x192>
jmp    1328 <test_elim_range+0x188>
call   10b0 <call_in_true_branch_not_eliminated_on_line_60@plt>
jmp    1337 <test_elim_range+0x197>
jmp    1337 <test_elim_range+0x197>
jmp    133c <test_elim_range+0x19c>
jmp    1341 <test_elim_range+0x1a1>
mov    0xcbe(%rip),%eax
mov    %eax,-0x11(%rbp)
mov    $0x1,%edi
mov    $0x9,%esi
call   1080 <unsigned_range@plt>
mov    %al,-0x11(%rbp)
lea    -0x11(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x3,%eax
je     137d <test_elim_range+0x1dd>
jmp    1373 <test_elim_range+0x1d3>
call   10a0 <call_in_true_branch_not_eliminated_on_line_62@plt>
jmp    1382 <test_elim_range+0x1e2>
jmp    1382 <test_elim_range+0x1e2>
jmp    1387 <test_elim_range+0x1e7>
jmp    138c <test_elim_range+0x1ec>
mov    0xc73(%rip),%eax
mov    %eax,-0x15(%rbp)
mov    $0xa,%edi
mov    $0x63,%esi
call   1080 <unsigned_range@plt>
mov    %al,-0x14(%rbp)
lea    -0x15(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x3,%eax
je     13c8 <test_elim_range+0x228>
jmp    13be <test_elim_range+0x21e>
call   1050 <call_in_true_branch_not_eliminated_on_line_63@plt>
jmp    13cd <test_elim_range+0x22d>
jmp    13cd <test_elim_range+0x22d>
jmp    13d2 <test_elim_range+0x232>
jmp    13d7 <test_elim_range+0x237>
mov    0xc28(%rip),%eax
mov    %eax,-0x19(%rbp)
mov    $0x64,%edi
mov    $0x7f,%esi
call   1080 <unsigned_range@plt>
mov    %al,-0x17(%rbp)
lea    -0x19(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x3,%eax
je     1413 <test_elim_range+0x273>
jmp    1409 <test_elim_range+0x269>
call   10c0 <call_in_true_branch_not_eliminated_on_line_64@plt>
jmp    1418 <test_elim_range+0x278>
jmp    1418 <test_elim_range+0x278>
jmp    141d <test_elim_range+0x27d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_elim_range>:
push   %rax
movw   $0x31,0x4(%rsp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1080 <unsigned_range@plt>
mov    %al,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
je     11cf <test_elim_range+0x2f>
call   1090 <call_in_true_branch_not_eliminated_on_line_55@plt>
movw   $0x31,0x4(%rsp)
mov    $0x1,%edi
mov    $0x7f,%esi
call   1080 <unsigned_range@plt>
mov    %al,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
je     11fd <test_elim_range+0x5d>
call   1040 <call_in_true_branch_not_eliminated_on_line_56@plt>
movw   $0x31,0x4(%rsp)
mov    $0x30,%edi
mov    $0x39,%esi
call   1080 <unsigned_range@plt>
mov    %al,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
je     122b <test_elim_range+0x8b>
call   1070 <call_in_true_branch_not_eliminated_on_line_57@plt>
movb   $0x0,0x6(%rsp)
movw   $0x3231,0x4(%rsp)
mov    $0x1,%edi
mov    $0x7f,%esi
call   1080 <unsigned_range@plt>
mov    %al,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <strlen@plt>
cmp    $0x2,%eax
je     125e <test_elim_range+0xbe>
call   1060 <call_in_true_branch_not_eliminated_on_line_59@plt>
movb   $0x0,0x6(%rsp)
movw   $0x3231,0x4(%rsp)
mov    $0x1,%edi
mov    $0x7f,%esi
call   1080 <unsigned_range@plt>
mov    %al,0x5(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <strlen@plt>
cmp    $0x2,%eax
je     1291 <test_elim_range+0xf1>
call   10b0 <call_in_true_branch_not_eliminated_on_line_60@plt>
movl   $0x333231,0x4(%rsp)
mov    $0x1,%edi
mov    $0x9,%esi
call   1080 <unsigned_range@plt>
mov    %al,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <strlen@plt>
cmp    $0x3,%eax
je     12c0 <test_elim_range+0x120>
call   10a0 <call_in_true_branch_not_eliminated_on_line_62@plt>
movl   $0x333231,0x4(%rsp)
mov    $0xa,%edi
mov    $0x63,%esi
call   1080 <unsigned_range@plt>
mov    %al,0x5(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <strlen@plt>
cmp    $0x3,%eax
je     12ef <test_elim_range+0x14f>
call   1050 <call_in_true_branch_not_eliminated_on_line_63@plt>
movl   $0x333231,0x4(%rsp)
mov    $0x64,%edi
mov    $0x7f,%esi
call   1080 <unsigned_range@plt>
mov    %al,0x6(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <strlen@plt>
cmp    $0x3,%eax
je     131e <test_elim_range+0x17e>
call   10c0 <call_in_true_branch_not_eliminated_on_line_64@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.test_elim_range.a = [2 x i8] c"1\00"
@__const.test_elim_range.a.1 = [2 x i8] c"1\00"
@__const.test_elim_range.a.2 = [2 x i8] c"1\00"
@__const.test_elim_range.a.3 = [3 x i8] c"12\00"
@__const.test_elim_range.a.4 = [3 x i8] c"12\00"
@__const.test_elim_range.a.5 = [4 x i8] c"123\00"
@__const.test_elim_range.a.6 = [4 x i8] c"123\00"
@__const.test_elim_range.a.7 = [4 x i8] c"123\00"
define void @test_elim_range(i8 signext %0) {
%2 = alloca i8
%3 = alloca [2 x i8]
%4 = alloca [2 x i8]
%5 = alloca [2 x i8]
%6 = alloca [3 x i8]
%7 = alloca [3 x i8]
%8 = alloca [4 x i8]
%9 = alloca [4 x i8]
%10 = alloca [4 x i8]
store i8 %0, i8* %2
br label %11
11: ; preds = %1
%12 = bitcast [2 x i8]* %3 to i8*
%13 = call signext i8 @unsigned_range(i32 1, i32 2)
%14 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %13, i8* %14
%15 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%16 = call i32 @strlen(i8* %15)
%17 = icmp eq i32 %16, 1
br i1 %17, label %21, label %18
18: ; preds = %11
br label %19
19: ; preds = %18
br label %20
20: ; preds = %19
br label %22
21: ; preds = %11
br label %22
22: ; preds = %21, %20
br label %23
23: ; preds = %22
br label %24
24: ; preds = %23
%25 = bitcast [2 x i8]* %4 to i8*
%26 = call signext i8 @unsigned_range(i32 1, i32 127)
%27 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
store i8 %26, i8* %27
%28 = getelementptr inbounds [2 x i8], [2 x i8]* %4, i64 0, i64 0
%29 = call i32 @strlen(i8* %28)
%30 = icmp eq i32 %29, 1
br i1 %30, label %34, label %31
31: ; preds = %24
br label %32
32: ; preds = %31
br label %33
33: ; preds = %32
br label %35
34: ; preds = %24
br label %35
35: ; preds = %34, %33
br label %36
36: ; preds = %35
br label %37
37: ; preds = %36
%38 = bitcast [2 x i8]* %5 to i8*
%39 = call signext i8 @unsigned_range(i32 48, i32 57)
%40 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %39, i8* %40
%41 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%42 = call i32 @strlen(i8* %41)
%43 = icmp eq i32 %42, 1
br i1 %43, label %47, label %44
44: ; preds = %37
br label %45
45: ; preds = %44
br label %46
46: ; preds = %45
br label %48
47: ; preds = %37
br label %48
48: ; preds = %47, %46
br label %49
49: ; preds = %48
br label %50
50: ; preds = %49
%51 = bitcast [3 x i8]* %6 to i8*
%52 = call signext i8 @unsigned_range(i32 1, i32 127)
%53 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
store i8 %52, i8* %53
%54 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%55 = call i32 @strlen(i8* %54)
%56 = icmp eq i32 %55, 2
br i1 %56, label %60, label %57
57: ; preds = %50
br label %58
58: ; preds = %57
br label %59
59: ; preds = %58
br label %61
60: ; preds = %50
br label %61
61: ; preds = %60, %59
br label %62
62: ; preds = %61
br label %63
63: ; preds = %62
%64 = bitcast [3 x i8]* %7 to i8*
%65 = call signext i8 @unsigned_range(i32 1, i32 127)
%66 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 1
store i8 %65, i8* %66
%67 = getelementptr inbounds [3 x i8], [3 x i8]* %7, i64 0, i64 0
%68 = call i32 @strlen(i8* %67)
%69 = icmp eq i32 %68, 2
br i1 %69, label %73, label %70
70: ; preds = %63
br label %71
71: ; preds = %70
br label %72
72: ; preds = %71
br label %74
73: ; preds = %63
br label %74
74: ; preds = %73, %72
br label %75
75: ; preds = %74
br label %76
76: ; preds = %75
%77 = bitcast [4 x i8]* %8 to i8*
%78 = call signext i8 @unsigned_range(i32 1, i32 9)
%79 = getelementptr inbounds [4 x i8], [4 x i8]* %8, i64 0, i64 0
store i8 %78, i8* %79
%80 = getelementptr inbounds [4 x i8], [4 x i8]* %8, i64 0, i64 0
%81 = call i32 @strlen(i8* %80)
%82 = icmp eq i32 %81, 3
br i1 %82, label %86, label %83
83: ; preds = %76
br label %84
84: ; preds = %83
br label %85
85: ; preds = %84
br label %87
86: ; preds = %76
br label %87
87: ; preds = %86, %85
br label %88
88: ; preds = %87
br label %89
89: ; preds = %88
%90 = bitcast [4 x i8]* %9 to i8*
%91 = call signext i8 @unsigned_range(i32 10, i32 99)
%92 = getelementptr inbounds [4 x i8], [4 x i8]* %9, i64 0, i64 1
store i8 %91, i8* %92
%93 = getelementptr inbounds [4 x i8], [4 x i8]* %9, i64 0, i64 0
%94 = call i32 @strlen(i8* %93)
%95 = icmp eq i32 %94, 3
br i1 %95, label %99, label %96
96: ; preds = %89
br label %97
97: ; preds = %96
br label %98
98: ; preds = %97
br label %100
99: ; preds = %89
br label %100
100: ; preds = %99, %98
br label %101
101: ; preds = %100
br label %102
102: ; preds = %101
%103 = bitcast [4 x i8]* %10 to i8*
%104 = call signext i8 @unsigned_range(i32 100, i32 127)
%105 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 2
store i8 %104, i8* %105
%106 = getelementptr inbounds [4 x i8], [4 x i8]* %10, i64 0, i64 0
%107 = call i32 @strlen(i8* %106)
%108 = icmp eq i32 %107, 3
br i1 %108, label %112, label %109
109: ; preds = %102
br label %110
110: ; preds = %109
br label %111
111: ; preds = %110
br label %113
112: ; preds = %102
br label %113
113: ; preds = %112, %111
br label %114
114: ; preds = %113
ret void
}

LLVM IR (-O2):
@__const.test_elim_range.a.4 = [3 x i8] c"12\00"
define void @test_elim_range(i8 signext %0) {
%2 = alloca i16
%3 = alloca i16
%4 = alloca i16
%5 = alloca [3 x i8]
%6 = alloca [3 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = bitcast i32* %8 to [4 x i8]*
%10 = alloca i32
%11 = bitcast i32* %10 to [4 x i8]*
%12 = bitcast i16* %2 to i8*
store i16 49, i16* %2
%13 = tail call signext i8 @unsigned_range(i32 1, i32 2)
store i8 %13, i8* %12
%14 = call i32 @strlen(i8* %12)
%15 = icmp eq i32 %14, 1
br i1 %15, label %17, label %16
16: ; preds = %1
br label %17
17: ; preds = %1, %16
%18 = bitcast i16* %3 to i8*
store i16 49, i16* %3
%19 = call signext i8 @unsigned_range(i32 1, i32 127)
store i8 %19, i8* %18
%20 = call i32 @strlen(i8* %18)
%21 = icmp eq i32 %20, 1
br i1 %21, label %23, label %22
22: ; preds = %17
br label %23
23: ; preds = %17, %22
%24 = bitcast i16* %4 to i8*
store i16 49, i16* %4
%25 = call signext i8 @unsigned_range(i32 48, i32 57)
store i8 %25, i8* %24
%26 = call i32 @strlen(i8* %24)
%27 = icmp eq i32 %26, 1
br i1 %27, label %29, label %28
28: ; preds = %23
br label %29
29: ; preds = %23, %28
%30 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%31 = call signext i8 @unsigned_range(i32 1, i32 127)
store i8 %31, i8* %30
%32 = call i32 @strlen(i8* %30)
%33 = icmp eq i32 %32, 2
br i1 %33, label %35, label %34
34: ; preds = %29
br label %35
35: ; preds = %29, %34
%36 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 0
%37 = call signext i8 @unsigned_range(i32 1, i32 127)
%38 = getelementptr inbounds [3 x i8], [3 x i8]* %6, i64 0, i64 1
store i8 %37, i8* %38
%39 = call i32 @strlen(i8* %36)
%40 = icmp eq i32 %39, 2
br i1 %40, label %42, label %41
41: ; preds = %35
br label %42
42: ; preds = %35, %41
%43 = bitcast i32* %7 to i8*
store i32 3355185, i32* %7
%44 = call signext i8 @unsigned_range(i32 1, i32 9)
store i8 %44, i8* %43
%45 = call i32 @strlen(i8* %43)
%46 = icmp eq i32 %45, 3
br i1 %46, label %48, label %47
47: ; preds = %42
br label %48
48: ; preds = %42, %47
%49 = bitcast i32* %8 to i8*
store i32 3355185, i32* %8
%50 = call signext i8 @unsigned_range(i32 10, i32 99)
%51 = getelementptr inbounds [4 x i8], [4 x i8]* %9, i64 0, i64 1
store i8 %50, i8* %51
%52 = call i32 @strlen(i8* %49)
%53 = icmp eq i32 %52, 3
br i1 %53, label %55, label %54
54: ; preds = %48
br label %55
55: ; preds = %48, %54
%56 = bitcast i32* %10 to i8*
store i32 3355185, i32* %10
%57 = call signext i8 @unsigned_range(i32 100, i32 127)
%58 = getelementptr inbounds [4 x i8], [4 x i8]* %11, i64 0, i64 2
store i8 %57, i8* %58
%59 = call i32 @strlen(i8* %56)
%60 = icmp eq i32 %59, 3
br i1 %60, label %62, label %61
61: ; preds = %55
br label %62
62: ; preds = %55, %61
ret void
}