#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 */
typedef int wchar_t;

/* Variables and functions */
int set_conversion(wchar_t ch, int *pconversion) {
  switch (ch) {
  case L'd':
  case L'i':
    *pconversion = (0x00020001);
    return 1;
  case L'u':
    *pconversion = (0x00020003);
    return 1;
  case L'x':
    *pconversion = (0x0002000B);
    return 1;
  case L'X':
    *pconversion = (0x0002000C);
    return 1;
  case L'o':
    *pconversion = (0x0002000D);
    return 1;
  case L'f':
    *pconversion = (0x00020005);
    return 1;
  case L'F':
    *pconversion = (0x00020006);
    return 1;
  case L'e':
    *pconversion = (0x00020007);
    return 1;
  case L'E':
    *pconversion = (0x00020008);
    return 1;
  case L'g':
    *pconversion = (0x00020009);
    return 1;
  case L'G':
    *pconversion = (0x0002000A);
    return 1;
  case L'c':
    *pconversion = (0x00020011);
    return 1;
  case L's':
    *pconversion = (0x0002000F);
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<set_conversion>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffbb,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x33,%eax
ja     1252 <set_conversion+0x152>
mov    -0x18(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
movl   $0x20001,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1259 <set_conversion+0x159>
mov    -0x10(%rbp),%rax
movl   $0x20003,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1259 <set_conversion+0x159>
mov    -0x10(%rbp),%rax
movl   $0x2000b,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1259 <set_conversion+0x159>
mov    -0x10(%rbp),%rax
movl   $0x2000c,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1259 <set_conversion+0x159>
mov    -0x10(%rbp),%rax
movl   $0x2000d,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1259 <set_conversion+0x159>
mov    -0x10(%rbp),%rax
movl   $0x20005,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1259 <set_conversion+0x159>
mov    -0x10(%rbp),%rax
movl   $0x20006,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1259 <set_conversion+0x159>
mov    -0x10(%rbp),%rax
movl   $0x20007,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1259 <set_conversion+0x159>
mov    -0x10(%rbp),%rax
movl   $0x20008,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1259 <set_conversion+0x159>
mov    -0x10(%rbp),%rax
movl   $0x20009,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1259 <set_conversion+0x159>
mov    -0x10(%rbp),%rax
movl   $0x2000a,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1259 <set_conversion+0x159>
mov    -0x10(%rbp),%rax
movl   $0x20011,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1259 <set_conversion+0x159>
mov    -0x10(%rbp),%rax
movl   $0x2000f,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1259 <set_conversion+0x159>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_conversion>:
xor    %eax,%eax
add    $0xffffffbb,%edi
cmp    $0x33,%edi
ja     1178 <set_conversion+0x78>
mov    $0x20001,%ecx
lea    0xeea(%rip),%rdx
movslq (%rdx,%rdi,4),%rdi
add    %rdx,%rdi
jmp    *%rdi
mov    $0x20008,%ecx
jmp    1171 <set_conversion+0x71>
mov    $0x20006,%ecx
jmp    1171 <set_conversion+0x71>
mov    $0x2000a,%ecx
jmp    1171 <set_conversion+0x71>
mov    $0x2000c,%ecx
jmp    1171 <set_conversion+0x71>
mov    $0x20011,%ecx
jmp    1171 <set_conversion+0x71>
mov    $0x20007,%ecx
jmp    1171 <set_conversion+0x71>
mov    $0x20005,%ecx
jmp    1171 <set_conversion+0x71>
mov    $0x20009,%ecx
jmp    1171 <set_conversion+0x71>
mov    $0x2000d,%ecx
jmp    1171 <set_conversion+0x71>
mov    $0x2000f,%ecx
jmp    1171 <set_conversion+0x71>
mov    $0x20003,%ecx
jmp    1171 <set_conversion+0x71>
mov    $0x2000b,%ecx
mov    %ecx,(%rsi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @set_conversion(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
%6 = load i32, i32* %4
switch i32 %6, label %33 [
i32 100, label %7
i32 105, label %7
i32 117, label %9
i32 120, label %11
i32 88, label %13
i32 111, label %15
i32 102, label %17
i32 70, label %19
i32 101, label %21
i32 69, label %23
i32 103, label %25
i32 71, label %27
i32 99, label %29
i32 115, label %31
]
7: ; preds = %2, %2
%8 = load i32*, i32** %5
store i32 131073, i32* %8
store i32 1, i32* %3
br label %34
9: ; preds = %2
%10 = load i32*, i32** %5
store i32 131075, i32* %10
store i32 1, i32* %3
br label %34
11: ; preds = %2
%12 = load i32*, i32** %5
store i32 131083, i32* %12
store i32 1, i32* %3
br label %34
13: ; preds = %2
%14 = load i32*, i32** %5
store i32 131084, i32* %14
store i32 1, i32* %3
br label %34
15: ; preds = %2
%16 = load i32*, i32** %5
store i32 131085, i32* %16
store i32 1, i32* %3
br label %34
17: ; preds = %2
%18 = load i32*, i32** %5
store i32 131077, i32* %18
store i32 1, i32* %3
br label %34
19: ; preds = %2
%20 = load i32*, i32** %5
store i32 131078, i32* %20
store i32 1, i32* %3
br label %34
21: ; preds = %2
%22 = load i32*, i32** %5
store i32 131079, i32* %22
store i32 1, i32* %3
br label %34
23: ; preds = %2
%24 = load i32*, i32** %5
store i32 131080, i32* %24
store i32 1, i32* %3
br label %34
25: ; preds = %2
%26 = load i32*, i32** %5
store i32 131081, i32* %26
store i32 1, i32* %3
br label %34
27: ; preds = %2
%28 = load i32*, i32** %5
store i32 131082, i32* %28
store i32 1, i32* %3
br label %34
29: ; preds = %2
%30 = load i32*, i32** %5
store i32 131089, i32* %30
store i32 1, i32* %3
br label %34
31: ; preds = %2
%32 = load i32*, i32** %5
store i32 131087, i32* %32
store i32 1, i32* %3
br label %34
33: ; preds = %2
store i32 0, i32* %3
br label %34
34: ; preds = %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11, %9, %7
%35 = load i32, i32* %3
ret i32 %35
}

LLVM IR (-O2):
define i32 @set_conversion(i32 %0, i32* nocapture writeonly %1) {
switch i32 %0, label %17 [
i32 100, label %15
i32 105, label %15
i32 117, label %3
i32 120, label %4
i32 88, label %5
i32 111, label %6
i32 102, label %7
i32 70, label %8
i32 101, label %9
i32 69, label %10
i32 103, label %11
i32 71, label %12
i32 99, label %13
i32 115, label %14
]
3: ; preds = %2
br label %15
4: ; preds = %2
br label %15
5: ; preds = %2
br label %15
6: ; preds = %2
br label %15
7: ; preds = %2
br label %15
8: ; preds = %2
br label %15
9: ; preds = %2
br label %15
10: ; preds = %2
br label %15
11: ; preds = %2
br label %15
12: ; preds = %2
br label %15
13: ; preds = %2
br label %15
14: ; preds = %2
br label %15
15: ; preds = %2, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14
%16 = phi i32 [ 131087, %14 ], [ 131089, %13 ], [ 131082, %12 ], [ 131081, %11 ], [ 131080, %10 ], [ 131079, %9 ], [ 131078, %8 ], [ 131077, %7 ], [ 131085, %6 ], [ 131084, %5 ], [ 131083, %4 ], [ 131075, %3 ], [ 131073, %2 ], [ 131073, %2 ]
store i32 %16, i32* %1
br label %17
17: ; preds = %15, %2
%18 = phi i32 [ 0, %2 ], [ 1, %15 ]
ret i32 %18
}