#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_lengthmodifier1(wchar_t ch, int *plengthmodifier) {
  switch (ch) {
  case L'h':
    *plengthmodifier = (0x00010002);
    return 1;
  case L'l':
    *plengthmodifier = (0x00010003);
    return 1;
  case L'j':
    *plengthmodifier = (0x00010007);
    return 1;
  case L'z':
    *plengthmodifier = (0x00010006);
    return 1;
  case L't':
    *plengthmodifier = (0x00010008);
    return 1;
  case L'L':
    *plengthmodifier = (0x00010005);
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<set_lengthmodifier1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffb4,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x2e,%eax
ja     11b8 <set_lengthmodifier1+0xb8>
mov    -0x18(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rax
movl   $0x10002,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    11bf <set_lengthmodifier1+0xbf>
mov    -0x10(%rbp),%rax
movl   $0x10003,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    11bf <set_lengthmodifier1+0xbf>
mov    -0x10(%rbp),%rax
movl   $0x10007,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    11bf <set_lengthmodifier1+0xbf>
mov    -0x10(%rbp),%rax
movl   $0x10006,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    11bf <set_lengthmodifier1+0xbf>
mov    -0x10(%rbp),%rax
movl   $0x10008,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    11bf <set_lengthmodifier1+0xbf>
mov    -0x10(%rbp),%rax
movl   $0x10005,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    11bf <set_lengthmodifier1+0xbf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_lengthmodifier1>:
xor    %eax,%eax
add    $0xffffffb4,%edi
cmp    $0x2e,%edi
ja     1147 <set_lengthmodifier1+0x47>
mov    $0x10002,%ecx
lea    0xeea(%rip),%rdx
movslq (%rdx,%rdi,4),%rdi
add    %rdx,%rdi
jmp    *%rdi
mov    $0x10005,%ecx
jmp    1140 <set_lengthmodifier1+0x40>
mov    $0x10007,%ecx
jmp    1140 <set_lengthmodifier1+0x40>
mov    $0x10003,%ecx
jmp    1140 <set_lengthmodifier1+0x40>
mov    $0x10008,%ecx
jmp    1140 <set_lengthmodifier1+0x40>
mov    $0x10006,%ecx
mov    %ecx,(%rsi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @set_lengthmodifier1(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 %19 [
i32 104, label %7
i32 108, label %9
i32 106, label %11
i32 122, label %13
i32 116, label %15
i32 76, label %17
]
7: ; preds = %2
%8 = load i32*, i32** %5
store i32 65538, i32* %8
store i32 1, i32* %3
br label %20
9: ; preds = %2
%10 = load i32*, i32** %5
store i32 65539, i32* %10
store i32 1, i32* %3
br label %20
11: ; preds = %2
%12 = load i32*, i32** %5
store i32 65543, i32* %12
store i32 1, i32* %3
br label %20
13: ; preds = %2
%14 = load i32*, i32** %5
store i32 65542, i32* %14
store i32 1, i32* %3
br label %20
15: ; preds = %2
%16 = load i32*, i32** %5
store i32 65544, i32* %16
store i32 1, i32* %3
br label %20
17: ; preds = %2
%18 = load i32*, i32** %5
store i32 65541, i32* %18
store i32 1, i32* %3
br label %20
19: ; preds = %2
store i32 0, i32* %3
br label %20
20: ; preds = %19, %17, %15, %13, %11, %9, %7
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @set_lengthmodifier1(i32 %0, i32* nocapture writeonly %1) {
switch i32 %0, label %10 [
i32 104, label %8
i32 108, label %3
i32 106, label %4
i32 122, label %5
i32 116, label %6
i32 76, label %7
]
3: ; preds = %2
br label %8
4: ; preds = %2
br label %8
5: ; preds = %2
br label %8
6: ; preds = %2
br label %8
7: ; preds = %2
br label %8
8: ; preds = %2, %3, %4, %5, %6, %7
%9 = phi i32 [ 65541, %7 ], [ 65544, %6 ], [ 65542, %5 ], [ 65543, %4 ], [ 65539, %3 ], [ 65538, %2 ]
store i32 %9, i32* %1
br label %10
10: ; preds = %8, %2
%11 = phi i32 [ 0, %2 ], [ 1, %8 ]
ret i32 %11
}