#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 int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
void show_time_and_message(FILE *file, int rev) {
  char line[300];
  fgets(line, 300, file);
  printf("--> Id: %d\t--> Fecha: %s", rev, line);
  fgets(line, 300, file);
  printf("--> Mensaje: %s", line);
  puts(" ");
}


x86 assembly (clang, -O0):
<show_time_and_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x140(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x12c,%esi
call   1050 <fgets@plt>
mov    -0xc(%rbp),%esi
lea    -0x140(%rbp),%rdx
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x140(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x12c,%esi
call   1050 <fgets@plt>
lea    -0x140(%rbp),%rsi
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe89(%rip),%rdi
call   1030 <puts@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_time_and_message>:
push   %rbp
push   %r14
push   %rbx
sub    $0x130,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x12c,%esi
mov    %rbx,%rdx
call   1050 <fgets@plt>
lea    0xea6(%rip),%rdi
mov    %ebp,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    $0x12c,%esi
mov    %rbx,%rdx
call   1050 <fgets@plt>
lea    0xe9c(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe9b(%rip),%rdi
call   1030 <puts@plt>
add    $0x130,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"--> Id: %d\09--> Fecha: %s\00"
@.str.1 = [16 x i8] c"--> Mensaje: %s\00"
@.str.2 = [2 x i8] c" \00"
define void @show_time_and_message(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca [300 x i8]
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [300 x i8], [300 x i8]* %5, i64 0, i64 0
%7 = load i32*, i32** %3
%8 = call i32 @fgets(i8* %6, i32 300, i32* %7)
%9 = load i32, i32* %4
%10 = getelementptr inbounds [300 x i8], [300 x i8]* %5, i64 0, i64 0
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %9, i8* %10)
%12 = getelementptr inbounds [300 x i8], [300 x i8]* %5, i64 0, i64 0
%13 = load i32*, i32** %3
%14 = call i32 @fgets(i8* %12, i32 300, i32* %13)
%15 = getelementptr inbounds [300 x i8], [300 x i8]* %5, i64 0, i64 0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"--> Id: %d\09--> Fecha: %s\00"
@.str.1 = [16 x i8] c"--> Mensaje: %s\00"
@.str.2 = [2 x i8] c" \00"
define void @show_time_and_message(i32* nocapture %0, i32 %1) {
%3 = alloca [300 x i8]
%4 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%5 = call i32 @fgets(i8* %4, i32 300, i32* %0)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %4)
%7 = call i32 @fgets(i8* %4, i32 300, i32* %0)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}