#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 */
struct OlLrcItem {
  int dummy;
};
struct OlLrc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ol_lrc_free(struct OlLrc *);
struct OlLrcItem *ol_lrc_get_item(struct OlLrc *, int /*<<< orphan*/);
int ol_lrc_item_get_time(struct OlLrcItem const *);
struct OlLrc *ol_lrc_new(char const *);
int /*<<< orphan*/ printf(char *, int, char *);
void begin_with_timestamp_test() {
  const char *DATAFILE = "lrc_tail.lrc";
  struct OlLrc *lrc = ol_lrc_new(DATAFILE);
  const struct OlLrcItem *item = ol_lrc_get_item(lrc, 0);
  if (!(ol_lrc_item_get_time(item) == 10000)) {
    printf("ERROR[%d]: EXPECT %s failed\n", 107,
           "ol_lrc_item_get_time (item) == 10000");
  };
  ol_lrc_free(lrc);
}


x86 assembly (clang, -O0):
<begin_with_timestamp_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xea1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ol_lrc_new@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1050 <ol_lrc_get_item@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1070 <ol_lrc_item_get_time@plt>
cmp    $0x2710,%eax
je     11ab <begin_with_timestamp_test+0x5b>
lea    0xe73(%rip),%rdi
mov    $0x6b,%esi
lea    0xe84(%rip),%rdx
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1060 <ol_lrc_free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<begin_with_timestamp_test>:
push   %rbx
lea    0xea8(%rip),%rdi
call   1040 <ol_lrc_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
call   1050 <ol_lrc_get_item@plt>
mov    %rax,%rdi
call   1070 <ol_lrc_item_get_time@plt>
cmp    $0x2710,%eax
je     1191 <begin_with_timestamp_test+0x41>
lea    0xe8d(%rip),%rdi
lea    0xea3(%rip),%rdx
mov    $0x6b,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1060 <ol_lrc_free@plt>

LLVM IR (-O0):
%struct.OlLrc = type { i32 }
%struct.OlLrcItem = type { i32 }
@.str = [13 x i8] c"lrc_tail.lrc\00"
@.str.1 = [29 x i8] c"ERROR[%d]: EXPECT %s failed\0A\00"
@.str.2 = [37 x i8] c"ol_lrc_item_get_time (item) == 10000\00"
define void @begin_with_timestamp_test() {
%1 = alloca i8*
%2 = alloca %struct.OlLrc*
%3 = alloca %struct.OlLrcItem*
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %1
%4 = load i8*, i8** %1
%5 = call %struct.OlLrc* @ol_lrc_new(i8* %4)
store %struct.OlLrc* %5, %struct.OlLrc** %2
%6 = load %struct.OlLrc*, %struct.OlLrc** %2
%7 = call %struct.OlLrcItem* @ol_lrc_get_item(%struct.OlLrc* %6, i32 0)
store %struct.OlLrcItem* %7, %struct.OlLrcItem** %3
%8 = load %struct.OlLrcItem*, %struct.OlLrcItem** %3
%9 = call i32 @ol_lrc_item_get_time(%struct.OlLrcItem* %8)
%10 = icmp eq i32 %9, 10000
br i1 %10, label %13, label %11
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 107, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %0
%14 = load %struct.OlLrc*, %struct.OlLrc** %2
%15 = call i32 @ol_lrc_free(%struct.OlLrc* %14)
ret void
}

LLVM IR (-O2):
%struct.OlLrc = type { i32 }
%struct.OlLrcItem = type { i32 }
@.str = [13 x i8] c"lrc_tail.lrc\00"
@.str.1 = [29 x i8] c"ERROR[%d]: EXPECT %s failed\0A\00"
@.str.2 = [37 x i8] c"ol_lrc_item_get_time (item) == 10000\00"
define void @begin_with_timestamp_test() {
%1 = tail call %struct.OlLrc* @ol_lrc_new(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call %struct.OlLrcItem* @ol_lrc_get_item(%struct.OlLrc* %1, i32 0)
%3 = tail call i32 @ol_lrc_item_get_time(%struct.OlLrcItem* %2)
%4 = icmp eq i32 %3, 10000
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 107, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = tail call i32 @ol_lrc_free(%struct.OlLrc* %1)
ret void
}