#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 per_dev_info {
  int dummy;
};
struct per_cpu_info {
  int dummy;
};
struct blk_io_trace {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ log_track_frontmerge(struct per_dev_info *,
                                        struct blk_io_trace *);
int /*<<< orphan*/ process_fmt(char *, struct per_cpu_info *,
                               struct blk_io_trace *, unsigned long long,
                               int /*<<< orphan*/, int /*<<< orphan*/ *);
void log_merge(struct per_dev_info *pdi, struct per_cpu_info *pci,
               struct blk_io_trace *t, char *act) {
  if (act[0] == 'F')
    log_track_frontmerge(pdi, t);
  process_fmt(act, pci, t, -1ULL, 0, NULL);
}


x86 assembly (clang, -O0):
<log_merge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x46,%eax
jne    1155 <log_merge+0x35>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <log_track_frontmerge@plt>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0xffffffffffffffff,%rcx
xor    %r8d,%r8d
xor    %eax,%eax
mov    %eax,%r9d
call   1030 <process_fmt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_merge>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %rsi,%r15
cmpb   $0x46,(%rcx)
jne    113b <log_merge+0x1b>
mov    %r14,%rsi
call   1040 <log_track_frontmerge@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    $0xffffffffffffffff,%rcx
xor    %r8d,%r8d
xor    %r9d,%r9d
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <process_fmt@plt>

LLVM IR (-O0):
%struct.per_dev_info = type { i32 }
%struct.per_cpu_info = type { i32 }
%struct.blk_io_trace = type { i32 }
define void @log_merge(%struct.per_dev_info* %0, %struct.per_cpu_info* %1, %struct.blk_io_trace* %2, i8* %3) {
%5 = alloca %struct.per_dev_info*
%6 = alloca %struct.per_cpu_info*
%7 = alloca %struct.blk_io_trace*
%8 = alloca i8*
store %struct.per_dev_info* %0, %struct.per_dev_info** %5
store %struct.per_cpu_info* %1, %struct.per_cpu_info** %6
store %struct.blk_io_trace* %2, %struct.blk_io_trace** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 70
br i1 %13, label %14, label %18
14: ; preds = %4
%15 = load %struct.per_dev_info*, %struct.per_dev_info** %5
%16 = load %struct.blk_io_trace*, %struct.blk_io_trace** %7
%17 = call i32 @log_track_frontmerge(%struct.per_dev_info* %15, %struct.blk_io_trace* %16)
br label %18
18: ; preds = %14, %4
%19 = load i8*, i8** %8
%20 = load %struct.per_cpu_info*, %struct.per_cpu_info** %6
%21 = load %struct.blk_io_trace*, %struct.blk_io_trace** %7
%22 = call i32 @process_fmt(i8* %19, %struct.per_cpu_info* %20, %struct.blk_io_trace* %21, i64 -1, i32 0, i32* null)
ret void
}

LLVM IR (-O2):
%struct.per_dev_info = type { i32 }
%struct.per_cpu_info = type { i32 }
%struct.blk_io_trace = type { i32 }
define void @log_merge(%struct.per_dev_info* %0, %struct.per_cpu_info* %1, %struct.blk_io_trace* %2, i8* %3) {
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 70
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @log_track_frontmerge(%struct.per_dev_info* %0, %struct.blk_io_trace* %2)
br label %9
9: ; preds = %7, %4
%10 = tail call i32 @process_fmt(i8* %3, %struct.per_cpu_info* %1, %struct.blk_io_trace* %2, i64 -1, i32 0, i32* null)
ret void
}