#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 fix_parser {
  int dummy;
};

/* Variables and functions */
scalar_t__ isgraph(int);
int /*<<< orphan*/ report_splitter_error(struct fix_parser *, char *, int);
__attribute__((no)) void report_unexpected_symbol(struct fix_parser *parser,
                                                  int c) {
  if (isgraph(c))
    report_splitter_error(parser, "Unexpected byte '%c' in FIX message",
                          (char)c);
  else
    report_splitter_error(parser, "Unexpected byte 0x%X in FIX message", c);
}


x86 assembly (clang, -O0):
<report_unexpected_symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <isgraph@plt>
cmp    $0x0,%rax
je     115c <report_unexpected_symbol+0x3c>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
movsbl %al,%edx
lea    0xeae(%rip),%rsi
call   1030 <report_splitter_error@plt>
jmp    116f <report_unexpected_symbol+0x4f>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xeba(%rip),%rsi
call   1030 <report_splitter_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report_unexpected_symbol>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
call   1040 <isgraph@plt>
test   %rax,%rax
je     1144 <report_unexpected_symbol+0x24>
movsbl %bl,%edx
lea    0xec1(%rip),%rsi
mov    %r14,%rdi
jmp    1150 <report_unexpected_symbol+0x30>
lea    0xed9(%rip),%rsi
mov    %r14,%rdi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <report_splitter_error@plt>

LLVM IR (-O0):
%struct.fix_parser = type { i32 }
@.str = [36 x i8] c"Unexpected byte '%c' in FIX message\00"
@.str.1 = [36 x i8] c"Unexpected byte 0x%X in FIX message\00"
define void @report_unexpected_symbol(%struct.fix_parser* %0, i32 %1) {
%3 = alloca %struct.fix_parser*
%4 = alloca i32
store %struct.fix_parser* %0, %struct.fix_parser** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i64 @isgraph(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load %struct.fix_parser*, %struct.fix_parser** %3
%10 = load i32, i32* %4
%11 = trunc i32 %10 to i8
%12 = sext i8 %11 to i32
%13 = call i32 @report_splitter_error(%struct.fix_parser* %9, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %18
14: ; preds = %2
%15 = load %struct.fix_parser*, %struct.fix_parser** %3
%16 = load i32, i32* %4
%17 = call i32 @report_splitter_error(%struct.fix_parser* %15, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %14, %8
ret void
}

LLVM IR (-O2):
%struct.fix_parser = type { i32 }
@.str = [36 x i8] c"Unexpected byte '%c' in FIX message\00"
@.str.1 = [36 x i8] c"Unexpected byte 0x%X in FIX message\00"
define void @report_unexpected_symbol(%struct.fix_parser* %0, i32 %1) {
%3 = tail call i64 @isgraph(i32 %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = shl i32 %1, 24
%7 = ashr exact i32 %6, 24
%8 = tail call i32 @report_splitter_error(%struct.fix_parser* %0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %11
9: ; preds = %2
%10 = tail call i32 @report_splitter_error(%struct.fix_parser* %0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %1)
br label %11
11: ; preds = %9, %5
ret void
}