#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 record_header {
  int dummy;
};
struct file_header {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strlen(char *);
void print_raw_comment(int *tab, int action, char *cur_date, char *cur_time,
                       int utc, char *comment, struct file_header *file_hdr,
                       struct record_header *record_hdr) {
  if (action & 0x02) {
    printf("%s", cur_time);
    if (strlen(cur_date) && utc) {
      printf(" UTC");
    }
    printf("; COM %s\n", comment);
  }
}


x86 assembly (clang, -O0):
<print_raw_comment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0xc(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     11a5 <print_raw_comment+0x85>
mov    -0x20(%rbp),%rsi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
je     1193 <print_raw_comment+0x73>
cmpl   $0x0,-0x24(%rbp)
je     1193 <print_raw_comment+0x73>
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x30(%rbp),%rsi
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_raw_comment>:
test   $0x2,%sil
jne    1117 <print_raw_comment+0x7>
ret
push   %rbp
push   %r14
push   %rbx
mov    %r9,%r14
mov    %r8d,%ebp
mov    %rdx,%rbx
lea    0xed5(%rip),%rdi
mov    %rcx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
test   %ebp,%ebp
je     114c <print_raw_comment+0x3c>
cmpb   $0x0,(%rbx)
je     114c <print_raw_comment+0x3c>
lea    0xebe(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb5(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.file_header = type { i32 }
%struct.record_header = type { i32 }
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c" UTC\00"
@.str.2 = [10 x i8] c"; COM %s\0A\00"
define void @print_raw_comment(i32* %0, i32 %1, i8* %2, i8* %3, i32 %4, i8* %5, %struct.file_header* %6, %struct.record_header* %7) {
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8*
%15 = alloca %struct.file_header*
%16 = alloca %struct.record_header*
store i32* %0, i32** %9
store i32 %1, i32* %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i32 %4, i32* %13
store i8* %5, i8** %14
store %struct.file_header* %6, %struct.file_header** %15
store %struct.record_header* %7, %struct.record_header** %16
%17 = load i32, i32* %10
%18 = and i32 %17, 2
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %34
20: ; preds = %8
%21 = load i8*, i8** %12
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %21)
%23 = load i8*, i8** %11
%24 = call i64 @strlen(i8* %23)
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %31
26: ; preds = %20
%27 = load i32, i32* %13
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %31
31: ; preds = %29, %26, %20
%32 = load i8*, i8** %14
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %32)
br label %34
34: ; preds = %31, %8
ret void
}

LLVM IR (-O2):
%struct.file_header = type { i32 }
%struct.record_header = type { i32 }
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c" UTC\00"
@.str.2 = [10 x i8] c"; COM %s\0A\00"
define void @print_raw_comment(i32* nocapture readnone %0, i32 %1, i8* nocapture %2, i8* %3, i32 %4, i8* %5, %struct.file_header* nocapture readnone %6, %struct.record_header* nocapture readnone %7) {
%9 = and i32 %1, 2
%10 = icmp eq i32 %9, 0
br i1 %10, label %21, label %11
11: ; preds = %8
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%13 = load i8, i8* %2
%14 = icmp ne i8 %13, 0
%15 = icmp ne i32 %4, 0
%16 = and i1 %15, %14
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17, %11
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %5)
br label %21
21: ; preds = %19, %8
ret void
}