#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*/ sprintf(char *, char *, int, int, char *, char *, char *,
                           char *);
char *ExtrairLogs(int sessao, char *codigo_ativacao) {
  int eeeee = 15000;
  char *mensagem = "Transfer\xc3\xaancia completa";
  char *cod = "";
  char *mensagem_sefaz = "";
  char *arquivo_log =
      "MjAxOTA2MjAxMjUyMDF8U0FULVNFRkFafGVycm98RXJybyBhbyB0cmFuc21pd"
      "GlyIGxvdGUgcGFyYSBhIFNFRkFaCjIwMTkwNjIwMTI1MjEwfEFDLVNBVHxpbm"
      "ZvfFJlY2ViaWRhIG1lbnNhZ2VtIHJlZmVyZW50ZSBmdW7Dp8OjbyBUZXN0ZUZ"
      "pbUFGaW0KMjAxOTA2MjAxMjUyMTh8U0FUfGVycm98RXJybyBhbyBnZXJhciBj"
      "ZXJ0aWZpY2Fkbw==";
  static char resp[256];
  sprintf(resp, "%d|%05d|%s|%s|%s|%s", sessao, eeeee, mensagem, cod,
          mensagem_sefaz, arquivo_log);
  return resp;
}


x86 assembly (clang, -O0):
<ExtrairLogs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3a98,-0x14(%rbp)
lea    0xed3(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xfe4(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xfd9(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x30(%rbp),%r10
mov    -0x38(%rbp),%rax
lea    0x2ed1(%rip),%rdi
lea    0xfa7(%rip),%rsi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <sprintf@plt>
lea    0x2eb5(%rip),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExtrairLogs>:
push   %rbx
mov    %edi,%edx
lea    0xefe(%rip),%rax
lea    0xffb(%rip),%r9
lea    0x2f18(%rip),%rbx
lea    0xfee(%rip),%rsi
lea    0xeca(%rip),%r8
mov    %rbx,%rdi
mov    $0x3a98,%ecx
push   %rax
push   %r9
call   1030 <sprintf@plt>
add    $0x10,%rsp
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Transfer\C3\AAncia completa\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [261 x i8] c"MjAxOTA2MjAxMjUyMDF8U0FULVNFRkFafGVycm98RXJybyBhbyB0cmFuc21pdGlyIGxvdGUgcGFyYSBhIFNFRkFaCjIwMTkwNjIwMTI1MjEwfEFDLVNBVHxpbmZvfFJlY2ViaWRhIG1lbnNhZ2VtIHJlZmVyZW50ZSBmdW7Dp8OjbyBUZXN0ZUZpbUFGaW0KMjAxOTA2MjAxMjUyMTh8U0FUfGVycm98RXJybyBhbyBnZXJhciBjZXJ0aWZpY2Fkbw==\00"
@ExtrairLogs.resp = internal global [256 x i8] zeroinitializer
@.str.3 = [20 x i8] c"%d|%05d|%s|%s|%s|%s\00"
define i8* @ExtrairLogs(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 15000, i32* %5
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([261 x i8], [261 x i8]* @.str.2, i64 0, i64 0), i8** %9
%10 = load i32, i32* %3
%11 = load i32, i32* %5
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = load i8*, i8** %8
%15 = load i8*, i8** %9
%16 = call i32 @sprintf(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @ExtrairLogs.resp, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %10, i32 %11, i8* %12, i8* %13, i8* %14, i8* %15)
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @ExtrairLogs.resp, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [24 x i8] c"Transfer\C3\AAncia completa\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [261 x i8] c"MjAxOTA2MjAxMjUyMDF8U0FULVNFRkFafGVycm98RXJybyBhbyB0cmFuc21pdGlyIGxvdGUgcGFyYSBhIFNFRkFaCjIwMTkwNjIwMTI1MjEwfEFDLVNBVHxpbmZvfFJlY2ViaWRhIG1lbnNhZ2VtIHJlZmVyZW50ZSBmdW7Dp8OjbyBUZXN0ZUZpbUFGaW0KMjAxOTA2MjAxMjUyMTh8U0FUfGVycm98RXJybyBhbyBnZXJhciBjZXJ0aWZpY2Fkbw==\00"
@ExtrairLogs.resp = internal global [256 x i8] zeroinitializer
@.str.3 = [20 x i8] c"%d|%05d|%s|%s|%s|%s\00"
define i8* @ExtrairLogs(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @ExtrairLogs.resp, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %0, i32 15000, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([261 x i8], [261 x i8]* @.str.2, i64 0, i64 0))
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @ExtrairLogs.resp, i64 0, i64 0)
}