#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 /*<<< orphan*/ ToHex(char *, unsigned char *);
int /*<<< orphan*/ lastdivision(unsigned char *, unsigned char *,
                                unsigned char *, unsigned char **);
int /*<<< orphan*/ longdivision(unsigned char *, unsigned char *,
                                unsigned char *, unsigned char *,
                                unsigned char **, int);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ miInit();
int /*<<< orphan*/ printNotFound(unsigned char *);
int /*<<< orphan*/ printfooter(unsigned char *, unsigned char *,
                               unsigned char *);
int /*<<< orphan*/ printheader(unsigned char *);
int printline(unsigned char *, unsigned char *, unsigned char *, int);
int inverse(char *poly) {
  miInit();
  unsigned char a[5];
  unsigned char rem[6][5];
  unsigned char quo[6][4];
  unsigned char x[6][4];
  unsigned char x0[5] = {0x0, 0x0, 0x0, 0x0};
  unsigned char x1[5] = {0x0, 0x0, 0x0, 0x1};
  unsigned char MX[5] = {0x1, 0x0, 0x0, 0x0, 0x1};
  ToHex(poly, a);
  memcpy(rem[0], MX, 5);
  memcpy(rem[1], a, 5);
  memcpy(x[0], x0, 4);
  memcpy(x[1], x1, 4);
  printheader(a);
  longdivision(rem[0], rem[1], rem[2], quo[2], x, 1);
  if (printline(rem[2], quo[2], x[2], 3) != 1) {
    printNotFound(a);
    return 0;
  }
  longdivision(rem[1], rem[2], rem[3], quo[3], x, 2);
  if (printline(rem[3], quo[3], x[3], 4) != 1) {
    printNotFound(a);
    return 0;
  }
  longdivision(rem[2], rem[3], rem[4], quo[4], x, 3);
  if (printline(rem[4], quo[4], x[4], 5) != 1) {
    printNotFound(a);
    return 0;
  }
  lastdivision(rem[3], rem[4], quo[5], x);
  printfooter(a, quo[5], x[5]);
  return 0;
}


x86 assembly (clang, -O0):
<inverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   10b0 <miInit@plt>
lea    -0x85(%rbp),%rdi
xor    %esi,%esi
mov    $0x5,%edx
call   1040 <memset@plt>
mov    0xe31(%rip),%eax
mov    %eax,-0x8a(%rbp)
mov    0xe29(%rip),%al
mov    %al,-0x86(%rbp)
mov    0xe1e(%rip),%eax
mov    %eax,-0x8f(%rbp)
mov    0xe16(%rip),%al
mov    %al,-0x8b(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x15(%rbp),%rsi
call   10c0 <ToHex@plt>
lea    -0x40(%rbp),%rdi
lea    -0x8f(%rbp),%rsi
mov    $0x5,%edx
call   1060 <memcpy@plt>
lea    -0x40(%rbp),%rdi
add    $0x5,%rdi
lea    -0x15(%rbp),%rsi
mov    $0x5,%edx
call   1060 <memcpy@plt>
lea    -0x80(%rbp),%rdi
lea    -0x85(%rbp),%rsi
mov    $0x4,%edx
call   1060 <memcpy@plt>
lea    -0x80(%rbp),%rdi
add    $0x4,%rdi
lea    -0x8a(%rbp),%rsi
mov    $0x4,%edx
call   1060 <memcpy@plt>
lea    -0x15(%rbp),%rdi
call   1050 <printheader@plt>
lea    -0x40(%rbp),%rdi
lea    -0x40(%rbp),%rsi
add    $0x5,%rsi
lea    -0x40(%rbp),%rdx
add    $0xa,%rdx
lea    -0x60(%rbp),%rcx
add    $0x8,%rcx
lea    -0x80(%rbp),%r8
mov    $0x1,%r9d
call   1080 <longdivision@plt>
lea    -0x40(%rbp),%rdi
add    $0xa,%rdi
lea    -0x60(%rbp),%rsi
add    $0x8,%rsi
lea    -0x80(%rbp),%rdx
add    $0x8,%rdx
mov    $0x3,%ecx
call   1090 <printline@plt>
cmp    $0x1,%eax
je     12d3 <inverse+0x133>
lea    -0x15(%rbp),%rdi
call   1030 <printNotFound@plt>
movl   $0x0,-0x4(%rbp)
jmp    13f2 <inverse+0x252>
lea    -0x40(%rbp),%rdi
add    $0x5,%rdi
lea    -0x40(%rbp),%rsi
add    $0xa,%rsi
lea    -0x40(%rbp),%rdx
add    $0xf,%rdx
lea    -0x60(%rbp),%rcx
add    $0xc,%rcx
lea    -0x80(%rbp),%r8
mov    $0x2,%r9d
call   1080 <longdivision@plt>
lea    -0x40(%rbp),%rdi
add    $0xf,%rdi
lea    -0x60(%rbp),%rsi
add    $0xc,%rsi
lea    -0x80(%rbp),%rdx
add    $0xc,%rdx
mov    $0x4,%ecx
call   1090 <printline@plt>
cmp    $0x1,%eax
je     1342 <inverse+0x1a2>
lea    -0x15(%rbp),%rdi
call   1030 <printNotFound@plt>
movl   $0x0,-0x4(%rbp)
jmp    13f2 <inverse+0x252>
lea    -0x40(%rbp),%rdi
add    $0xa,%rdi
lea    -0x40(%rbp),%rsi
add    $0xf,%rsi
lea    -0x40(%rbp),%rdx
add    $0x14,%rdx
lea    -0x60(%rbp),%rcx
add    $0x10,%rcx
lea    -0x80(%rbp),%r8
mov    $0x3,%r9d
call   1080 <longdivision@plt>
lea    -0x40(%rbp),%rdi
add    $0x14,%rdi
lea    -0x60(%rbp),%rsi
add    $0x10,%rsi
lea    -0x80(%rbp),%rdx
add    $0x10,%rdx
mov    $0x5,%ecx
call   1090 <printline@plt>
cmp    $0x1,%eax
je     13b1 <inverse+0x211>
lea    -0x15(%rbp),%rdi
call   1030 <printNotFound@plt>
movl   $0x0,-0x4(%rbp)
jmp    13f2 <inverse+0x252>
lea    -0x40(%rbp),%rdi
add    $0xf,%rdi
lea    -0x40(%rbp),%rsi
add    $0x14,%rsi
lea    -0x60(%rbp),%rdx
add    $0x14,%rdx
lea    -0x80(%rbp),%rcx
call   10a0 <lastdivision@plt>
lea    -0x15(%rbp),%rdi
lea    -0x60(%rbp),%rsi
add    $0x14,%rsi
lea    -0x80(%rbp),%rdx
add    $0x14,%rdx
call   1070 <printfooter@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverse>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x80,%rsp
mov    %rdi,%rbx
xor    %eax,%eax
call   10a0 <miInit@plt>
movb   $0x0,0x1c(%rsp)
movl   $0x0,0x18(%rsp)
movb   $0x0,0x14(%rsp)
movl   $0x1000000,0x10(%rsp)
01
movb   $0x1,0xc(%rsp)
movl   $0x1,0x8(%rsp)
lea    0x3(%rsp),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   10b0 <ToHex@plt>
lea    0x60(%rsp),%r15
lea    0x8(%rsp),%rsi
mov    %r15,%rdi
mov    $0x5,%edx
call   1050 <memcpy@plt>
lea    0x65(%rsp),%r14
mov    %r14,%rdi
mov    %r12,%rsi
mov    $0x5,%edx
call   1050 <memcpy@plt>
lea    0x20(%rsp),%r13
lea    0x18(%rsp),%rsi
mov    %r13,%rdi
mov    $0x4,%edx
call   1050 <memcpy@plt>
lea    0x24(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0x4,%edx
call   1050 <memcpy@plt>
mov    %r12,%rdi
call   1040 <printheader@plt>
lea    0x6a(%rsp),%r12
lea    0x48(%rsp),%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
mov    %r13,%r8
mov    $0x1,%r9d
call   1070 <longdivision@plt>
lea    0x28(%rsp),%rdx
mov    %r12,%rdi
mov    %rbx,%rsi
mov    $0x3,%ecx
call   1080 <printline@plt>
cmp    $0x1,%eax
jne    132e <inverse+0x19e>
lea    0x6f(%rsp),%r15
lea    0x4c(%rsp),%rbx
lea    0x20(%rsp),%r8
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    $0x2,%r9d
call   1070 <longdivision@plt>
lea    0x2c(%rsp),%rdx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    $0x4,%ecx
call   1080 <printline@plt>
cmp    $0x1,%eax
jne    132e <inverse+0x19e>
lea    0x74(%rsp),%r14
lea    0x50(%rsp),%rbx
lea    0x20(%rsp),%r8
mov    %r12,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rbx,%rcx
mov    $0x3,%r9d
call   1070 <longdivision@plt>
lea    0x30(%rsp),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x5,%ecx
call   1080 <printline@plt>
cmp    $0x1,%eax
jne    132e <inverse+0x19e>
lea    0x54(%rsp),%rbx
lea    0x20(%rsp),%rcx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1090 <lastdivision@plt>
lea    0x34(%rsp),%rdx
lea    0x3(%rsp),%rdi
mov    %rbx,%rsi
call   1060 <printfooter@plt>
jmp    1338 <inverse+0x1a8>
lea    0x3(%rsp),%rdi
call   1030 <printNotFound@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.inverse.x1 = [5 x i8] c"\00\00\00\01\00"
@__const.inverse.MX = [5 x i8] c"\01\00\00\00\01"
define i32 @inverse(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [5 x i8]
%5 = alloca [6 x [5 x i8]]
%6 = alloca [6 x [4 x i8]]
%7 = alloca [6 x [4 x i8]]
%8 = alloca [5 x i8]
%9 = alloca [5 x i8]
%10 = alloca [5 x i8]
store i8* %0, i8** %3
%11 = call i32 (...) @miInit()
%12 = bitcast [5 x i8]* %8 to i8*
%13 = bitcast [5 x i8]* %9 to i8*
%14 = bitcast [5 x i8]* %10 to i8*
%15 = load i8*, i8** %3
%16 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%17 = call i32 @ToHex(i8* %15, i8* %16)
%18 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 0
%19 = getelementptr inbounds [5 x i8], [5 x i8]* %18, i64 0, i64 0
%20 = getelementptr inbounds [5 x i8], [5 x i8]* %10, i64 0, i64 0
%21 = call i32 @memcpy(i8* %19, i8* %20, i32 5)
%22 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 1
%23 = getelementptr inbounds [5 x i8], [5 x i8]* %22, i64 0, i64 0
%24 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%25 = call i32 @memcpy(i8* %23, i8* %24, i32 5)
%26 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %7, i64 0, i64 0
%27 = getelementptr inbounds [4 x i8], [4 x i8]* %26, i64 0, i64 0
%28 = getelementptr inbounds [5 x i8], [5 x i8]* %8, i64 0, i64 0
%29 = call i32 @memcpy(i8* %27, i8* %28, i32 4)
%30 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %7, i64 0, i64 1
%31 = getelementptr inbounds [4 x i8], [4 x i8]* %30, i64 0, i64 0
%32 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
%33 = call i32 @memcpy(i8* %31, i8* %32, i32 4)
%34 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%35 = call i32 @printheader(i8* %34)
%36 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 0
%37 = getelementptr inbounds [5 x i8], [5 x i8]* %36, i64 0, i64 0
%38 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 1
%39 = getelementptr inbounds [5 x i8], [5 x i8]* %38, i64 0, i64 0
%40 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 2
%41 = getelementptr inbounds [5 x i8], [5 x i8]* %40, i64 0, i64 0
%42 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %6, i64 0, i64 2
%43 = getelementptr inbounds [4 x i8], [4 x i8]* %42, i64 0, i64 0
%44 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %7, i64 0, i64 0
%45 = bitcast [4 x i8]* %44 to i8**
%46 = call i32 @longdivision(i8* %37, i8* %39, i8* %41, i8* %43, i8** %45, i32 1)
%47 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 2
%48 = getelementptr inbounds [5 x i8], [5 x i8]* %47, i64 0, i64 0
%49 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %6, i64 0, i64 2
%50 = getelementptr inbounds [4 x i8], [4 x i8]* %49, i64 0, i64 0
%51 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %7, i64 0, i64 2
%52 = getelementptr inbounds [4 x i8], [4 x i8]* %51, i64 0, i64 0
%53 = call i32 @printline(i8* %48, i8* %50, i8* %52, i32 3)
%54 = icmp ne i32 %53, 1
br i1 %54, label %55, label %58
55: ; preds = %1
%56 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%57 = call i32 @printNotFound(i8* %56)
store i32 0, i32* %2
br label %120
58: ; preds = %1
%59 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 1
%60 = getelementptr inbounds [5 x i8], [5 x i8]* %59, i64 0, i64 0
%61 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 2
%62 = getelementptr inbounds [5 x i8], [5 x i8]* %61, i64 0, i64 0
%63 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 3
%64 = getelementptr inbounds [5 x i8], [5 x i8]* %63, i64 0, i64 0
%65 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %6, i64 0, i64 3
%66 = getelementptr inbounds [4 x i8], [4 x i8]* %65, i64 0, i64 0
%67 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %7, i64 0, i64 0
%68 = bitcast [4 x i8]* %67 to i8**
%69 = call i32 @longdivision(i8* %60, i8* %62, i8* %64, i8* %66, i8** %68, i32 2)
%70 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 3
%71 = getelementptr inbounds [5 x i8], [5 x i8]* %70, i64 0, i64 0
%72 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %6, i64 0, i64 3
%73 = getelementptr inbounds [4 x i8], [4 x i8]* %72, i64 0, i64 0
%74 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %7, i64 0, i64 3
%75 = getelementptr inbounds [4 x i8], [4 x i8]* %74, i64 0, i64 0
%76 = call i32 @printline(i8* %71, i8* %73, i8* %75, i32 4)
%77 = icmp ne i32 %76, 1
br i1 %77, label %78, label %81
78: ; preds = %58
%79 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%80 = call i32 @printNotFound(i8* %79)
store i32 0, i32* %2
br label %120
81: ; preds = %58
%82 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 2
%83 = getelementptr inbounds [5 x i8], [5 x i8]* %82, i64 0, i64 0
%84 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 3
%85 = getelementptr inbounds [5 x i8], [5 x i8]* %84, i64 0, i64 0
%86 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 4
%87 = getelementptr inbounds [5 x i8], [5 x i8]* %86, i64 0, i64 0
%88 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %6, i64 0, i64 4
%89 = getelementptr inbounds [4 x i8], [4 x i8]* %88, i64 0, i64 0
%90 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %7, i64 0, i64 0
%91 = bitcast [4 x i8]* %90 to i8**
%92 = call i32 @longdivision(i8* %83, i8* %85, i8* %87, i8* %89, i8** %91, i32 3)
%93 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 4
%94 = getelementptr inbounds [5 x i8], [5 x i8]* %93, i64 0, i64 0
%95 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %6, i64 0, i64 4
%96 = getelementptr inbounds [4 x i8], [4 x i8]* %95, i64 0, i64 0
%97 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %7, i64 0, i64 4
%98 = getelementptr inbounds [4 x i8], [4 x i8]* %97, i64 0, i64 0
%99 = call i32 @printline(i8* %94, i8* %96, i8* %98, i32 5)
%100 = icmp ne i32 %99, 1
br i1 %100, label %101, label %104
101: ; preds = %81
%102 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%103 = call i32 @printNotFound(i8* %102)
store i32 0, i32* %2
br label %120
104: ; preds = %81
%105 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 3
%106 = getelementptr inbounds [5 x i8], [5 x i8]* %105, i64 0, i64 0
%107 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %5, i64 0, i64 4
%108 = getelementptr inbounds [5 x i8], [5 x i8]* %107, i64 0, i64 0
%109 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %6, i64 0, i64 5
%110 = getelementptr inbounds [4 x i8], [4 x i8]* %109, i64 0, i64 0
%111 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %7, i64 0, i64 0
%112 = bitcast [4 x i8]* %111 to i8**
%113 = call i32 @lastdivision(i8* %106, i8* %108, i8* %110, i8** %112)
%114 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%115 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %6, i64 0, i64 5
%116 = getelementptr inbounds [4 x i8], [4 x i8]* %115, i64 0, i64 0
%117 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %7, i64 0, i64 5
%118 = getelementptr inbounds [4 x i8], [4 x i8]* %117, i64 0, i64 0
%119 = call i32 @printfooter(i8* %114, i8* %116, i8* %118)
store i32 0, i32* %2
br label %120
120: ; preds = %104, %101, %78, %55
%121 = load i32, i32* %2
ret i32 %121
}

LLVM IR (-O2):
@__const.inverse.x1 = [5 x i8] c"\00\00\00\01\00"
@__const.inverse.MX = [5 x i8] c"\01\00\00\00\01"
define i32 @inverse(i8* %0) {
%2 = alloca [5 x i8]
%3 = alloca [6 x [5 x i8]]
%4 = alloca [6 x [4 x i8]]
%5 = alloca [6 x [4 x i8]]
%6 = alloca [5 x i8]
%7 = alloca [5 x i8]
%8 = alloca [5 x i8]
%9 = tail call i32 (...) @miInit()
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%11 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %3, i64 0, i64 0, i64 0
%12 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %4, i64 0, i64 0, i64 0
%13 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %5, i64 0, i64 0, i64 0
%14 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%15 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%16 = getelementptr inbounds [5 x i8], [5 x i8]* %8, i64 0, i64 0
%17 = call i32 @ToHex(i8* %0, i8* %10)
%18 = call i32 @memcpy(i8* %11, i8* %16, i32 5)
%19 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %3, i64 0, i64 1, i64 0
%20 = call i32 @memcpy(i8* %19, i8* %10, i32 5)
%21 = call i32 @memcpy(i8* %13, i8* %14, i32 4)
%22 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %5, i64 0, i64 1, i64 0
%23 = call i32 @memcpy(i8* %22, i8* %15, i32 4)
%24 = call i32 @printheader(i8* %10)
%25 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %3, i64 0, i64 2, i64 0
%26 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %4, i64 0, i64 2, i64 0
%27 = bitcast [6 x [4 x i8]]* %5 to i8**
%28 = call i32 @longdivision(i8* %11, i8* %19, i8* %25, i8* %26, i8** %27, i32 1)
%29 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %5, i64 0, i64 2, i64 0
%30 = call i32 @printline(i8* %25, i8* %26, i8* %29, i32 3)
%31 = icmp eq i32 %30, 1
br i1 %31, label %34, label %32
32: ; preds = %1
%33 = call i32 @printNotFound(i8* %10)
br label %57
34: ; preds = %1
%35 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %3, i64 0, i64 3, i64 0
%36 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %4, i64 0, i64 3, i64 0
%37 = call i32 @longdivision(i8* %19, i8* %25, i8* %35, i8* %36, i8** %27, i32 2)
%38 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %5, i64 0, i64 3, i64 0
%39 = call i32 @printline(i8* %35, i8* %36, i8* %38, i32 4)
%40 = icmp eq i32 %39, 1
br i1 %40, label %43, label %41
41: ; preds = %34
%42 = call i32 @printNotFound(i8* %10)
br label %57
43: ; preds = %34
%44 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %3, i64 0, i64 4, i64 0
%45 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %4, i64 0, i64 4, i64 0
%46 = call i32 @longdivision(i8* %25, i8* %35, i8* %44, i8* %45, i8** %27, i32 3)
%47 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %5, i64 0, i64 4, i64 0
%48 = call i32 @printline(i8* %44, i8* %45, i8* %47, i32 5)
%49 = icmp eq i32 %48, 1
br i1 %49, label %52, label %50
50: ; preds = %43
%51 = call i32 @printNotFound(i8* %10)
br label %57
52: ; preds = %43
%53 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %4, i64 0, i64 5, i64 0
%54 = call i32 @lastdivision(i8* %35, i8* %44, i8* %53, i8** %27)
%55 = getelementptr inbounds [6 x [4 x i8]], [6 x [4 x i8]]* %5, i64 0, i64 5, i64 0
%56 = call i32 @printfooter(i8* %10, i8* %53, i8* %55)
br label %57
57: ; preds = %52, %50, %41, %32
ret i32 0
}