signed int strupncmp(const char *a, const char *b, signed int n) {
  signed int tmp_post$1;
  signed int tmp_statement_expression$10;
  signed int tmp_if_expr$12;
  const signed int **return_value___ctype_toupper_loc$13;
  signed int tmp_statement_expression$14;
  signed int tmp_if_expr$16;
  const signed int **return_value___ctype_toupper_loc$17;
  signed int tmp_statement_expression$2;
  signed int tmp_if_expr$4;
  const signed int **return_value___ctype_toupper_loc$5;
  signed int tmp_statement_expression$6;
  signed int tmp_if_expr$8;
  const signed int **return_value___ctype_toupper_loc$9;
  do {
    tmp_post$1 = n;
    n = n - 1;
    if (!(tmp_post$1 > 0))
      goto __CPROVER_DUMP_L32;
    signed int strupncmp$$1$$1$$1$$__res;
    if ((_Bool)0) {
      if ((_Bool)0) {
        signed int strupncmp$$1$$1$$1$$1$$1$$__c = (signed int)*a;
        if (!(strupncmp$$1$$1$$1$$1$$1$$__c < -128)) {
          if (strupncmp$$1$$1$$1$$1$$1$$__c > 255)
            goto __CPROVER_DUMP_L2;
        } else {
        __CPROVER_DUMP_L2:;
          tmp_if_expr$12 = strupncmp$$1$$1$$1$$1$$1$$__c;
          goto __CPROVER_DUMP_L4;
        }
        const signed int **return_value___ctype_toupper_loc$11;
        return_value___ctype_toupper_loc$11 = __ctype_toupper_loc();
        tmp_if_expr$12 = (*return_value___ctype_toupper_loc$11)[(
            signed long int)strupncmp$$1$$1$$1$$1$$1$$__c];
      __CPROVER_DUMP_L4:;
        strupncmp$$1$$1$$1$$__res = tmp_if_expr$12;
      } else
        strupncmp$$1$$1$$1$$__res = toupper((signed int)*a);
    } else {
      return_value___ctype_toupper_loc$13 = __ctype_toupper_loc();
      strupncmp$$1$$1$$1$$__res = (*return_value___ctype_toupper_loc$13)[(
          signed long int)(signed int)*a];
    }
    tmp_statement_expression$10 = strupncmp$$1$$1$$1$$__res;
    signed int strupncmp$$1$$1$$2$$__res;
    if ((_Bool)0) {
      if ((_Bool)0) {
        signed int strupncmp$$1$$1$$2$$1$$1$$__c = (signed int)*b;
        if (!(strupncmp$$1$$1$$2$$1$$1$$__c < -128)) {
          if (strupncmp$$1$$1$$2$$1$$1$$__c > 255)
            goto __CPROVER_DUMP_L9;
        } else {
        __CPROVER_DUMP_L9:;
          tmp_if_expr$16 = strupncmp$$1$$1$$2$$1$$1$$__c;
          goto __CPROVER_DUMP_L11;
        }
        const signed int **return_value___ctype_toupper_loc$15;
        return_value___ctype_toupper_loc$15 = __ctype_toupper_loc();
        tmp_if_expr$16 = (*return_value___ctype_toupper_loc$15)[(
            signed long int)strupncmp$$1$$1$$2$$1$$1$$__c];
      __CPROVER_DUMP_L11:;
        strupncmp$$1$$1$$2$$__res = tmp_if_expr$16;
      } else
        strupncmp$$1$$1$$2$$__res = toupper((signed int)*b);
    } else {
      return_value___ctype_toupper_loc$17 = __ctype_toupper_loc();
      strupncmp$$1$$1$$2$$__res = (*return_value___ctype_toupper_loc$17)[(
          signed long int)(signed int)*b];
    }
    tmp_statement_expression$14 = strupncmp$$1$$1$$2$$__res;
    if (!(tmp_statement_expression$10 == tmp_statement_expression$14)) {
      signed int strupncmp$$1$$1$$3$$1$$__res;
      if ((_Bool)0) {
        if ((_Bool)0) {
          signed int strupncmp$$1$$1$$3$$1$$1$$1$$__c = (signed int)*b;
          if (!(strupncmp$$1$$1$$3$$1$$1$$1$$__c < -128)) {
            if (strupncmp$$1$$1$$3$$1$$1$$1$$__c > 255)
              goto __CPROVER_DUMP_L16;
          } else {
          __CPROVER_DUMP_L16:;
            tmp_if_expr$4 = strupncmp$$1$$1$$3$$1$$1$$1$$__c;
            goto __CPROVER_DUMP_L18;
          }
          const signed int **return_value___ctype_toupper_loc$3;
          return_value___ctype_toupper_loc$3 = __ctype_toupper_loc();
          tmp_if_expr$4 = (*return_value___ctype_toupper_loc$3)[(
              signed long int)strupncmp$$1$$1$$3$$1$$1$$1$$__c];
        __CPROVER_DUMP_L18:;
          strupncmp$$1$$1$$3$$1$$__res = tmp_if_expr$4;
        } else
          strupncmp$$1$$1$$3$$1$$__res = toupper((signed int)*b);
      } else {
        return_value___ctype_toupper_loc$5 = __ctype_toupper_loc();
        strupncmp$$1$$1$$3$$1$$__res = (*return_value___ctype_toupper_loc$5)[(
            signed long int)(signed int)*b];
      }
      tmp_statement_expression$2 = strupncmp$$1$$1$$3$$1$$__res;
      signed int strupncmp$$1$$1$$3$$2$$__res;
      if ((_Bool)0) {
        if ((_Bool)0) {
          signed int strupncmp$$1$$1$$3$$2$$1$$1$$__c = (signed int)*a;
          if (!(strupncmp$$1$$1$$3$$2$$1$$1$$__c < -128)) {
            if (strupncmp$$1$$1$$3$$2$$1$$1$$__c > 255)
              goto __CPROVER_DUMP_L23;
          } else {
          __CPROVER_DUMP_L23:;
            tmp_if_expr$8 = strupncmp$$1$$1$$3$$2$$1$$1$$__c;
            goto __CPROVER_DUMP_L25;
          }
          const signed int **return_value___ctype_toupper_loc$7;
          return_value___ctype_toupper_loc$7 = __ctype_toupper_loc();
          tmp_if_expr$8 = (*return_value___ctype_toupper_loc$7)[(
              signed long int)strupncmp$$1$$1$$3$$2$$1$$1$$__c];
        __CPROVER_DUMP_L25:;
          strupncmp$$1$$1$$3$$2$$__res = tmp_if_expr$8;
        } else
          strupncmp$$1$$1$$3$$2$$__res = toupper((signed int)*a);
      } else {
        return_value___ctype_toupper_loc$9 = __ctype_toupper_loc();
        strupncmp$$1$$1$$3$$2$$__res = (*return_value___ctype_toupper_loc$9)[(
            signed long int)(signed int)*a];
      }
      tmp_statement_expression$6 = strupncmp$$1$$1$$3$$2$$__res;
      return tmp_statement_expression$2 - tmp_statement_expression$6;
    }
    if ((signed int)*a == 0)
      return 0;
    a = a + 1l;
    b = b + 1l;
  } while ((_Bool)1);
__CPROVER_DUMP_L32:;
  return 0;
}


x86 assembly (clang, -O0):
<strupncmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x20(%rbp)
jg     1154 <strupncmp+0x34>
jmp    14f8 <strupncmp+0x3d8>
xor    %eax,%eax
test   $0x1,%al
jne    1163 <strupncmp+0x43>
jmp    11ea <strupncmp+0xca>
xor    %eax,%eax
test   $0x1,%al
jne    1172 <strupncmp+0x52>
jmp    11d6 <strupncmp+0xb6>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x68(%rbp)
cmpl   $0xffffff80,-0x68(%rbp)
jl     119d <strupncmp+0x7d>
cmpl   $0xff,-0x68(%rbp)
jle    1198 <strupncmp+0x78>
jmp    11a2 <strupncmp+0x82>
jmp    11ad <strupncmp+0x8d>
jmp    11a2 <strupncmp+0x82>
mov    -0x68(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    11cb <strupncmp+0xab>
mov    $0x0,%al
call   1030 <__ctype_toupper_loc@plt>
cltq
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
mov    (%rax),%rax
movslq -0x68(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x64(%rbp)
jmp    11e5 <strupncmp+0xc5>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <toupper@plt>
mov    %eax,-0x64(%rbp)
jmp    120e <strupncmp+0xee>
mov    $0x0,%al
call   1030 <__ctype_toupper_loc@plt>
cltq
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x24(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    1223 <strupncmp+0x103>
jmp    12aa <strupncmp+0x18a>
xor    %eax,%eax
test   $0x1,%al
jne    1232 <strupncmp+0x112>
jmp    1296 <strupncmp+0x176>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x78(%rbp)
cmpl   $0xffffff80,-0x78(%rbp)
jl     125d <strupncmp+0x13d>
cmpl   $0xff,-0x78(%rbp)
jle    1258 <strupncmp+0x138>
jmp    1262 <strupncmp+0x142>
jmp    126d <strupncmp+0x14d>
jmp    1262 <strupncmp+0x142>
mov    -0x78(%rbp),%eax
mov    %eax,-0x38(%rbp)
jmp    128b <strupncmp+0x16b>
mov    $0x0,%al
call   1030 <__ctype_toupper_loc@plt>
cltq
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
mov    (%rax),%rax
movslq -0x78(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x74(%rbp)
jmp    12a5 <strupncmp+0x185>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1040 <toupper@plt>
mov    %eax,-0x74(%rbp)
jmp    12ce <strupncmp+0x1ae>
mov    $0x0,%al
call   1030 <__ctype_toupper_loc@plt>
cltq
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x34(%rbp),%eax
je     14b0 <strupncmp+0x390>
xor    %eax,%eax
test   $0x1,%al
jne    12ef <strupncmp+0x1cf>
jmp    1391 <strupncmp+0x271>
xor    %eax,%eax
test   $0x1,%al
jne    12fe <strupncmp+0x1de>
jmp    137a <strupncmp+0x25a>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x88(%rbp)
cmpl   $0xffffff80,-0x88(%rbp)
jl     1332 <strupncmp+0x212>
cmpl   $0xff,-0x88(%rbp)
jle    132d <strupncmp+0x20d>
jmp    1337 <strupncmp+0x217>
jmp    1345 <strupncmp+0x225>
jmp    1337 <strupncmp+0x217>
mov    -0x88(%rbp),%eax
mov    %eax,-0x48(%rbp)
jmp    136c <strupncmp+0x24c>
mov    $0x0,%al
call   1030 <__ctype_toupper_loc@plt>
cltq
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
mov    (%rax),%rax
movslq -0x88(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x84(%rbp)
jmp    138c <strupncmp+0x26c>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1040 <toupper@plt>
mov    %eax,-0x84(%rbp)
jmp    13b8 <strupncmp+0x298>
mov    $0x0,%al
call   1030 <__ctype_toupper_loc@plt>
cltq
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x84(%rbp)
mov    -0x84(%rbp),%eax
mov    %eax,-0x44(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    13d0 <strupncmp+0x2b0>
jmp    1472 <strupncmp+0x352>
xor    %eax,%eax
test   $0x1,%al
jne    13df <strupncmp+0x2bf>
jmp    145b <strupncmp+0x33b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x98(%rbp)
cmpl   $0xffffff80,-0x98(%rbp)
jl     1413 <strupncmp+0x2f3>
cmpl   $0xff,-0x98(%rbp)
jle    140e <strupncmp+0x2ee>
jmp    1418 <strupncmp+0x2f8>
jmp    1426 <strupncmp+0x306>
jmp    1418 <strupncmp+0x2f8>
mov    -0x98(%rbp),%eax
mov    %eax,-0x58(%rbp)
jmp    144d <strupncmp+0x32d>
mov    $0x0,%al
call   1030 <__ctype_toupper_loc@plt>
cltq
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
mov    (%rax),%rax
movslq -0x98(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x94(%rbp)
jmp    146d <strupncmp+0x34d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <toupper@plt>
mov    %eax,-0x94(%rbp)
jmp    1499 <strupncmp+0x379>
mov    $0x0,%al
call   1030 <__ctype_toupper_loc@plt>
cltq
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x94(%rbp)
mov    -0x94(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x44(%rbp),%eax
sub    -0x54(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    14ff <strupncmp+0x3df>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    14cc <strupncmp+0x3ac>
movl   $0x0,-0x4(%rbp)
jmp    14ff <strupncmp+0x3df>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1136 <strupncmp+0x16>
jmp    14f3 <strupncmp+0x3d3>
jmp    14f8 <strupncmp+0x3d8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strupncmp>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %edx,%edx
jle    1176 <strupncmp+0x66>
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__ctype_toupper_loc@plt>
cltq
mov    (%rax),%rax
movsbq (%r15,%rbp,1),%rcx
mov    (%rax,%rcx,4),%r12d
xor    %eax,%eax
call   1030 <__ctype_toupper_loc@plt>
cltq
mov    (%rax),%rax
movsbq (%r14,%rbp,1),%rcx
cmp    (%rax,%rcx,4),%r12d
jne    117b <strupncmp+0x6b>
xor    %r12d,%r12d
cmpb   $0x0,(%r15,%rbp,1)
je     11a5 <strupncmp+0x95>
lea    -0x1(%rbx),%eax
add    $0x1,%rbp
cmp    $0x1,%ebx
mov    %eax,%ebx
jg     1130 <strupncmp+0x20>
jmp    11a5 <strupncmp+0x95>
xor    %r12d,%r12d
jmp    11a5 <strupncmp+0x95>
xor    %eax,%eax
call   1030 <__ctype_toupper_loc@plt>
cltq
mov    (%rax),%rax
movsbq (%r14,%rbp,1),%rcx
mov    (%rax,%rcx,4),%r12d
xor    %eax,%eax
call   1030 <__ctype_toupper_loc@plt>
cltq
mov    (%rax),%rax
movsbq (%r15,%rbp,1),%rcx
sub    (%rax,%rcx,4),%r12d
mov    %r12d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @strupncmp(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32**
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32**
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32**
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32**
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32**
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32**
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32**
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32**
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
br label %33
33: ; preds = %247, %3
%34 = load i32, i32* %7
store i32 %34, i32* %8
%35 = load i32, i32* %7
%36 = sub nsw i32 %35, 1
store i32 %36, i32* %7
%37 = load i32, i32* %8
%38 = icmp sgt i32 %37, 0
br i1 %38, label %40, label %39
39: ; preds = %33
br label %249
40: ; preds = %33
br i1 false, label %41, label %74
41: ; preds = %40
br i1 false, label %42, label %68
42: ; preds = %41
%43 = load i8*, i8** %5
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
store i32 %45, i32* %22
%46 = load i32, i32* %22
%47 = icmp slt i32 %46, -128
br i1 %47, label %53, label %48
48: ; preds = %42
%49 = load i32, i32* %22
%50 = icmp sgt i32 %49, 255
br i1 %50, label %51, label %52
51: ; preds = %48
br label %54
52: ; preds = %48
br label %56
53: ; preds = %42
br label %54
54: ; preds = %53, %51
%55 = load i32, i32* %22
store i32 %55, i32* %10
br label %66
56: ; preds = %52
%57 = call i32 (...) @__ctype_toupper_loc()
%58 = sext i32 %57 to i64
%59 = inttoptr i64 %58 to i32**
store i32** %59, i32*** %23
%60 = load i32**, i32*** %23
%61 = load i32*, i32** %60
%62 = load i32, i32* %22
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i32, i32* %61, i64 %63
%65 = load i32, i32* %64
store i32 %65, i32* %10
br label %66
66: ; preds = %56, %54
%67 = load i32, i32* %10
store i32 %67, i32* %21
br label %73
68: ; preds = %41
%69 = load i8*, i8** %5
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = call i32 @toupper(i32 %71)
store i32 %72, i32* %21
br label %73
73: ; preds = %68, %66
br label %86
74: ; preds = %40
%75 = call i32 (...) @__ctype_toupper_loc()
%76 = sext i32 %75 to i64
%77 = inttoptr i64 %76 to i32**
store i32** %77, i32*** %11
%78 = load i32**, i32*** %11
%79 = load i32*, i32** %78
%80 = load i8*, i8** %5
%81 = load i8, i8* %80
%82 = sext i8 %81 to i32
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds i32, i32* %79, i64 %83
%85 = load i32, i32* %84
store i32 %85, i32* %21
br label %86
86: ; preds = %74, %73
%87 = load i32, i32* %21
store i32 %87, i32* %9
br i1 false, label %88, label %121
88: ; preds = %86
br i1 false, label %89, label %115
89: ; preds = %88
%90 = load i8*, i8** %6
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
store i32 %92, i32* %25
%93 = load i32, i32* %25
%94 = icmp slt i32 %93, -128
br i1 %94, label %100, label %95
95: ; preds = %89
%96 = load i32, i32* %25
%97 = icmp sgt i32 %96, 255
br i1 %97, label %98, label %99
98: ; preds = %95
br label %101
99: ; preds = %95
br label %103
100: ; preds = %89
br label %101
101: ; preds = %100, %98
%102 = load i32, i32* %25
store i32 %102, i32* %13
br label %113
103: ; preds = %99
%104 = call i32 (...) @__ctype_toupper_loc()
%105 = sext i32 %104 to i64
%106 = inttoptr i64 %105 to i32**
store i32** %106, i32*** %26
%107 = load i32**, i32*** %26
%108 = load i32*, i32** %107
%109 = load i32, i32* %25
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds i32, i32* %108, i64 %110
%112 = load i32, i32* %111
store i32 %112, i32* %13
br label %113
113: ; preds = %103, %101
%114 = load i32, i32* %13
store i32 %114, i32* %24
br label %120
115: ; preds = %88
%116 = load i8*, i8** %6
%117 = load i8, i8* %116
%118 = sext i8 %117 to i32
%119 = call i32 @toupper(i32 %118)
store i32 %119, i32* %24
br label %120
120: ; preds = %115, %113
br label %133
121: ; preds = %86
%122 = call i32 (...) @__ctype_toupper_loc()
%123 = sext i32 %122 to i64
%124 = inttoptr i64 %123 to i32**
store i32** %124, i32*** %14
%125 = load i32**, i32*** %14
%126 = load i32*, i32** %125
%127 = load i8*, i8** %6
%128 = load i8, i8* %127
%129 = sext i8 %128 to i32
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i32, i32* %126, i64 %130
%132 = load i32, i32* %131
store i32 %132, i32* %24
br label %133
133: ; preds = %121, %120
%134 = load i32, i32* %24
store i32 %134, i32* %12
%135 = load i32, i32* %9
%136 = load i32, i32* %12
%137 = icmp eq i32 %135, %136
br i1 %137, label %236, label %138
138: ; preds = %133
br i1 false, label %139, label %172
139: ; preds = %138
br i1 false, label %140, label %166
140: ; preds = %139
%141 = load i8*, i8** %6
%142 = load i8, i8* %141
%143 = sext i8 %142 to i32
store i32 %143, i32* %28
%144 = load i32, i32* %28
%145 = icmp slt i32 %144, -128
br i1 %145, label %151, label %146
146: ; preds = %140
%147 = load i32, i32* %28
%148 = icmp sgt i32 %147, 255
br i1 %148, label %149, label %150
149: ; preds = %146
br label %152
150: ; preds = %146
br label %154
151: ; preds = %140
br label %152
152: ; preds = %151, %149
%153 = load i32, i32* %28
store i32 %153, i32* %16
br label %164
154: ; preds = %150
%155 = call i32 (...) @__ctype_toupper_loc()
%156 = sext i32 %155 to i64
%157 = inttoptr i64 %156 to i32**
store i32** %157, i32*** %29
%158 = load i32**, i32*** %29
%159 = load i32*, i32** %158
%160 = load i32, i32* %28
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds i32, i32* %159, i64 %161
%163 = load i32, i32* %162
store i32 %163, i32* %16
br label %164
164: ; preds = %154, %152
%165 = load i32, i32* %16
store i32 %165, i32* %27
br label %171
166: ; preds = %139
%167 = load i8*, i8** %6
%168 = load i8, i8* %167
%169 = sext i8 %168 to i32
%170 = call i32 @toupper(i32 %169)
store i32 %170, i32* %27
br label %171
171: ; preds = %166, %164
br label %184
172: ; preds = %138
%173 = call i32 (...) @__ctype_toupper_loc()
%174 = sext i32 %173 to i64
%175 = inttoptr i64 %174 to i32**
store i32** %175, i32*** %17
%176 = load i32**, i32*** %17
%177 = load i32*, i32** %176
%178 = load i8*, i8** %6
%179 = load i8, i8* %178
%180 = sext i8 %179 to i32
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds i32, i32* %177, i64 %181
%183 = load i32, i32* %182
store i32 %183, i32* %27
br label %184
184: ; preds = %172, %171
%185 = load i32, i32* %27
store i32 %185, i32* %15
br i1 false, label %186, label %219
186: ; preds = %184
br i1 false, label %187, label %213
187: ; preds = %186
%188 = load i8*, i8** %5
%189 = load i8, i8* %188
%190 = sext i8 %189 to i32
store i32 %190, i32* %31
%191 = load i32, i32* %31
%192 = icmp slt i32 %191, -128
br i1 %192, label %198, label %193
193: ; preds = %187
%194 = load i32, i32* %31
%195 = icmp sgt i32 %194, 255
br i1 %195, label %196, label %197
196: ; preds = %193
br label %199
197: ; preds = %193
br label %201
198: ; preds = %187
br label %199
199: ; preds = %198, %196
%200 = load i32, i32* %31
store i32 %200, i32* %19
br label %211
201: ; preds = %197
%202 = call i32 (...) @__ctype_toupper_loc()
%203 = sext i32 %202 to i64
%204 = inttoptr i64 %203 to i32**
store i32** %204, i32*** %32
%205 = load i32**, i32*** %32
%206 = load i32*, i32** %205
%207 = load i32, i32* %31
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds i32, i32* %206, i64 %208
%210 = load i32, i32* %209
store i32 %210, i32* %19
br label %211
211: ; preds = %201, %199
%212 = load i32, i32* %19
store i32 %212, i32* %30
br label %218
213: ; preds = %186
%214 = load i8*, i8** %5
%215 = load i8, i8* %214
%216 = sext i8 %215 to i32
%217 = call i32 @toupper(i32 %216)
store i32 %217, i32* %30
br label %218
218: ; preds = %213, %211
br label %231
219: ; preds = %184
%220 = call i32 (...) @__ctype_toupper_loc()
%221 = sext i32 %220 to i64
%222 = inttoptr i64 %221 to i32**
store i32** %222, i32*** %20
%223 = load i32**, i32*** %20
%224 = load i32*, i32** %223
%225 = load i8*, i8** %5
%226 = load i8, i8* %225
%227 = sext i8 %226 to i32
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds i32, i32* %224, i64 %228
%230 = load i32, i32* %229
store i32 %230, i32* %30
br label %231
231: ; preds = %219, %218
%232 = load i32, i32* %30
store i32 %232, i32* %18
%233 = load i32, i32* %15
%234 = load i32, i32* %18
%235 = sub nsw i32 %233, %234
store i32 %235, i32* %4
br label %250
236: ; preds = %133
%237 = load i8*, i8** %5
%238 = load i8, i8* %237
%239 = sext i8 %238 to i32
%240 = icmp eq i32 %239, 0
br i1 %240, label %241, label %242
241: ; preds = %236
store i32 0, i32* %4
br label %250
242: ; preds = %236
%243 = load i8*, i8** %5
%244 = getelementptr inbounds i8, i8* %243, i64 1
store i8* %244, i8** %5
%245 = load i8*, i8** %6
%246 = getelementptr inbounds i8, i8* %245, i64 1
store i8* %246, i8** %6
br label %247
247: ; preds = %242
br i1 true, label %33, label %248
248: ; preds = %247
br label %249
249: ; preds = %248, %39
store i32 0, i32* %4
br label %250
250: ; preds = %249, %241, %231
%251 = load i32, i32* %4
ret i32 %251
}

LLVM IR (-O2):
define i32 @strupncmp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %52
5: ; preds = %3, %44
%6 = phi i32 [ %45, %44 ], [ %2, %3 ]
%7 = phi i8* [ %48, %44 ], [ %0, %3 ]
%8 = phi i8* [ %49, %44 ], [ %1, %3 ]
%9 = tail call i32 (...) @__ctype_toupper_loc()
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32**
%12 = load i32*, i32** %11
%13 = load i8, i8* %7
%14 = sext i8 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = tail call i32 (...) @__ctype_toupper_loc()
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i32**
%20 = load i32*, i32** %19
%21 = load i8, i8* %8
%22 = sext i8 %21 to i64
%23 = getelementptr inbounds i32, i32* %20, i64 %22
%24 = load i32, i32* %23
%25 = icmp eq i32 %16, %24
br i1 %25, label %44, label %26
26: ; preds = %5
%27 = tail call i32 (...) @__ctype_toupper_loc()
%28 = sext i32 %27 to i64
%29 = inttoptr i64 %28 to i32**
%30 = load i32*, i32** %29
%31 = load i8, i8* %8
%32 = sext i8 %31 to i64
%33 = getelementptr inbounds i32, i32* %30, i64 %32
%34 = load i32, i32* %33
%35 = tail call i32 (...) @__ctype_toupper_loc()
%36 = sext i32 %35 to i64
%37 = inttoptr i64 %36 to i32**
%38 = load i32*, i32** %37
%39 = load i8, i8* %7
%40 = sext i8 %39 to i64
%41 = getelementptr inbounds i32, i32* %38, i64 %40
%42 = load i32, i32* %41
%43 = sub nsw i32 %34, %42
br label %52
44: ; preds = %5
%45 = add nsw i32 %6, -1
%46 = load i8, i8* %7
%47 = icmp ne i8 %46, 0
%48 = getelementptr inbounds i8, i8* %7, i64 1
%49 = getelementptr inbounds i8, i8* %8, i64 1
%50 = icmp sgt i32 %6, 1
%51 = select i1 %47, i1 %50, i1 false
br i1 %51, label %5, label %52
52: ; preds = %44, %3, %26
%53 = phi i32 [ %43, %26 ], [ 0, %3 ], [ 0, %44 ]
ret i32 %53
}