#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 */
typedef char uint8_t;
typedef char tamanhoUCM;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
char *carrega_arquivo(char const *, size_t *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
char *malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char *, size_t);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ salva_arquivo(char const *, char *, size_t);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc < 3) {
    fprintf(stderr, "Falso compressor em arquivo CM\n");
    fprintf(stderr, "(C) 2011-05 RodolfoRG <rodolforg@gmail.com>\n");
    fprintf(stderr, "Uso: %s ArquivoUCM NovoArquivoCM\n", argv[0]);
    exit(EXIT_FAILURE);
  }
  const char *nomeArquivoUCM = argv[1];
  const char *nomeArquivoCM = argv[2];
  size_t tamanhoUCM = 0;
  uint8_t *bufferUCM = carrega_arquivo(nomeArquivoUCM, &tamanhoUCM);
  if (bufferUCM == NULL) {
    fprintf(stderr, "Ao carregar arquivo %s\n", nomeArquivoUCM);
    perror("Razão");
    exit(EXIT_FAILURE);
  }
  uint8_t *bufferCM = malloc(tamanhoUCM + 2 + 4 + 4 + tamanhoUCM / 8);
  if (bufferCM == NULL) {
    perror("Alocando CM");
    free(bufferUCM);
    exit(EXIT_FAILURE);
  }
  bufferCM[0] = 'C';
  bufferCM[1] = 'M';
  bufferCM[2] = (tamanhoUCM)&0x000000FF;
  bufferCM[3] = (tamanhoUCM >> 8) & 0x000000FF;
  bufferCM[4] = (tamanhoUCM >> 16) & 0x000000FF;
  bufferCM[5] = (tamanhoUCM >> 24) & 0x000000FF;
  bufferCM[6] = (tamanhoUCM)&0x000000FF;
  bufferCM[7] = (tamanhoUCM >> 8) & 0x000000FF;
  bufferCM[8] = (tamanhoUCM >> 16) & 0x000000FF;
  bufferCM[9] = (tamanhoUCM >> 24) & 0x000000FF;
  memcpy(&bufferCM[10], bufferUCM, tamanhoUCM);
  free(bufferUCM);
  memset(&bufferCM[10 + tamanhoUCM], 0, tamanhoUCM / 8);
  if (!salva_arquivo(nomeArquivoCM, bufferCM,
                     tamanhoUCM + 2 + 4 + 4 + tamanhoUCM / 8)) {
    fprintf(stderr, "Problemas ao salvar em %s\n", nomeArquivoCM);
    perror("Razão");
    free(bufferCM);
  }
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    120a <main+0x7a>
mov    0x2e29(%rip),%rax
mov    (%rax),%edi
lea    0xe40(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e12(%rip),%rax
mov    (%rax),%edi
lea    0xe49(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2dfb(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe58(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2dd5(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1090 <carrega_arquivo@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    127b <main+0xeb>
mov    0x2d93(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xe15(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
lea    0xe1f(%rip),%rdi
call   10a0 <perror@plt>
mov    0x2d64(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
mov    -0x28(%rbp),%rdi
add    $0x2,%rdi
add    $0x4,%rdi
add    $0x4,%rdi
mov    -0x28(%rbp),%rax
shr    $0x3,%rax
add    %rax,%rdi
call   1070 <malloc@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    12cd <main+0x13d>
lea    0xddd(%rip),%rdi
call   10a0 <perror@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    0x2d12(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
mov    -0x38(%rbp),%rax
movb   $0x43,(%rax)
mov    -0x38(%rbp),%rax
movb   $0x4d,0x1(%rax)
mov    -0x28(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x38(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x28(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x38(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x28(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x38(%rbp),%rax
mov    %cl,0x4(%rax)
mov    -0x28(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x38(%rbp),%rax
mov    %cl,0x5(%rax)
mov    -0x28(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x38(%rbp),%rax
mov    %cl,0x6(%rax)
mov    -0x28(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x38(%rbp),%rax
mov    %cl,0x7(%rax)
mov    -0x28(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x38(%rbp),%rax
mov    %cl,0x8(%rax)
mov    -0x28(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x38(%rbp),%rax
mov    %cl,0x9(%rax)
mov    -0x38(%rbp),%rdi
add    $0xa,%rdi
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1060 <memcpy@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
mov    -0x28(%rbp),%rax
add    $0xa,%rax
add    %rax,%rdi
mov    -0x28(%rbp),%rdx
shr    $0x3,%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x20(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x28(%rbp),%rdx
add    $0x2,%rdx
add    $0x4,%rdx
add    $0x4,%rdx
mov    -0x28(%rbp),%rax
shr    $0x3,%rax
add    %rax,%rdx
call   1080 <salva_arquivo@plt>
cmp    $0x0,%eax
jne    1429 <main+0x299>
mov    0x2be0(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
lea    0xc8d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
lea    0xc6c(%rip),%rdi
call   10a0 <perror@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    0x2ba0(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
cmp    $0x2,%edi
jg     11df <main+0x4f>
mov    0x2e39(%rip),%r14
mov    (%r14),%edi
lea    0xe4f(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%r14),%edi
lea    0xe5e(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%r14),%edi
mov    (%rbx),%rdx
lea    0xe77(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    125b <main+0xcb>
mov    0x8(%rbx),%r12
mov    0x10(%rbx),%r14
movq   $0x0,(%rsp)
mov    %rsp,%rsi
mov    %r12,%rdi
call   1090 <carrega_arquivo@plt>
test   %rax,%rax
jne    1227 <main+0x97>
mov    0x2dda(%rip),%rax
mov    (%rax),%edi
lea    0xe60(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe67(%rip),%rdi
call   10a0 <perror@plt>
jmp    125b <main+0xcb>
mov    %rax,%r15
mov    (%rsp),%rbx
mov    %rbx,%rax
shr    $0x3,%rax
lea    (%rbx,%rax,1),%rdi
add    $0xa,%rdi
call   1070 <malloc@plt>
test   %rax,%rax
jne    1269 <main+0xd9>
lea    0xe40(%rip),%rdi
call   10a0 <perror@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0x2d76(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
mov    %rax,%r12
movw   $0x4d43,(%rax)
mov    %bl,0x2(%rax)
mov    %rbx,%rax
shr    $0x8,%rax
mov    %al,0x3(%r12)
mov    %rbx,%rcx
shr    $0x10,%rcx
mov    %cl,0x4(%r12)
mov    %rbx,%rdx
shr    $0x18,%rdx
mov    %dl,0x5(%r12)
mov    %bl,0x6(%r12)
mov    %al,0x7(%r12)
mov    %cl,0x8(%r12)
mov    %dl,0x9(%r12)
lea    0xa(%r12),%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1060 <memcpy@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    (%rsp),%rdx
lea    (%rdx,%r12,1),%rdi
add    $0xa,%rdi
shr    $0x3,%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    (%rsp),%rax
mov    %rax,%rcx
shr    $0x3,%rcx
lea    (%rax,%rcx,1),%rdx
add    $0xa,%rdx
mov    %r14,%rdi
mov    %r12,%rsi
call   1080 <salva_arquivo@plt>
test   %eax,%eax
jne    132b <main+0x19b>
mov    0x2cdc(%rip),%rax
mov    (%rax),%edi
lea    0xd8d(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xd69(%rip),%rdi
call   10a0 <perror@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    0x2c9e(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Falso compressor em arquivo CM\0A\00"
@.str.1 = [45 x i8] c"(C) 2011-05 RodolfoRG <rodolforg@gmail.com>\0A\00"
@.str.2 = [34 x i8] c"Uso: %s ArquivoUCM NovoArquivoCM\0A\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [24 x i8] c"Ao carregar arquivo %s\0A\00"
@.str.4 = [7 x i8] c"Raz\C3\A3o\00"
@.str.5 = [12 x i8] c"Alocando CM\00"
@.str.6 = [27 x i8] c"Problemas ao salvar em %s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 3
br i1 %12, label %13, label %25
13: ; preds = %2
%14 = load i32, i32* @stderr
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%18 = load i32, i32* @stderr
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* %21)
%23 = load i32, i32* @EXIT_FAILURE
%24 = call i32 @exit(i32 %23)
unreachable
25: ; preds = %2
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
store i8* %28, i8** %6
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 2
%31 = load i8*, i8** %30
store i8* %31, i8** %7
store i64 0, i64* %8
%32 = load i8*, i8** %6
%33 = call i8* @carrega_arquivo(i8* %32, i64* %8)
store i8* %33, i8** %9
%34 = load i8*, i8** %9
%35 = icmp eq i8* %34, null
br i1 %35, label %36, label %43
36: ; preds = %25
%37 = load i32, i32* @stderr
%38 = load i8*, i8** %6
%39 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* %38)
%40 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%41 = load i32, i32* @EXIT_FAILURE
%42 = call i32 @exit(i32 %41)
unreachable
43: ; preds = %25
%44 = load i64, i64* %8
%45 = add i64 %44, 2
%46 = add i64 %45, 4
%47 = add i64 %46, 4
%48 = load i64, i64* %8
%49 = udiv i64 %48, 8
%50 = add i64 %47, %49
%51 = call i8* @malloc(i64 %50)
store i8* %51, i8** %10
%52 = load i8*, i8** %10
%53 = icmp eq i8* %52, null
br i1 %53, label %54, label %60
54: ; preds = %43
%55 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
%56 = load i8*, i8** %9
%57 = call i32 @free(i8* %56)
%58 = load i32, i32* @EXIT_FAILURE
%59 = call i32 @exit(i32 %58)
unreachable
60: ; preds = %43
%61 = load i8*, i8** %10
%62 = getelementptr inbounds i8, i8* %61, i64 0
store i8 67, i8* %62
%63 = load i8*, i8** %10
%64 = getelementptr inbounds i8, i8* %63, i64 1
store i8 77, i8* %64
%65 = load i64, i64* %8
%66 = and i64 %65, 255
%67 = trunc i64 %66 to i8
%68 = load i8*, i8** %10
%69 = getelementptr inbounds i8, i8* %68, i64 2
store i8 %67, i8* %69
%70 = load i64, i64* %8
%71 = lshr i64 %70, 8
%72 = and i64 %71, 255
%73 = trunc i64 %72 to i8
%74 = load i8*, i8** %10
%75 = getelementptr inbounds i8, i8* %74, i64 3
store i8 %73, i8* %75
%76 = load i64, i64* %8
%77 = lshr i64 %76, 16
%78 = and i64 %77, 255
%79 = trunc i64 %78 to i8
%80 = load i8*, i8** %10
%81 = getelementptr inbounds i8, i8* %80, i64 4
store i8 %79, i8* %81
%82 = load i64, i64* %8
%83 = lshr i64 %82, 24
%84 = and i64 %83, 255
%85 = trunc i64 %84 to i8
%86 = load i8*, i8** %10
%87 = getelementptr inbounds i8, i8* %86, i64 5
store i8 %85, i8* %87
%88 = load i64, i64* %8
%89 = and i64 %88, 255
%90 = trunc i64 %89 to i8
%91 = load i8*, i8** %10
%92 = getelementptr inbounds i8, i8* %91, i64 6
store i8 %90, i8* %92
%93 = load i64, i64* %8
%94 = lshr i64 %93, 8
%95 = and i64 %94, 255
%96 = trunc i64 %95 to i8
%97 = load i8*, i8** %10
%98 = getelementptr inbounds i8, i8* %97, i64 7
store i8 %96, i8* %98
%99 = load i64, i64* %8
%100 = lshr i64 %99, 16
%101 = and i64 %100, 255
%102 = trunc i64 %101 to i8
%103 = load i8*, i8** %10
%104 = getelementptr inbounds i8, i8* %103, i64 8
store i8 %102, i8* %104
%105 = load i64, i64* %8
%106 = lshr i64 %105, 24
%107 = and i64 %106, 255
%108 = trunc i64 %107 to i8
%109 = load i8*, i8** %10
%110 = getelementptr inbounds i8, i8* %109, i64 9
store i8 %108, i8* %110
%111 = load i8*, i8** %10
%112 = getelementptr inbounds i8, i8* %111, i64 10
%113 = load i8*, i8** %9
%114 = load i64, i64* %8
%115 = call i32 @memcpy(i8* %112, i8* %113, i64 %114)
%116 = load i8*, i8** %9
%117 = call i32 @free(i8* %116)
%118 = load i8*, i8** %10
%119 = load i64, i64* %8
%120 = add i64 10, %119
%121 = getelementptr inbounds i8, i8* %118, i64 %120
%122 = load i64, i64* %8
%123 = udiv i64 %122, 8
%124 = call i32 @memset(i8* %121, i32 0, i64 %123)
%125 = load i8*, i8** %7
%126 = load i8*, i8** %10
%127 = load i64, i64* %8
%128 = add i64 %127, 2
%129 = add i64 %128, 4
%130 = add i64 %129, 4
%131 = load i64, i64* %8
%132 = udiv i64 %131, 8
%133 = add i64 %130, %132
%134 = call i32 @salva_arquivo(i8* %125, i8* %126, i64 %133)
%135 = icmp ne i32 %134, 0
br i1 %135, label %143, label %136
136: ; preds = %60
%137 = load i32, i32* @stderr
%138 = load i8*, i8** %7
%139 = call i32 (i32, i8*, ...) @fprintf(i32 %137, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* %138)
%140 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%141 = load i8*, i8** %10
%142 = call i32 @free(i8* %141)
br label %143
143: ; preds = %136, %60
%144 = load i32, i32* @EXIT_SUCCESS
%145 = call i32 @exit(i32 %144)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Falso compressor em arquivo CM\0A\00"
@.str.1 = [45 x i8] c"(C) 2011-05 RodolfoRG <rodolforg@gmail.com>\0A\00"
@.str.2 = [34 x i8] c"Uso: %s ArquivoUCM NovoArquivoCM\0A\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [24 x i8] c"Ao carregar arquivo %s\0A\00"
@.str.4 = [7 x i8] c"Raz\C3\A3o\00"
@.str.5 = [12 x i8] c"Alocando CM\00"
@.str.6 = [27 x i8] c"Problemas ao salvar em %s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = icmp slt i32 %0, 3
br i1 %4, label %5, label %15
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %1
%12 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%13 = load i32, i32* @EXIT_FAILURE
%14 = tail call i32 @exit(i32 %13)
unreachable
15: ; preds = %2
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = getelementptr inbounds i8*, i8** %1, i64 2
%19 = load i8*, i8** %18
%20 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%21 = call i8* @carrega_arquivo(i8* %17, i64* %3)
%22 = icmp eq i8* %21, null
br i1 %22, label %23, label %29
23: ; preds = %15
%24 = load i32, i32* @stderr
%25 = call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* %17)
%26 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%27 = load i32, i32* @EXIT_FAILURE
%28 = call i32 @exit(i32 %27)
unreachable
29: ; preds = %15
%30 = load i64, i64* %3
%31 = add i64 %30, 10
%32 = lshr i64 %30, 3
%33 = add i64 %31, %32
%34 = call i8* @malloc(i64 %33)
%35 = icmp eq i8* %34, null
br i1 %35, label %36, label %41
36: ; preds = %29
%37 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
%38 = call i32 @free(i8* %21)
%39 = load i32, i32* @EXIT_FAILURE
%40 = call i32 @exit(i32 %39)
unreachable
41: ; preds = %29
store i8 67, i8* %34
%42 = getelementptr inbounds i8, i8* %34, i64 1
store i8 77, i8* %42
%43 = trunc i64 %30 to i8
%44 = getelementptr inbounds i8, i8* %34, i64 2
store i8 %43, i8* %44
%45 = lshr i64 %30, 8
%46 = trunc i64 %45 to i8
%47 = getelementptr inbounds i8, i8* %34, i64 3
store i8 %46, i8* %47
%48 = lshr i64 %30, 16
%49 = trunc i64 %48 to i8
%50 = getelementptr inbounds i8, i8* %34, i64 4
store i8 %49, i8* %50
%51 = lshr i64 %30, 24
%52 = trunc i64 %51 to i8
%53 = getelementptr inbounds i8, i8* %34, i64 5
store i8 %52, i8* %53
%54 = getelementptr inbounds i8, i8* %34, i64 6
store i8 %43, i8* %54
%55 = getelementptr inbounds i8, i8* %34, i64 7
store i8 %46, i8* %55
%56 = getelementptr inbounds i8, i8* %34, i64 8
store i8 %49, i8* %56
%57 = getelementptr inbounds i8, i8* %34, i64 9
store i8 %52, i8* %57
%58 = getelementptr inbounds i8, i8* %34, i64 10
%59 = call i32 @memcpy(i8* %58, i8* %21, i64 %30)
%60 = call i32 @free(i8* %21)
%61 = load i64, i64* %3
%62 = add i64 %61, 10
%63 = getelementptr inbounds i8, i8* %34, i64 %62
%64 = lshr i64 %61, 3
%65 = call i32 @memset(i8* %63, i32 0, i64 %64)
%66 = load i64, i64* %3
%67 = add i64 %66, 10
%68 = lshr i64 %66, 3
%69 = add i64 %67, %68
%70 = call i32 @salva_arquivo(i8* %19, i8* %34, i64 %69)
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %77
72: ; preds = %41
%73 = load i32, i32* @stderr
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* %19)
%75 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%76 = call i32 @free(i8* %34)
br label %77
77: ; preds = %72, %41
%78 = load i32, i32* @EXIT_SUCCESS
%79 = call i32 @exit(i32 %78)
unreachable
}