int convert_lower_case(argc, argv)
int argc;
char *argv[];
{
  int i;
  for (i = 0; i < argc; i++) {
    lower_case(argv[i]);
    if (strcmp(argv[i], "-mixed") == 0) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<convert_lower_case>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1195 <convert_lower_case+0x75>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1040 <lower_case@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe98(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1182 <convert_lower_case+0x62>
movl   $0x1,-0x4(%rbp)
jmp    119c <convert_lower_case+0x7c>
jmp    1187 <convert_lower_case+0x67>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <convert_lower_case+0x16>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_lower_case>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1164 <convert_lower_case+0x44>
mov    %rsi,%r12
mov    %edi,%r15d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r12,%rbx,8),%rdi
xor    %eax,%eax
call   1040 <lower_case@plt>
mov    (%r12,%rbx,8),%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1168 <convert_lower_case+0x48>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1140 <convert_lower_case+0x20>
xor    %eax,%eax
jmp    116d <convert_lower_case+0x4d>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"-mixed\00"
define i32 @convert_lower_case(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %27, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %30
11: ; preds = %7
%12 = load i8**, i8*** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @lower_case to i32 (i8*, ...)*)(i8* %16)
%18 = load i8**, i8*** %5
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
%22 = load i8*, i8** %21
%23 = call i32 @strcmp(i8* %22, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %11
store i32 1, i32* %3
br label %31
26: ; preds = %11
br label %27
27: ; preds = %26
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %7
30: ; preds = %7
store i32 0, i32* %3
br label %31
31: ; preds = %30, %25
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
@.str = [7 x i8] c"-mixed\00"
define i32 @convert_lower_case(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %17
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %16, %5
br i1 %7, label %17, label %8
8: ; preds = %4, %6
%9 = phi i64 [ 0, %4 ], [ %16, %6 ]
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
%12 = tail call i32 (i8*, ...) bitcast (i32 (...)* @lower_case to i32 (i8*, ...)*)(i8* %11)
%13 = load i8*, i8** %10
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
%16 = add nuw nsw i64 %9, 1
br i1 %15, label %17, label %6
17: ; preds = %8, %6, %2
%18 = phi i32 [ 0, %2 ], [ 0, %6 ], [ 1, %8 ]
ret i32 %18
}