#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 normalized_hex_string_length(char *);
int strlen(char *);
char *normalized_hex_string_length_01a() {
  char hex[] =
      "0xB300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2A3";
  int expected_length = strlen(hex) - 2;
  do {
    if (!(normalized_hex_string_length(hex) == expected_length))
      return "return the normalized length of strings with leading '0x's";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<normalized_hex_string_length_01a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x50(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x43,%edx
call   1050 <memcpy@plt>
lea    -0x50(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x2,%eax
mov    %eax,-0x54(%rbp)
lea    -0x50(%rbp),%rdi
call   1030 <normalized_hex_string_length@plt>
cmp    -0x54(%rbp),%eax
je     117e <normalized_hex_string_length_01a+0x4e>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    118b <normalized_hex_string_length_01a+0x5b>
jmp    1183 <normalized_hex_string_length_01a+0x53>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normalized_hex_string_length_01a>:
push   %rbp
push   %rbx
sub    $0x48,%rsp
movaps 0xf03(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee7(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeaf(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x334132,0x3f(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
add    $0xfffffffe,%ebp
mov    %rbx,%rdi
call   1030 <normalized_hex_string_length@plt>
xor    %ecx,%ecx
cmp    %ebp,%eax
lea    0xec3(%rip),%rax
cmovne %rax,%rcx
mov    %rcx,%rax
add    $0x48,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@__const.normalized_hex_string_length_01a.hex = [67 x i8] c"0xB300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2A3\00"
@.str = [59 x i8] c"return the normalized length of strings with leading '0x's\00"
define i8* @normalized_hex_string_length_01a() {
%1 = alloca i8*
%2 = alloca [67 x i8]
%3 = alloca i32
%4 = bitcast [67 x i8]* %2 to i8*
%5 = getelementptr inbounds [67 x i8], [67 x i8]* %2, i64 0, i64 0
%6 = call i32 @strlen(i8* %5)
%7 = sub nsw i32 %6, 2
store i32 %7, i32* %3
br label %8
8: ; preds = %0
%9 = getelementptr inbounds [67 x i8], [67 x i8]* %2, i64 0, i64 0
%10 = call i32 @normalized_hex_string_length(i8* %9)
%11 = load i32, i32* %3
%12 = icmp eq i32 %10, %11
br i1 %12, label %14, label %13
13: ; preds = %8
store i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8** %1
br label %16
14: ; preds = %8
br label %15
15: ; preds = %14
store i8* null, i8** %1
br label %16
16: ; preds = %15, %13
%17 = load i8*, i8** %1
ret i8* %17
}

LLVM IR (-O2):
@__const.normalized_hex_string_length_01a.hex = [67 x i8] c"0xB300562F8F9A961E158BDE2D4CCD2A64BB1D923208939714675BFFB17BBAF2A3\00"
@.str = [59 x i8] c"return the normalized length of strings with leading '0x's\00"
define i8* @normalized_hex_string_length_01a() {
%1 = alloca [67 x i8]
%2 = getelementptr inbounds [67 x i8], [67 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = add nsw i32 %3, -2
%5 = call i32 @normalized_hex_string_length(i8* %2)
%6 = icmp eq i32 %5, %4
%7 = select i1 %6, i8* null, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0)
ret i8* %7
}