#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 */

/* Variables and functions */
int /*<<< orphan*/ Con_Printf(char *, char const *);
void libavw_message(int level, const char *message) {
  if (level == 1)
    Con_Printf("^3LibAvcodec warning: %s", message);
  else if (level == 2)
    Con_Printf("^1LibAvcodec error: %s", message);
  else if (level == 3)
    Con_Printf("^1LibAvcodec fatal error: %s", message);
  else
    Con_Printf("LibAvcodec: %s", message);
}


x86 assembly (clang, -O0):
<libavw_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    113e <libavw_message+0x2e>
mov    -0x10(%rbp),%rsi
lea    0xecc(%rip),%rdi
call   1030 <Con_Printf@plt>
jmp    1196 <libavw_message+0x86>
cmpl   $0x2,-0x4(%rbp)
jne    115d <libavw_message+0x4d>
mov    -0x10(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <Con_Printf@plt>
jmp    1191 <libavw_message+0x81>
cmpl   $0x3,-0x4(%rbp)
jne    117c <libavw_message+0x6c>
mov    -0x10(%rbp),%rsi
lea    0xebe(%rip),%rdi
call   1030 <Con_Printf@plt>
jmp    118c <libavw_message+0x7c>
mov    -0x10(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <Con_Printf@plt>
jmp    1191 <libavw_message+0x81>
jmp    1196 <libavw_message+0x86>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libavw_message>:
add    $0xffffffff,%edi
cmp    $0x2,%edi
ja     112e <libavw_message+0x1e>
movslq %edi,%rax
lea    0xf3a(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1030 <Con_Printf@plt>
lea    0xf18(%rip),%rdi
jmp    1030 <Con_Printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"^3LibAvcodec warning: %s\00"
@.str.1 = [23 x i8] c"^1LibAvcodec error: %s\00"
@.str.2 = [29 x i8] c"^1LibAvcodec fatal error: %s\00"
@.str.3 = [15 x i8] c"LibAvcodec: %s\00"
define void @libavw_message(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = call i32 @Con_Printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %27
10: ; preds = %2
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i8*, i8** %4
%15 = call i32 @Con_Printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %14)
br label %26
16: ; preds = %10
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 3
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = load i8*, i8** %4
%21 = call i32 @Con_Printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i8* %20)
br label %25
22: ; preds = %16
%23 = load i8*, i8** %4
%24 = call i32 @Con_Printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %23)
br label %25
25: ; preds = %22, %19
br label %26
26: ; preds = %25, %13
br label %27
27: ; preds = %26, %7
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"^3LibAvcodec warning: %s\00"
@.str.1 = [23 x i8] c"^1LibAvcodec error: %s\00"
@.str.2 = [29 x i8] c"^1LibAvcodec fatal error: %s\00"
@.str.3 = [15 x i8] c"LibAvcodec: %s\00"
@reltable.libavw_message = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.libavw_message to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([23 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.libavw_message to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([29 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.libavw_message to i64)) to i32)]
define void @libavw_message(i32 %0, i8* %1) {
%3 = add i32 %0, -1
%4 = icmp ult i32 %3, 3
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = sext i32 %3 to i64
%7 = shl i64 %6, 2
%8 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.libavw_message to i8*), i64 %7)
br label %9
9: ; preds = %2, %5
%10 = phi i8* [ %8, %5 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), %2 ]
%11 = tail call i32 @Con_Printf(i8* %10, i8* %1)
ret void
}