#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 trace_seq {
  int dummy;
};
struct record {
  int dummy;
};
struct format_field {
  int dummy;
};
struct event_format {
  int dummy;
};

/* Variables and functions */
struct format_field *pevent_find_any_field(struct event_format *, char *);
scalar_t__ pevent_get_field_val(struct trace_seq *, struct event_format *,
                                char *, struct record *, unsigned long long *,
                                int);
int /*<<< orphan*/ trace_seq_printf(struct trace_seq *, char *,
                                    unsigned long long);
int trace_seq_putc(struct trace_seq *, char);
int /*<<< orphan*/ trace_seq_puts(struct trace_seq *, char *);
int /*<<< orphan*/ write_and_save_comm(struct format_field *, struct record *,
                                       struct trace_seq *, unsigned long long);
int /*<<< orphan*/ write_state(struct trace_seq *, unsigned long long);
int sched_switch_handler(struct trace_seq *s, struct record *record,
                         struct event_format *event, void *context) {
  struct format_field *field;
  unsigned long long val;
  if (pevent_get_field_val(s, event, "prev_pid", record, &val, 1))
    return trace_seq_putc(s, '!');
  field = pevent_find_any_field(event, "prev_comm");
  if (field) {
    write_and_save_comm(field, record, s, val);
    trace_seq_putc(s, ':');
  }
  trace_seq_printf(s, "%lld ", val);
  if (pevent_get_field_val(s, event, "prev_prio", record, &val, 0) == 0)
    trace_seq_printf(s, "[%lld] ", val);
  if (pevent_get_field_val(s, event, "prev_state", record, &val, 0) == 0)
    write_state(s, val);
  trace_seq_puts(s, " ==> ");
  if (pevent_get_field_val(s, event, "next_pid", record, &val, 1))
    return trace_seq_putc(s, '!');
  field = pevent_find_any_field(event, "next_comm");
  if (field) {
    write_and_save_comm(field, record, s, val);
    trace_seq_putc(s, ':');
  }
  trace_seq_printf(s, "%lld", val);
  if (pevent_get_field_val(s, event, "next_prio", record, &val, 0) == 0)
    trace_seq_printf(s, " [%lld]", val);
  return 0;
}


x86 assembly (clang, -O0):
<sched_switch_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rcx
lea    0xe65(%rip),%rdx
lea    -0x38(%rbp),%r8
mov    $0x1,%r9d
call   1070 <pevent_get_field_val@plt>
cmp    $0x0,%rax
je     11ca <sched_switch_handler+0x5a>
mov    -0x10(%rbp),%rdi
mov    $0x21,%esi
call   1060 <trace_seq_putc@plt>
mov    %eax,-0x4(%rbp)
jmp    137f <sched_switch_handler+0x20f>
mov    -0x20(%rbp),%rdi
lea    0xe34(%rip),%rsi
call   1040 <pevent_find_any_field@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     120c <sched_switch_handler+0x9c>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x38(%rbp),%rcx
call   1090 <write_and_save_comm@plt>
mov    -0x10(%rbp),%rdi
mov    $0x3a,%esi
call   1060 <trace_seq_putc@plt>
mov    -0x10(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0xdf8(%rip),%rsi
call   1030 <trace_seq_printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rcx
lea    0xde6(%rip),%rdx
lea    -0x38(%rbp),%r8
xor    %r9d,%r9d
call   1070 <pevent_get_field_val@plt>
cmp    $0x0,%rax
jne    125d <sched_switch_handler+0xed>
mov    -0x10(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0xdcb(%rip),%rsi
call   1030 <trace_seq_printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rcx
lea    0xdbb(%rip),%rdx
lea    -0x38(%rbp),%r8
xor    %r9d,%r9d
call   1070 <pevent_get_field_val@plt>
cmp    $0x0,%rax
jne    1293 <sched_switch_handler+0x123>
mov    -0x10(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1080 <write_state@plt>
mov    -0x10(%rbp),%rdi
lea    0xd98(%rip),%rsi
call   1050 <trace_seq_puts@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rcx
lea    0xd86(%rip),%rdx
lea    -0x38(%rbp),%r8
mov    $0x1,%r9d
call   1070 <pevent_get_field_val@plt>
cmp    $0x0,%rax
je     12e5 <sched_switch_handler+0x175>
mov    -0x10(%rbp),%rdi
mov    $0x21,%esi
call   1060 <trace_seq_putc@plt>
mov    %eax,-0x4(%rbp)
jmp    137f <sched_switch_handler+0x20f>
mov    -0x20(%rbp),%rdi
lea    0xd55(%rip),%rsi
call   1040 <pevent_find_any_field@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1327 <sched_switch_handler+0x1b7>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x38(%rbp),%rcx
call   1090 <write_and_save_comm@plt>
mov    -0x10(%rbp),%rdi
mov    $0x3a,%esi
call   1060 <trace_seq_putc@plt>
mov    -0x10(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0xd19(%rip),%rsi
call   1030 <trace_seq_printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rcx
lea    0xd06(%rip),%rdx
lea    -0x38(%rbp),%r8
xor    %r9d,%r9d
call   1070 <pevent_get_field_val@plt>
cmp    $0x0,%rax
jne    1378 <sched_switch_handler+0x208>
mov    -0x10(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0xceb(%rip),%rsi
call   1030 <trace_seq_printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sched_switch_handler>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xe79(%rip),%rdx
mov    %rsp,%r8
mov    %r15,%rsi
mov    %r14,%rcx
mov    $0x1,%r9d
call   1070 <pevent_get_field_val@plt>
test   %rax,%rax
jne    127b <sched_switch_handler+0x10b>
lea    0xe5e(%rip),%rsi
mov    %r15,%rdi
call   1040 <pevent_find_any_field@plt>
test   %rax,%rax
je     11d7 <sched_switch_handler+0x67>
mov    (%rsp),%rcx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1090 <write_and_save_comm@plt>
mov    %rbx,%rdi
mov    $0x3a,%esi
call   1060 <trace_seq_putc@plt>
mov    (%rsp),%rdx
lea    0xe31(%rip),%rsi
mov    %rbx,%rdi
call   1030 <trace_seq_printf@plt>
lea    0xe28(%rip),%rdx
mov    %rsp,%r8
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rcx
xor    %r9d,%r9d
call   1070 <pevent_get_field_val@plt>
test   %rax,%rax
jne    121d <sched_switch_handler+0xad>
mov    (%rsp),%rdx
lea    0xe0e(%rip),%rsi
mov    %rbx,%rdi
call   1030 <trace_seq_printf@plt>
lea    0xe07(%rip),%rdx
mov    %rsp,%r8
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rcx
xor    %r9d,%r9d
call   1070 <pevent_get_field_val@plt>
test   %rax,%rax
jne    1249 <sched_switch_handler+0xd9>
mov    (%rsp),%rsi
mov    %rbx,%rdi
call   1080 <write_state@plt>
lea    0xde6(%rip),%rsi
mov    %rbx,%rdi
call   1050 <trace_seq_puts@plt>
lea    0xddd(%rip),%rdx
mov    %rsp,%r8
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rcx
mov    $0x1,%r9d
call   1070 <pevent_get_field_val@plt>
test   %rax,%rax
je     1297 <sched_switch_handler+0x127>
mov    %rbx,%rdi
mov    $0x21,%esi
call   1060 <trace_seq_putc@plt>
mov    %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xda7(%rip),%rsi
mov    %r15,%rdi
call   1040 <pevent_find_any_field@plt>
test   %rax,%rax
je     12ca <sched_switch_handler+0x15a>
mov    (%rsp),%rcx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1090 <write_and_save_comm@plt>
mov    %rbx,%rdi
mov    $0x3a,%esi
call   1060 <trace_seq_putc@plt>
mov    (%rsp),%rdx
lea    0xd7a(%rip),%rsi
mov    %rbx,%rdi
call   1030 <trace_seq_printf@plt>
lea    0xd70(%rip),%rdx
mov    %rsp,%r8
xor    %ebp,%ebp
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rcx
xor    %r9d,%r9d
call   1070 <pevent_get_field_val@plt>
test   %rax,%rax
jne    128a <sched_switch_handler+0x11a>
mov    (%rsp),%rdx
lea    0xd54(%rip),%rsi
mov    %rbx,%rdi
call   1030 <trace_seq_printf@plt>
jmp    128a <sched_switch_handler+0x11a>

LLVM IR (-O0):
%struct.trace_seq = type { i32 }
%struct.record = type { i32 }
%struct.event_format = type { i32 }
%struct.format_field = type { i32 }
@.str = [9 x i8] c"prev_pid\00"
@.str.1 = [10 x i8] c"prev_comm\00"
@.str.2 = [6 x i8] c"%lld \00"
@.str.3 = [10 x i8] c"prev_prio\00"
@.str.4 = [8 x i8] c"[%lld] \00"
@.str.5 = [11 x i8] c"prev_state\00"
@.str.6 = [6 x i8] c" ==> \00"
@.str.7 = [9 x i8] c"next_pid\00"
@.str.8 = [10 x i8] c"next_comm\00"
@.str.9 = [5 x i8] c"%lld\00"
@.str.10 = [10 x i8] c"next_prio\00"
@.str.11 = [8 x i8] c" [%lld]\00"
define i32 @sched_switch_handler(%struct.trace_seq* %0, %struct.record* %1, %struct.event_format* %2, i8* %3) {
%5 = alloca i32
%6 = alloca %struct.trace_seq*
%7 = alloca %struct.record*
%8 = alloca %struct.event_format*
%9 = alloca i8*
%10 = alloca %struct.format_field*
%11 = alloca i64
store %struct.trace_seq* %0, %struct.trace_seq** %6
store %struct.record* %1, %struct.record** %7
store %struct.event_format* %2, %struct.event_format** %8
store i8* %3, i8** %9
%12 = load %struct.trace_seq*, %struct.trace_seq** %6
%13 = load %struct.event_format*, %struct.event_format** %8
%14 = load %struct.record*, %struct.record** %7
%15 = call i64 @pevent_get_field_val(%struct.trace_seq* %12, %struct.event_format* %13, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.record* %14, i64* %11, i32 1)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %4
%18 = load %struct.trace_seq*, %struct.trace_seq** %6
%19 = call i32 @trace_seq_putc(%struct.trace_seq* %18, i8 signext 33)
store i32 %19, i32* %5
br label %94
20: ; preds = %4
%21 = load %struct.event_format*, %struct.event_format** %8
%22 = call %struct.format_field* @pevent_find_any_field(%struct.event_format* %21, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
store %struct.format_field* %22, %struct.format_field** %10
%23 = load %struct.format_field*, %struct.format_field** %10
%24 = icmp ne %struct.format_field* %23, null
br i1 %24, label %25, label %33
25: ; preds = %20
%26 = load %struct.format_field*, %struct.format_field** %10
%27 = load %struct.record*, %struct.record** %7
%28 = load %struct.trace_seq*, %struct.trace_seq** %6
%29 = load i64, i64* %11
%30 = call i32 @write_and_save_comm(%struct.format_field* %26, %struct.record* %27, %struct.trace_seq* %28, i64 %29)
%31 = load %struct.trace_seq*, %struct.trace_seq** %6
%32 = call i32 @trace_seq_putc(%struct.trace_seq* %31, i8 signext 58)
br label %33
33: ; preds = %25, %20
%34 = load %struct.trace_seq*, %struct.trace_seq** %6
%35 = load i64, i64* %11
%36 = call i32 @trace_seq_printf(%struct.trace_seq* %34, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i64 %35)
%37 = load %struct.trace_seq*, %struct.trace_seq** %6
%38 = load %struct.event_format*, %struct.event_format** %8
%39 = load %struct.record*, %struct.record** %7
%40 = call i64 @pevent_get_field_val(%struct.trace_seq* %37, %struct.event_format* %38, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %struct.record* %39, i64* %11, i32 0)
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %46
42: ; preds = %33
%43 = load %struct.trace_seq*, %struct.trace_seq** %6
%44 = load i64, i64* %11
%45 = call i32 @trace_seq_printf(%struct.trace_seq* %43, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i64 %44)
br label %46
46: ; preds = %42, %33
%47 = load %struct.trace_seq*, %struct.trace_seq** %6
%48 = load %struct.event_format*, %struct.event_format** %8
%49 = load %struct.record*, %struct.record** %7
%50 = call i64 @pevent_get_field_val(%struct.trace_seq* %47, %struct.event_format* %48, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), %struct.record* %49, i64* %11, i32 0)
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %56
52: ; preds = %46
%53 = load %struct.trace_seq*, %struct.trace_seq** %6
%54 = load i64, i64* %11
%55 = call i32 @write_state(%struct.trace_seq* %53, i64 %54)
br label %56
56: ; preds = %52, %46
%57 = load %struct.trace_seq*, %struct.trace_seq** %6
%58 = call i32 @trace_seq_puts(%struct.trace_seq* %57, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%59 = load %struct.trace_seq*, %struct.trace_seq** %6
%60 = load %struct.event_format*, %struct.event_format** %8
%61 = load %struct.record*, %struct.record** %7
%62 = call i64 @pevent_get_field_val(%struct.trace_seq* %59, %struct.event_format* %60, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), %struct.record* %61, i64* %11, i32 1)
%63 = icmp ne i64 %62, 0
br i1 %63, label %64, label %67
64: ; preds = %56
%65 = load %struct.trace_seq*, %struct.trace_seq** %6
%66 = call i32 @trace_seq_putc(%struct.trace_seq* %65, i8 signext 33)
store i32 %66, i32* %5
br label %94
67: ; preds = %56
%68 = load %struct.event_format*, %struct.event_format** %8
%69 = call %struct.format_field* @pevent_find_any_field(%struct.event_format* %68, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
store %struct.format_field* %69, %struct.format_field** %10
%70 = load %struct.format_field*, %struct.format_field** %10
%71 = icmp ne %struct.format_field* %70, null
br i1 %71, label %72, label %80
72: ; preds = %67
%73 = load %struct.format_field*, %struct.format_field** %10
%74 = load %struct.record*, %struct.record** %7
%75 = load %struct.trace_seq*, %struct.trace_seq** %6
%76 = load i64, i64* %11
%77 = call i32 @write_and_save_comm(%struct.format_field* %73, %struct.record* %74, %struct.trace_seq* %75, i64 %76)
%78 = load %struct.trace_seq*, %struct.trace_seq** %6
%79 = call i32 @trace_seq_putc(%struct.trace_seq* %78, i8 signext 58)
br label %80
80: ; preds = %72, %67
%81 = load %struct.trace_seq*, %struct.trace_seq** %6
%82 = load i64, i64* %11
%83 = call i32 @trace_seq_printf(%struct.trace_seq* %81, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i64 %82)
%84 = load %struct.trace_seq*, %struct.trace_seq** %6
%85 = load %struct.event_format*, %struct.event_format** %8
%86 = load %struct.record*, %struct.record** %7
%87 = call i64 @pevent_get_field_val(%struct.trace_seq* %84, %struct.event_format* %85, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), %struct.record* %86, i64* %11, i32 0)
%88 = icmp eq i64 %87, 0
br i1 %88, label %89, label %93
89: ; preds = %80
%90 = load %struct.trace_seq*, %struct.trace_seq** %6
%91 = load i64, i64* %11
%92 = call i32 @trace_seq_printf(%struct.trace_seq* %90, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i64 %91)
br label %93
93: ; preds = %89, %80
store i32 0, i32* %5
br label %94
94: ; preds = %93, %64, %17
%95 = load i32, i32* %5
ret i32 %95
}

LLVM IR (-O2):
%struct.trace_seq = type { i32 }
%struct.record = type { i32 }
%struct.event_format = type { i32 }
%struct.format_field = type { i32 }
@.str = [9 x i8] c"prev_pid\00"
@.str.1 = [10 x i8] c"prev_comm\00"
@.str.2 = [6 x i8] c"%lld \00"
@.str.3 = [10 x i8] c"prev_prio\00"
@.str.4 = [8 x i8] c"[%lld] \00"
@.str.5 = [11 x i8] c"prev_state\00"
@.str.6 = [6 x i8] c" ==> \00"
@.str.7 = [9 x i8] c"next_pid\00"
@.str.8 = [10 x i8] c"next_comm\00"
@.str.9 = [5 x i8] c"%lld\00"
@.str.10 = [10 x i8] c"next_prio\00"
@.str.11 = [8 x i8] c" [%lld]\00"
define i32 @sched_switch_handler(%struct.trace_seq* %0, %struct.record* %1, %struct.event_format* %2, i8* nocapture readnone %3) {
%5 = alloca i64
%6 = bitcast i64* %5 to i8*
%7 = call i64 @pevent_get_field_val(%struct.trace_seq* %0, %struct.event_format* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.record* %1, i64* %5, i32 1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = call i32 @trace_seq_putc(%struct.trace_seq* %0, i8 signext 33)
br label %53
11: ; preds = %4
%12 = call %struct.format_field* @pevent_find_any_field(%struct.event_format* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq %struct.format_field* %12, null
br i1 %13, label %18, label %14
14: ; preds = %11
%15 = load i64, i64* %5
%16 = call i32 @write_and_save_comm(%struct.format_field* %12, %struct.record* %1, %struct.trace_seq* %0, i64 %15)
%17 = call i32 @trace_seq_putc(%struct.trace_seq* %0, i8 signext 58)
br label %18
18: ; preds = %14, %11
%19 = load i64, i64* %5
%20 = call i32 @trace_seq_printf(%struct.trace_seq* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i64 %19)
%21 = call i64 @pevent_get_field_val(%struct.trace_seq* %0, %struct.event_format* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %struct.record* %1, i64* %5, i32 0)
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %18
%24 = load i64, i64* %5
%25 = call i32 @trace_seq_printf(%struct.trace_seq* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i64 %24)
br label %26
26: ; preds = %23, %18
%27 = call i64 @pevent_get_field_val(%struct.trace_seq* %0, %struct.event_format* %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), %struct.record* %1, i64* %5, i32 0)
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %32
29: ; preds = %26
%30 = load i64, i64* %5
%31 = call i32 @write_state(%struct.trace_seq* %0, i64 %30)
br label %32
32: ; preds = %29, %26
%33 = call i32 @trace_seq_puts(%struct.trace_seq* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%34 = call i64 @pevent_get_field_val(%struct.trace_seq* %0, %struct.event_format* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), %struct.record* %1, i64* %5, i32 1)
%35 = icmp eq i64 %34, 0
br i1 %35, label %38, label %36
36: ; preds = %32
%37 = call i32 @trace_seq_putc(%struct.trace_seq* %0, i8 signext 33)
br label %53
38: ; preds = %32
%39 = call %struct.format_field* @pevent_find_any_field(%struct.event_format* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
%40 = icmp eq %struct.format_field* %39, null
br i1 %40, label %45, label %41
41: ; preds = %38
%42 = load i64, i64* %5
%43 = call i32 @write_and_save_comm(%struct.format_field* %39, %struct.record* %1, %struct.trace_seq* %0, i64 %42)
%44 = call i32 @trace_seq_putc(%struct.trace_seq* %0, i8 signext 58)
br label %45
45: ; preds = %41, %38
%46 = load i64, i64* %5
%47 = call i32 @trace_seq_printf(%struct.trace_seq* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i64 %46)
%48 = call i64 @pevent_get_field_val(%struct.trace_seq* %0, %struct.event_format* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), %struct.record* %1, i64* %5, i32 0)
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %53
50: ; preds = %45
%51 = load i64, i64* %5
%52 = call i32 @trace_seq_printf(%struct.trace_seq* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i64 %51)
br label %53
53: ; preds = %45, %50, %36, %9
%54 = phi i32 [ %10, %9 ], [ %37, %36 ], [ 0, %50 ], [ 0, %45 ]
ret i32 %54
}