int max_str_len(char *val_a, char *val_b) {
  int a, b;
  a = strlen(val_a);
  b = strlen(val_b);
  do {
    if (3 >= 3 && 3 != 9) {
      printf("%d:%s(): ", 139, __FUNCTION__);
      printf("max_str_len(): a (%d) b (%d).\n", a, b);
    }
  } while (0);
  if (a > b)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<max_str_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x20(%rbp)
lea    0xeb1(%rip),%rdi
mov    $0x8b,%esi
lea    0xeaf(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    118d <max_str_len+0x6d>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1193 <max_str_len+0x73>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_str_len>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %rax,%rbx
lea    0xebe(%rip),%rdi
lea    0xec1(%rip),%rdx
mov    $0x8b,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeba(%rip),%rdi
mov    %r15d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    %ebx,%r15d
cmovg  %r15d,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d:%s(): \00"
@__FUNCTION__.max_str_len = [12 x i8] c"max_str_len\00"
@.str.1 = [31 x i8] c"max_str_len(): a (%d) b (%d).\0A\00"
define i32 @max_str_len(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = trunc i64 %9 to i32
store i32 %10, i32* %6
%11 = load i8*, i8** %5
%12 = call i64 @strlen(i8* %11)
%13 = trunc i64 %12 to i32
store i32 %13, i32* %7
br label %14
14: ; preds = %2
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 139, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.max_str_len, i64 0, i64 0))
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %17)
br label %19
19: ; preds = %14
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = icmp sgt i32 %20, %21
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = load i32, i32* %6
store i32 %24, i32* %3
br label %27
25: ; preds = %19
%26 = load i32, i32* %7
store i32 %26, i32* %3
br label %27
27: ; preds = %25, %23
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d:%s(): \00"
@__FUNCTION__.max_str_len = [12 x i8] c"max_str_len\00"
@.str.1 = [31 x i8] c"max_str_len(): a (%d) b (%d).\0A\00"
define i32 @max_str_len(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = trunc i64 %3 to i32
%5 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%6 = trunc i64 %5 to i32
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 139, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.max_str_len, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %6)
%9 = icmp sgt i32 %4, %6
%10 = select i1 %9, i32 %4, i32 %6
ret i32 %10
}