#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*/ RamWrite32A(int, int);
void SelectPtRange(unsigned char UcSelRange) {
  switch (UcSelRange) {
  case 0x00:
    RamWrite32A(0x1029, 0x3EC2A07F);
    RamWrite32A(0x1129, 0x3EC2A07F);
    RamWrite32A(0x102A, 0x3EC2A07F);
    RamWrite32A(0x112A, 0x3EC2A07F);
    RamWrite32A(0x112B, 0x41058F12);
    RamWrite32A(0x102B, 0x41058F12);
    RamWrite32A(0x102C, 0x41058F12);
    RamWrite32A(0x112C, 0x41058F12);
    RamWrite32A(0x105F, 0x40F2D594);
    RamWrite32A(0x115F, 0x40F2D594);
    break;
  }
}


x86 assembly (clang, -O0):
<SelectPtRange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
test   %al,%al
jne    11c4 <SelectPtRange+0xb4>
jmp    112e <SelectPtRange+0x1e>
mov    $0x1029,%edi
mov    $0x3ec2a07f,%esi
call   1030 <RamWrite32A@plt>
mov    $0x1129,%edi
mov    $0x3ec2a07f,%esi
call   1030 <RamWrite32A@plt>
mov    $0x102a,%edi
mov    $0x3ec2a07f,%esi
call   1030 <RamWrite32A@plt>
mov    $0x112a,%edi
mov    $0x3ec2a07f,%esi
call   1030 <RamWrite32A@plt>
mov    $0x112b,%edi
mov    $0x41058f12,%esi
call   1030 <RamWrite32A@plt>
mov    $0x102b,%edi
mov    $0x41058f12,%esi
call   1030 <RamWrite32A@plt>
mov    $0x102c,%edi
mov    $0x41058f12,%esi
call   1030 <RamWrite32A@plt>
mov    $0x112c,%edi
mov    $0x41058f12,%esi
call   1030 <RamWrite32A@plt>
mov    $0x105f,%edi
mov    $0x40f2d594,%esi
call   1030 <RamWrite32A@plt>
mov    $0x115f,%edi
mov    $0x40f2d594,%esi
call   1030 <RamWrite32A@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SelectPtRange>:
test   %edi,%edi
je     1115 <SelectPtRange+0x5>
ret
push   %rax
mov    $0x1029,%edi
mov    $0x3ec2a07f,%esi
call   1030 <RamWrite32A@plt>
mov    $0x1129,%edi
mov    $0x3ec2a07f,%esi
call   1030 <RamWrite32A@plt>
mov    $0x102a,%edi
mov    $0x3ec2a07f,%esi
call   1030 <RamWrite32A@plt>
mov    $0x112a,%edi
mov    $0x3ec2a07f,%esi
call   1030 <RamWrite32A@plt>
mov    $0x112b,%edi
mov    $0x41058f12,%esi
call   1030 <RamWrite32A@plt>
mov    $0x102b,%edi
mov    $0x41058f12,%esi
call   1030 <RamWrite32A@plt>
mov    $0x102c,%edi
mov    $0x41058f12,%esi
call   1030 <RamWrite32A@plt>
mov    $0x112c,%edi
mov    $0x41058f12,%esi
call   1030 <RamWrite32A@plt>
mov    $0x105f,%edi
mov    $0x40f2d594,%esi
call   1030 <RamWrite32A@plt>
mov    $0x115f,%edi
mov    $0x40f2d594,%esi
pop    %rax
jmp    1030 <RamWrite32A@plt>

LLVM IR (-O0):
define void @SelectPtRange(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
switch i32 %4, label %16 [
i32 0, label %5
]
5: ; preds = %1
%6 = call i32 @RamWrite32A(i32 4137, i32 1052942463)
%7 = call i32 @RamWrite32A(i32 4393, i32 1052942463)
%8 = call i32 @RamWrite32A(i32 4138, i32 1052942463)
%9 = call i32 @RamWrite32A(i32 4394, i32 1052942463)
%10 = call i32 @RamWrite32A(i32 4395, i32 1090883346)
%11 = call i32 @RamWrite32A(i32 4139, i32 1090883346)
%12 = call i32 @RamWrite32A(i32 4140, i32 1090883346)
%13 = call i32 @RamWrite32A(i32 4396, i32 1090883346)
%14 = call i32 @RamWrite32A(i32 4191, i32 1089656212)
%15 = call i32 @RamWrite32A(i32 4447, i32 1089656212)
br label %16
16: ; preds = %1, %5
ret void
}

LLVM IR (-O2):
define void @SelectPtRange(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %3, label %14
3: ; preds = %1
%4 = tail call i32 @RamWrite32A(i32 4137, i32 1052942463)
%5 = tail call i32 @RamWrite32A(i32 4393, i32 1052942463)
%6 = tail call i32 @RamWrite32A(i32 4138, i32 1052942463)
%7 = tail call i32 @RamWrite32A(i32 4394, i32 1052942463)
%8 = tail call i32 @RamWrite32A(i32 4395, i32 1090883346)
%9 = tail call i32 @RamWrite32A(i32 4139, i32 1090883346)
%10 = tail call i32 @RamWrite32A(i32 4140, i32 1090883346)
%11 = tail call i32 @RamWrite32A(i32 4396, i32 1090883346)
%12 = tail call i32 @RamWrite32A(i32 4191, i32 1089656212)
%13 = tail call i32 @RamWrite32A(i32 4447, i32 1089656212)
br label %14
14: ; preds = %1, %3
ret void
}