#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*/ sprintf(char *, char *);
char *getPhysicsDesc(char *physicsName, int physicsValue) {
  switch (physicsValue) {
  case 239:
    sprintf(physicsName, "AP (with OB)");
    break;
  case 255:
    sprintf(physicsName, "AP (no OB)");
    break;
  case 3:
    sprintf(physicsName, "VQ3 (with OB)");
    break;
  case 19:
    sprintf(physicsName, "VQ3 (no OB)");
    break;
  case 0:
    sprintf(physicsName, "VET");
    break;
  default:
    sprintf(physicsName, "^1Unknown!");
    break;
  }
  return physicsName;
}


x86 assembly (clang, -O0):
<getPhysicsDesc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     11ce <getPhysicsDesc+0xbe>
jmp    1132 <getPhysicsDesc+0x22>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
je     11a4 <getPhysicsDesc+0x94>
jmp    1143 <getPhysicsDesc+0x33>
mov    -0x10(%rbp),%eax
sub    $0x13,%eax
je     11b9 <getPhysicsDesc+0xa9>
jmp    1154 <getPhysicsDesc+0x44>
mov    -0x10(%rbp),%eax
sub    $0xef,%eax
je     117a <getPhysicsDesc+0x6a>
jmp    1167 <getPhysicsDesc+0x57>
mov    -0x10(%rbp),%eax
sub    $0xff,%eax
je     118f <getPhysicsDesc+0x7f>
jmp    11e3 <getPhysicsDesc+0xd3>
mov    -0x8(%rbp),%rdi
lea    0xe7b(%rip),%rsi
call   1030 <sprintf@plt>
jmp    11f3 <getPhysicsDesc+0xe3>
mov    -0x8(%rbp),%rdi
lea    0xe73(%rip),%rsi
call   1030 <sprintf@plt>
jmp    11f3 <getPhysicsDesc+0xe3>
mov    -0x8(%rbp),%rdi
lea    0xe69(%rip),%rsi
call   1030 <sprintf@plt>
jmp    11f3 <getPhysicsDesc+0xe3>
mov    -0x8(%rbp),%rdi
lea    0xe62(%rip),%rsi
call   1030 <sprintf@plt>
jmp    11f3 <getPhysicsDesc+0xe3>
mov    -0x8(%rbp),%rdi
lea    0xe59(%rip),%rsi
call   1030 <sprintf@plt>
jmp    11f3 <getPhysicsDesc+0xe3>
mov    -0x8(%rbp),%rdi
lea    0xe48(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPhysicsDesc>:
mov    %rdi,%rax
cmp    $0x12,%esi
jle    1139 <getPhysicsDesc+0x39>
cmp    $0x13,%esi
je     115e <getPhysicsDesc+0x5e>
cmp    $0xff,%esi
je     1173 <getPhysicsDesc+0x73>
cmp    $0xef,%esi
jne    118f <getPhysicsDesc+0x8f>
movabs $0x29424f20687469,%rcx
mov    %rcx,0x5(%rax)
movabs $0x6874697728205041,%rcx
69 74 68
mov    %rcx,(%rax)
ret
test   %esi,%esi
je     1188 <getPhysicsDesc+0x88>
cmp    $0x3,%esi
jne    118f <getPhysicsDesc+0x8f>
movabs $0x29424f20687469,%rcx
mov    %rcx,0x6(%rax)
movabs $0x7469772820335156,%rcx
77 69 74
mov    %rcx,(%rax)
ret
movabs $0x206f6e2820335156,%rcx
6e 6f 20
mov    %rcx,(%rax)
movl   $0x29424f,0x8(%rax)
ret
movabs $0x4f206f6e28205041,%rcx
6f 20 4f
mov    %rcx,(%rax)
movl   $0x29424f,0x7(%rax)
ret
movl   $0x544556,(%rax)
ret
movabs $0x776f6e6b6e55315e,%rcx
6e 6f 77
mov    %rcx,(%rax)
movl   $0x216e77,0x7(%rax)
ret

LLVM IR (-O0):
@.str = [13 x i8] c"AP (with OB)\00"
@.str.1 = [11 x i8] c"AP (no OB)\00"
@.str.2 = [14 x i8] c"VQ3 (with OB)\00"
@.str.3 = [12 x i8] c"VQ3 (no OB)\00"
@.str.4 = [4 x i8] c"VET\00"
@.str.5 = [11 x i8] c"^1Unknown!\00"
define i8* @getPhysicsDesc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
switch i32 %5, label %21 [
i32 239, label %6
i32 255, label %9
i32 3, label %12
i32 19, label %15
i32 0, label %18
]
6: ; preds = %2
%7 = load i8*, i8** %3
%8 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %24
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %24
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
br label %24
15: ; preds = %2
%16 = load i8*, i8** %3
%17 = call i32 @sprintf(i8* %16, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
br label %24
18: ; preds = %2
%19 = load i8*, i8** %3
%20 = call i32 @sprintf(i8* %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
br label %24
21: ; preds = %2
%22 = load i8*, i8** %3
%23 = call i32 @sprintf(i8* %22, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %24
24: ; preds = %21, %18, %15, %12, %9, %6
%25 = load i8*, i8** %3
ret i8* %25
}

LLVM IR (-O2):
@.str = [13 x i8] c"AP (with OB)\00"
@.str.1 = [11 x i8] c"AP (no OB)\00"
@.str.2 = [14 x i8] c"VQ3 (with OB)\00"
@.str.3 = [12 x i8] c"VQ3 (no OB)\00"
@.str.5 = [11 x i8] c"^1Unknown!\00"
define i8* @getPhysicsDesc(i8* returned writeonly %0, i32 %1) {
switch i32 %1, label %9 [
i32 239, label %3
i32 255, label %4
i32 3, label %5
i32 19, label %6
i32 0, label %7
]
3: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(13) %0, i8* align 1 dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 13, i1 false)
br label %10
4: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(11) %0, i8* align 1 dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 11, i1 false)
br label %10
5: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(14) %0, i8* align 1 dereferenceable(14) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i64 14, i1 false)
br label %10
6: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(12) %0, i8* align 1 dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i64 12, i1 false)
br label %10
7: ; preds = %2
%8 = bitcast i8* %0 to i32*
store i32 5522774, i32* %8
br label %10
9: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(11) %0, i8* align 1 dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i64 11, i1 false)
br label %10
10: ; preds = %9, %7, %6, %5, %4, %3
ret i8* %0
}