#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 /*<<< orphan*/ s;

/* Variables and functions */
int Platform_Halt(int);
void Strings_Cap(unsigned char *s, long long s__len) {
  int i;
  i = 0;
  while (s[(((unsigned long long)(i) < (unsigned long long)(s__len))
                ? i
                : (Platform_Halt(-2), 0))] != 0x00) {
    if (('a' <= s[(((unsigned long long)(i) < (unsigned long long)(s__len))
                       ? i
                       : (Platform_Halt(-2), 0))] &&
         s[(((unsigned long long)(i) < (unsigned long long)(s__len))
                ? i
                : (Platform_Halt(-2), 0))] <= 'z')) {
      s[(((unsigned long long)(i) < (unsigned long long)(s__len))
             ? i
             : (Platform_Halt(-2), 0))] =
          ((unsigned char)((s[(((unsigned long long)(i) <
                                (unsigned long long)(s__len))
                                   ? i
                                   : (Platform_Halt(-2), 0))]) &
                           0x5f));
    }
    i += 1;
  }
}


x86 assembly (clang, -O0):
<Strings_Cap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1148 <Strings_Cap+0x38>
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1157 <Strings_Cap+0x47>
mov    $0xfffffffe,%edi
call   1030 <Platform_Halt@plt>
xor    %eax,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1292 <Strings_Cap+0x182>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    118f <Strings_Cap+0x7f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    119e <Strings_Cap+0x8e>
mov    $0xfffffffe,%edi
call   1030 <Platform_Halt@plt>
xor    %eax,%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jg     1284 <Strings_Cap+0x174>
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    11da <Strings_Cap+0xca>
mov    -0x14(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    11e9 <Strings_Cap+0xd9>
mov    $0xfffffffe,%edi
call   1030 <Platform_Halt@plt>
xor    %eax,%eax
mov    %eax,-0x44(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x44(%rbp),%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x7a,%eax
jg     1284 <Strings_Cap+0x174>
mov    -0x8(%rbp),%rax
mov    %rax,-0x50(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1221 <Strings_Cap+0x111>
mov    -0x14(%rbp),%eax
mov    %eax,-0x54(%rbp)
jmp    1230 <Strings_Cap+0x120>
mov    $0xfffffffe,%edi
call   1030 <Platform_Halt@plt>
xor    %eax,%eax
mov    %eax,-0x54(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
and    $0x5f,%eax
mov    %al,-0x61(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x60(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1265 <Strings_Cap+0x155>
mov    -0x14(%rbp),%eax
mov    %eax,-0x68(%rbp)
jmp    1274 <Strings_Cap+0x164>
mov    $0xfffffffe,%edi
call   1030 <Platform_Halt@plt>
xor    %eax,%eax
mov    %eax,-0x68(%rbp)
mov    -0x60(%rbp),%rax
mov    -0x61(%rbp),%dl
mov    -0x68(%rbp),%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <Strings_Cap+0x17>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Strings_Cap>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
xor    %r12d,%r12d
jmp    113d <Strings_Cap+0x2d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
and    $0x5f,%bl
mov    %eax,%eax
mov    %bl,(%r15,%rax,1)
add    $0x1,%r12
cmp    %r14,%r12
jae    1160 <Strings_Cap+0x50>
movzbl (%r15,%r12,1),%ebx
test   %bl,%bl
je     11ac <Strings_Cap+0x9c>
lea    -0x61(%rbx),%ecx
mov    %r12,%rax
cmp    $0x1a,%cl
jb     1130 <Strings_Cap+0x20>
jmp    1139 <Strings_Cap+0x29>
nopl   0x0(%rax,%rax,1)
mov    $0xfffffffe,%edi
call   1030 <Platform_Halt@plt>
cmpb   $0x0,(%r15)
je     11ac <Strings_Cap+0x9c>
mov    $0xfffffffe,%edi
call   1030 <Platform_Halt@plt>
cmpb   $0x61,(%r15)
jb     1139 <Strings_Cap+0x29>
mov    $0xfffffffe,%edi
call   1030 <Platform_Halt@plt>
cmpb   $0x7a,(%r15)
ja     1139 <Strings_Cap+0x29>
mov    $0xfffffffe,%edi
call   1030 <Platform_Halt@plt>
movzbl (%r15),%ebx
mov    $0xfffffffe,%edi
call   1030 <Platform_Halt@plt>
xor    %eax,%eax
jmp    1130 <Strings_Cap+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @Strings_Cap(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
store i32 0, i32* %5
br label %6
6: ; preds = %88, %2
%7 = load i8*, i8** %3
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = load i64, i64* %4
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %6
%13 = load i32, i32* %5
br label %16
14: ; preds = %6
%15 = call i32 @Platform_Halt(i32 -2)
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ 0, %14 ]
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %7, i64 %18
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %91
23: ; preds = %16
%24 = load i8*, i8** %3
%25 = load i32, i32* %5
%26 = sext i32 %25 to i64
%27 = load i64, i64* %4
%28 = icmp ult i64 %26, %27
br i1 %28, label %29, label %31
29: ; preds = %23
%30 = load i32, i32* %5
br label %33
31: ; preds = %23
%32 = call i32 @Platform_Halt(i32 -2)
br label %33
33: ; preds = %31, %29
%34 = phi i32 [ %30, %29 ], [ 0, %31 ]
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %24, i64 %35
%37 = load i8, i8* %36
%38 = zext i8 %37 to i32
%39 = icmp sle i32 97, %38
br i1 %39, label %40, label %88
40: ; preds = %33
%41 = load i8*, i8** %3
%42 = load i32, i32* %5
%43 = sext i32 %42 to i64
%44 = load i64, i64* %4
%45 = icmp ult i64 %43, %44
br i1 %45, label %46, label %48
46: ; preds = %40
%47 = load i32, i32* %5
br label %50
48: ; preds = %40
%49 = call i32 @Platform_Halt(i32 -2)
br label %50
50: ; preds = %48, %46
%51 = phi i32 [ %47, %46 ], [ 0, %48 ]
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8, i8* %41, i64 %52
%54 = load i8, i8* %53
%55 = zext i8 %54 to i32
%56 = icmp sle i32 %55, 122
br i1 %56, label %57, label %88
57: ; preds = %50
%58 = load i8*, i8** %3
%59 = load i32, i32* %5
%60 = sext i32 %59 to i64
%61 = load i64, i64* %4
%62 = icmp ult i64 %60, %61
br i1 %62, label %63, label %65
63: ; preds = %57
%64 = load i32, i32* %5
br label %67
65: ; preds = %57
%66 = call i32 @Platform_Halt(i32 -2)
br label %67
67: ; preds = %65, %63
%68 = phi i32 [ %64, %63 ], [ 0, %65 ]
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i8, i8* %58, i64 %69
%71 = load i8, i8* %70
%72 = zext i8 %71 to i32
%73 = and i32 %72, 95
%74 = trunc i32 %73 to i8
%75 = load i8*, i8** %3
%76 = load i32, i32* %5
%77 = sext i32 %76 to i64
%78 = load i64, i64* %4
%79 = icmp ult i64 %77, %78
br i1 %79, label %80, label %82
80: ; preds = %67
%81 = load i32, i32* %5
br label %84
82: ; preds = %67
%83 = call i32 @Platform_Halt(i32 -2)
br label %84
84: ; preds = %82, %80
%85 = phi i32 [ %81, %80 ], [ 0, %82 ]
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i8, i8* %75, i64 %86
store i8 %74, i8* %87
br label %88
88: ; preds = %84, %50, %33
%89 = load i32, i32* %5
%90 = add nsw i32 %89, 1
store i32 %90, i32* %5
br label %6
91: ; preds = %16
ret void
}

LLVM IR (-O2):
define void @Strings_Cap(i8* nocapture %0, i64 %1) {
br label %3
3: ; preds = %35, %2
%4 = phi i64 [ %36, %35 ], [ 0, %2 ]
%5 = icmp ult i64 %4, %1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 %4
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %37, label %14
10: ; preds = %3
%11 = tail call i32 @Platform_Halt(i32 -2)
%12 = load i8, i8* %0
%13 = icmp eq i8 %12, 0
br i1 %13, label %37, label %17
14: ; preds = %6
%15 = add i8 %8, -97
%16 = icmp ult i8 %15, 26
br i1 %16, label %29, label %35
17: ; preds = %10
%18 = tail call i32 @Platform_Halt(i32 -2)
%19 = load i8, i8* %0
%20 = icmp ugt i8 %19, 96
br i1 %20, label %21, label %35
21: ; preds = %17
%22 = tail call i32 @Platform_Halt(i32 -2)
%23 = load i8, i8* %0
%24 = icmp ult i8 %23, 123
br i1 %24, label %25, label %35
25: ; preds = %21
%26 = tail call i32 @Platform_Halt(i32 -2)
%27 = load i8, i8* %0
%28 = tail call i32 @Platform_Halt(i32 -2)
br label %29
29: ; preds = %14, %25
%30 = phi i8 [ %27, %25 ], [ %8, %14 ]
%31 = phi i64 [ 0, %25 ], [ %4, %14 ]
%32 = and i8 %30, 95
%33 = and i64 %31, 4294967295
%34 = getelementptr inbounds i8, i8* %0, i64 %33
store i8 %32, i8* %34
br label %35
35: ; preds = %21, %17, %29, %14
%36 = add nuw i64 %4, 1
br label %3
37: ; preds = %10, %6
ret void
}