#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 uint8_t;
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBHostEndpointConfig(uint32_t ui32Base, uint32_t ui32Endpoint,
                           uint32_t ui32MaxPayload,
                           uint32_t ui32NAKPollInterval,
                           uint32_t ui32TargetEndpoint, uint32_t ui32Flags) {
  uint32_t ui32Register;
  ASSERT(ui32Base == 0x40050000);
  ASSERT((ui32Endpoint == 0x00000000) || (ui32Endpoint == 0x00000010) ||
         (ui32Endpoint == 0x00000020) || (ui32Endpoint == 0x00000030) ||
         (ui32Endpoint == 0x00000040) || (ui32Endpoint == 0x00000050) ||
         (ui32Endpoint == 0x00000060) || (ui32Endpoint == 0x00000070));
  ASSERT(ui32NAKPollInterval <= 31);
  if (ui32Endpoint == 0x00000000) {
    (*((volatile uint8_t *)(ui32Base + 0x0000010B))) = ui32NAKPollInterval;
    if (ui32Flags & 0x00004000) {
      (*((volatile uint8_t *)(ui32Base + 0x0000010A))) = 0x00000040;
    } else if (ui32Flags & 0x00001000) {
      (*((volatile uint8_t *)(ui32Base + 0x0000010A))) = 0x00000080;
    } else {
      (*((volatile uint8_t *)(ui32Base + 0x0000010A))) = 0x000000C0;
    }
  } else {
    ui32Register = ui32TargetEndpoint;
    if (ui32Flags & 0x00004000) {
      ui32Register |= 0x00000040;
    } else if (ui32Flags & 0x00001000) {
      ui32Register |= 0x00000080;
    } else {
      ui32Register |= 0x000000C0;
    }
    switch (ui32Flags & 0x00000300) {
    case 0x00000100: {
      ui32Register |= 0x00000020;
      break;
    }
    case 0x00000000: {
      ui32Register |= 0x00000010;
      break;
    }
    case 0x00000200: {
      ui32Register |= 0x00000030;
      break;
    }
    case 0x00000300: {
      ui32Register |= 0x00000000;
      break;
    }
    }
    if (ui32Flags & 0x00002000) {
      (*((volatile uint8_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x0000011A))) =
          ui32Register;
      (*((volatile uint8_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x0000011B))) =
          ui32NAKPollInterval;
      (*((volatile uint16_t *)(ui32Base + (ui32Endpoint - 0x10) +
                               0x00000110))) = ui32MaxPayload;
      ui32Register = 0;
      if (ui32Flags & 0x00000001) {
        ui32Register |= 0x00000080;
      }
      if (ui32Flags & 0x00000010) {
        ui32Register |= 0x00000010 | 0x00000004;
      } else if (ui32Flags & 0x00000008) {
        ui32Register |= 0x00000010;
      }
      (*((volatile uint8_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x00000113))) =
          (uint8_t)ui32Register;
    } else {
      (*((volatile uint8_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x0000011C))) =
          ui32Register;
      (*((volatile uint8_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x0000011D))) =
          ui32NAKPollInterval;
      (*((volatile uint16_t *)(ui32Base + (ui32Endpoint - 0x10) +
                               0x00000114))) = ui32MaxPayload;
      ui32Register = 0;
      if (ui32Flags & 0x00000004) {
        ui32Register |= 0x00000080;
      }
      if (ui32Flags & 0x00000002) {
        ui32Register |= 0x00000040;
      }
      if (ui32Flags & 0x00000010) {
        ui32Register |= 0x00000020 | 0x00000008;
      } else if (ui32Flags & 0x00000008) {
        ui32Register |= 0x00000020;
      }
      (*((volatile uint8_t *)(ui32Base + (ui32Endpoint - 0x10) + 0x00000117))) =
          (uint8_t)ui32Register;
    }
  }
}


x86 assembly (clang, -O0):
<USBHostEndpointConfig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x1d(%rbp)
je     11b3 <USBHostEndpointConfig+0xa3>
mov    $0x1,%al
cmpl   $0x10,-0x8(%rbp)
mov    %al,-0x1d(%rbp)
je     11b3 <USBHostEndpointConfig+0xa3>
mov    $0x1,%al
cmpl   $0x20,-0x8(%rbp)
mov    %al,-0x1d(%rbp)
je     11b3 <USBHostEndpointConfig+0xa3>
mov    $0x1,%al
cmpl   $0x30,-0x8(%rbp)
mov    %al,-0x1d(%rbp)
je     11b3 <USBHostEndpointConfig+0xa3>
mov    $0x1,%al
cmpl   $0x40,-0x8(%rbp)
mov    %al,-0x1d(%rbp)
je     11b3 <USBHostEndpointConfig+0xa3>
mov    $0x1,%al
cmpl   $0x50,-0x8(%rbp)
mov    %al,-0x1d(%rbp)
je     11b3 <USBHostEndpointConfig+0xa3>
mov    $0x1,%al
cmpl   $0x60,-0x8(%rbp)
mov    %al,-0x1d(%rbp)
je     11b3 <USBHostEndpointConfig+0xa3>
cmpl   $0x70,-0x8(%rbp)
sete   %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x1f,-0x10(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1250 <USBHostEndpointConfig+0x140>
mov    -0x10(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0x10b,%eax
cltq
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
and    $0x4000,%eax
cmp    $0x0,%eax
je     1210 <USBHostEndpointConfig+0x100>
mov    -0x4(%rbp),%eax
add    $0x10a,%eax
cltq
movl   $0x40,(%rax)
jmp    124b <USBHostEndpointConfig+0x13b>
mov    -0x18(%rbp),%eax
and    $0x1000,%eax
cmp    $0x0,%eax
je     1236 <USBHostEndpointConfig+0x126>
mov    -0x4(%rbp),%eax
add    $0x10a,%eax
cltq
movl   $0x80,(%rax)
jmp    1246 <USBHostEndpointConfig+0x136>
mov    -0x4(%rbp),%eax
add    $0x10a,%eax
cltq
movl   $0xc0,(%rax)
jmp    124b <USBHostEndpointConfig+0x13b>
jmp    14c9 <USBHostEndpointConfig+0x3b9>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
and    $0x4000,%eax
cmp    $0x0,%eax
je     1275 <USBHostEndpointConfig+0x165>
mov    -0x1c(%rbp),%eax
or     $0x40,%eax
mov    %eax,-0x1c(%rbp)
jmp    12a6 <USBHostEndpointConfig+0x196>
mov    -0x18(%rbp),%eax
and    $0x1000,%eax
cmp    $0x0,%eax
je     1296 <USBHostEndpointConfig+0x186>
mov    -0x1c(%rbp),%eax
or     $0x80,%eax
mov    %eax,-0x1c(%rbp)
jmp    12a1 <USBHostEndpointConfig+0x191>
mov    -0x1c(%rbp),%eax
or     $0xc0,%eax
mov    %eax,-0x1c(%rbp)
jmp    12a6 <USBHostEndpointConfig+0x196>
mov    -0x18(%rbp),%eax
and    $0x300,%eax
mov    %eax,-0x24(%rbp)
je     1303 <USBHostEndpointConfig+0x1f3>
jmp    12bc <USBHostEndpointConfig+0x1ac>
mov    -0x24(%rbp),%eax
sub    $0x100,%eax
je     12f5 <USBHostEndpointConfig+0x1e5>
jmp    12cf <USBHostEndpointConfig+0x1bf>
mov    -0x24(%rbp),%eax
sub    $0x200,%eax
je     1311 <USBHostEndpointConfig+0x201>
jmp    12e2 <USBHostEndpointConfig+0x1d2>
mov    -0x24(%rbp),%eax
sub    $0x300,%eax
je     131f <USBHostEndpointConfig+0x20f>
jmp    1328 <USBHostEndpointConfig+0x218>
mov    -0x1c(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0x1c(%rbp)
jmp    1328 <USBHostEndpointConfig+0x218>
mov    -0x1c(%rbp),%eax
or     $0x10,%eax
mov    %eax,-0x1c(%rbp)
jmp    1328 <USBHostEndpointConfig+0x218>
mov    -0x1c(%rbp),%eax
or     $0x30,%eax
mov    %eax,-0x1c(%rbp)
jmp    1328 <USBHostEndpointConfig+0x218>
mov    -0x1c(%rbp),%eax
or     $0x0,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
and    $0x2000,%eax
cmp    $0x0,%eax
je     13f5 <USBHostEndpointConfig+0x2e5>
mov    -0x1c(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
sub    $0x10,%edx
add    %edx,%eax
add    $0x11a,%eax
cltq
mov    %ecx,(%rax)
mov    -0x10(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
sub    $0x10,%edx
add    %edx,%eax
add    $0x11b,%eax
cltq
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
sub    $0x10,%edx
add    %edx,%eax
add    $0x110,%eax
cltq
mov    %ecx,(%rax)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     139f <USBHostEndpointConfig+0x28f>
mov    -0x1c(%rbp),%eax
or     $0x80,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     13bc <USBHostEndpointConfig+0x2ac>
mov    -0x1c(%rbp),%eax
or     $0x14,%eax
mov    %eax,-0x1c(%rbp)
jmp    13d9 <USBHostEndpointConfig+0x2c9>
mov    -0x18(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     13d4 <USBHostEndpointConfig+0x2c4>
mov    -0x1c(%rbp),%eax
or     $0x10,%eax
mov    %eax,-0x1c(%rbp)
jmp    13d9 <USBHostEndpointConfig+0x2c9>
mov    -0x1c(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
sub    $0x10,%edx
add    %edx,%eax
add    $0x113,%eax
cltq
mov    %ecx,(%rax)
jmp    14c4 <USBHostEndpointConfig+0x3b4>
mov    -0x1c(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
sub    $0x10,%edx
add    %edx,%eax
add    $0x11c,%eax
cltq
mov    %ecx,(%rax)
mov    -0x10(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
sub    $0x10,%edx
add    %edx,%eax
add    $0x11d,%eax
cltq
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
sub    $0x10,%edx
add    %edx,%eax
add    $0x114,%eax
cltq
mov    %ecx,(%rax)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     145b <USBHostEndpointConfig+0x34b>
mov    -0x1c(%rbp),%eax
or     $0x80,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1473 <USBHostEndpointConfig+0x363>
mov    -0x1c(%rbp),%eax
or     $0x40,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1490 <USBHostEndpointConfig+0x380>
mov    -0x1c(%rbp),%eax
or     $0x28,%eax
mov    %eax,-0x1c(%rbp)
jmp    14ad <USBHostEndpointConfig+0x39d>
mov    -0x18(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     14a8 <USBHostEndpointConfig+0x398>
mov    -0x1c(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0x1c(%rbp)
jmp    14ad <USBHostEndpointConfig+0x39d>
mov    -0x1c(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
sub    $0x10,%edx
add    %edx,%eax
add    $0x117,%eax
cltq
mov    %ecx,(%rax)
jmp    14c9 <USBHostEndpointConfig+0x3b9>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBHostEndpointConfig>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%ebx
mov    %r8d,%r13d
mov    %ecx,%r15d
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%r12d
xor    %edi,%edi
cmp    $0x40050000,%r12d
sete   %dil
call   1030 <ASSERT@plt>
mov    %ebp,%eax
rol    $0x1c,%eax
xor    %edi,%edi
cmp    $0x8,%eax
setb   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x20,%r15d
setl   %dil
call   1030 <ASSERT@plt>
test   %ebp,%ebp
je     11a3 <USBHostEndpointConfig+0x93>
xor    %ecx,%ecx
test   $0x1000,%ebx
sete   %cl
or     $0x2,%ecx
shl    $0x6,%ecx
test   $0x4000,%ebx
mov    $0x40,%eax
cmove  %ecx,%eax
or     %r13d,%eax
mov    %ebx,%ecx
shr    $0x8,%ecx
and    $0x3,%ecx
lea    0xe6b(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
or     $0x10,%eax
jmp    11e7 <USBHostEndpointConfig+0xd7>
movslq %r12d,%rax
mov    %r15d,0x10b(%rax)
test   $0x4000,%ebx
jne    11d0 <USBHostEndpointConfig+0xc0>
test   $0x1000,%ebx
jne    1271 <USBHostEndpointConfig+0x161>
movl   $0xc0,0x10a(%rax)
jmp    127b <USBHostEndpointConfig+0x16b>
movl   $0x40,0x10a(%rax)
jmp    127b <USBHostEndpointConfig+0x16b>
or     $0x20,%eax
jmp    11e7 <USBHostEndpointConfig+0xd7>
or     $0x30,%eax
lea    (%r12,%rbp,1),%ecx
add    $0xfffffff0,%ecx
movslq %ecx,%rcx
test   $0x2000,%ebx
jne    1232 <USBHostEndpointConfig+0x122>
mov    %eax,0x11c(%rcx)
mov    %r15d,0x11d(%rcx)
mov    %r14d,0x114(%rcx)
mov    %ebx,%eax
and    $0x6,%eax
shl    $0x5,%eax
mov    %ebx,%edx
shl    $0x2,%edx
and    $0x20,%edx
test   $0x10,%bl
mov    $0x28,%esi
cmove  %edx,%esi
or     %eax,%esi
mov    %esi,0x117(%rcx)
jmp    127b <USBHostEndpointConfig+0x16b>
mov    %eax,0x11a(%rcx)
mov    %r15d,0x11b(%rcx)
mov    %r14d,0x110(%rcx)
test   $0x10,%bl
jne    1260 <USBHostEndpointConfig+0x150>
rol    $0x4,%bl
mov    %ebx,%eax
shr    $0x3,%al
shl    $0x3,%bl
and    $0x80,%bl
or     %al,%bl
and    $0x90,%bl
jmp    1266 <USBHostEndpointConfig+0x156>
shl    $0x7,%ebx
or     $0x14,%ebx
movzbl %bl,%eax
mov    %eax,0x113(%rcx)
jmp    127b <USBHostEndpointConfig+0x16b>
movl   $0x80,0x10a(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @USBHostEndpointConfig(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%14 = load i32, i32* %7
%15 = icmp eq i32 %14, 1074069504
%16 = zext i1 %15 to i32
%17 = call i32 @ASSERT(i32 %16)
%18 = load i32, i32* %8
%19 = icmp eq i32 %18, 0
br i1 %19, label %41, label %20
20: ; preds = %6
%21 = load i32, i32* %8
%22 = icmp eq i32 %21, 16
br i1 %22, label %41, label %23
23: ; preds = %20
%24 = load i32, i32* %8
%25 = icmp eq i32 %24, 32
br i1 %25, label %41, label %26
26: ; preds = %23
%27 = load i32, i32* %8
%28 = icmp eq i32 %27, 48
br i1 %28, label %41, label %29
29: ; preds = %26
%30 = load i32, i32* %8
%31 = icmp eq i32 %30, 64
br i1 %31, label %41, label %32
32: ; preds = %29
%33 = load i32, i32* %8
%34 = icmp eq i32 %33, 80
br i1 %34, label %41, label %35
35: ; preds = %32
%36 = load i32, i32* %8
%37 = icmp eq i32 %36, 96
br i1 %37, label %41, label %38
38: ; preds = %35
%39 = load i32, i32* %8
%40 = icmp eq i32 %39, 112
br label %41
41: ; preds = %38, %35, %32, %29, %26, %23, %20, %6
%42 = phi i1 [ true, %35 ], [ true, %32 ], [ true, %29 ], [ true, %26 ], [ true, %23 ], [ true, %20 ], [ true, %6 ], [ %40, %38 ]
%43 = zext i1 %42 to i32
%44 = call i32 @ASSERT(i32 %43)
%45 = load i32, i32* %10
%46 = icmp sle i32 %45, 31
%47 = zext i1 %46 to i32
%48 = call i32 @ASSERT(i32 %47)
%49 = load i32, i32* %8
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %81
51: ; preds = %41
%52 = load i32, i32* %10
%53 = load i32, i32* %7
%54 = add nsw i32 %53, 267
%55 = sext i32 %54 to i64
%56 = inttoptr i64 %55 to i32*
store volatile i32 %52, i32* %56
%57 = load i32, i32* %12
%58 = and i32 %57, 16384
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %65
60: ; preds = %51
%61 = load i32, i32* %7
%62 = add nsw i32 %61, 266
%63 = sext i32 %62 to i64
%64 = inttoptr i64 %63 to i32*
store volatile i32 64, i32* %64
br label %80
65: ; preds = %51
%66 = load i32, i32* %12
%67 = and i32 %66, 4096
%68 = icmp ne i32 %67, 0
br i1 %68, label %69, label %74
69: ; preds = %65
%70 = load i32, i32* %7
%71 = add nsw i32 %70, 266
%72 = sext i32 %71 to i64
%73 = inttoptr i64 %72 to i32*
store volatile i32 128, i32* %73
br label %79
74: ; preds = %65
%75 = load i32, i32* %7
%76 = add nsw i32 %75, 266
%77 = sext i32 %76 to i64
%78 = inttoptr i64 %77 to i32*
store volatile i32 192, i32* %78
br label %79
79: ; preds = %74, %69
br label %80
80: ; preds = %79, %60
br label %237
81: ; preds = %41
%82 = load i32, i32* %11
store i32 %82, i32* %13
%83 = load i32, i32* %12
%84 = and i32 %83, 16384
%85 = icmp ne i32 %84, 0
br i1 %85, label %86, label %89
86: ; preds = %81
%87 = load i32, i32* %13
%88 = or i32 %87, 64
store i32 %88, i32* %13
br label %100
89: ; preds = %81
%90 = load i32, i32* %12
%91 = and i32 %90, 4096
%92 = icmp ne i32 %91, 0
br i1 %92, label %93, label %96
93: ; preds = %89
%94 = load i32, i32* %13
%95 = or i32 %94, 128
store i32 %95, i32* %13
br label %99
96: ; preds = %89
%97 = load i32, i32* %13
%98 = or i32 %97, 192
store i32 %98, i32* %13
br label %99
99: ; preds = %96, %93
br label %100
100: ; preds = %99, %86
%101 = load i32, i32* %12
%102 = and i32 %101, 768
switch i32 %102, label %115 [
i32 256, label %103
i32 0, label %106
i32 512, label %109
i32 768, label %112
]
103: ; preds = %100
%104 = load i32, i32* %13
%105 = or i32 %104, 32
store i32 %105, i32* %13
br label %115
106: ; preds = %100
%107 = load i32, i32* %13
%108 = or i32 %107, 16
store i32 %108, i32* %13
br label %115
109: ; preds = %100
%110 = load i32, i32* %13
%111 = or i32 %110, 48
store i32 %111, i32* %13
br label %115
112: ; preds = %100
%113 = load i32, i32* %13
%114 = or i32 %113, 0
store i32 %114, i32* %13
br label %115
115: ; preds = %100, %112, %109, %106, %103
%116 = load i32, i32* %12
%117 = and i32 %116, 8192
%118 = icmp ne i32 %117, 0
br i1 %118, label %119, label %174
119: ; preds = %115
%120 = load i32, i32* %13
%121 = load i32, i32* %7
%122 = load i32, i32* %8
%123 = sub nsw i32 %122, 16
%124 = add nsw i32 %121, %123
%125 = add nsw i32 %124, 282
%126 = sext i32 %125 to i64
%127 = inttoptr i64 %126 to i32*
store volatile i32 %120, i32* %127
%128 = load i32, i32* %10
%129 = load i32, i32* %7
%130 = load i32, i32* %8
%131 = sub nsw i32 %130, 16
%132 = add nsw i32 %129, %131
%133 = add nsw i32 %132, 283
%134 = sext i32 %133 to i64
%135 = inttoptr i64 %134 to i32*
store volatile i32 %128, i32* %135
%136 = load i32, i32* %9
%137 = load i32, i32* %7
%138 = load i32, i32* %8
%139 = sub nsw i32 %138, 16
%140 = add nsw i32 %137, %139
%141 = add nsw i32 %140, 272
%142 = sext i32 %141 to i64
%143 = inttoptr i64 %142 to i32*
store volatile i32 %136, i32* %143
store i32 0, i32* %13
%144 = load i32, i32* %12
%145 = and i32 %144, 1
%146 = icmp ne i32 %145, 0
br i1 %146, label %147, label %150
147: ; preds = %119
%148 = load i32, i32* %13
%149 = or i32 %148, 128
store i32 %149, i32* %13
br label %150
150: ; preds = %147, %119
%151 = load i32, i32* %12
%152 = and i32 %151, 16
%153 = icmp ne i32 %152, 0
br i1 %153, label %154, label %157
154: ; preds = %150
%155 = load i32, i32* %13
%156 = or i32 %155, 20
store i32 %156, i32* %13
br label %165
157: ; preds = %150
%158 = load i32, i32* %12
%159 = and i32 %158, 8
%160 = icmp ne i32 %159, 0
br i1 %160, label %161, label %164
161: ; preds = %157
%162 = load i32, i32* %13
%163 = or i32 %162, 16
store i32 %163, i32* %13
br label %164
164: ; preds = %161, %157
br label %165
165: ; preds = %164, %154
%166 = load i32, i32* %13
%167 = load i32, i32* %7
%168 = load i32, i32* %8
%169 = sub nsw i32 %168, 16
%170 = add nsw i32 %167, %169
%171 = add nsw i32 %170, 275
%172 = sext i32 %171 to i64
%173 = inttoptr i64 %172 to i32*
store volatile i32 %166, i32* %173
br label %236
174: ; preds = %115
%175 = load i32, i32* %13
%176 = load i32, i32* %7
%177 = load i32, i32* %8
%178 = sub nsw i32 %177, 16
%179 = add nsw i32 %176, %178
%180 = add nsw i32 %179, 284
%181 = sext i32 %180 to i64
%182 = inttoptr i64 %181 to i32*
store volatile i32 %175, i32* %182
%183 = load i32, i32* %10
%184 = load i32, i32* %7
%185 = load i32, i32* %8
%186 = sub nsw i32 %185, 16
%187 = add nsw i32 %184, %186
%188 = add nsw i32 %187, 285
%189 = sext i32 %188 to i64
%190 = inttoptr i64 %189 to i32*
store volatile i32 %183, i32* %190
%191 = load i32, i32* %9
%192 = load i32, i32* %7
%193 = load i32, i32* %8
%194 = sub nsw i32 %193, 16
%195 = add nsw i32 %192, %194
%196 = add nsw i32 %195, 276
%197 = sext i32 %196 to i64
%198 = inttoptr i64 %197 to i32*
store volatile i32 %191, i32* %198
store i32 0, i32* %13
%199 = load i32, i32* %12
%200 = and i32 %199, 4
%201 = icmp ne i32 %200, 0
br i1 %201, label %202, label %205
202: ; preds = %174
%203 = load i32, i32* %13
%204 = or i32 %203, 128
store i32 %204, i32* %13
br label %205
205: ; preds = %202, %174
%206 = load i32, i32* %12
%207 = and i32 %206, 2
%208 = icmp ne i32 %207, 0
br i1 %208, label %209, label %212
209: ; preds = %205
%210 = load i32, i32* %13
%211 = or i32 %210, 64
store i32 %211, i32* %13
br label %212
212: ; preds = %209, %205
%213 = load i32, i32* %12
%214 = and i32 %213, 16
%215 = icmp ne i32 %214, 0
br i1 %215, label %216, label %219
216: ; preds = %212
%217 = load i32, i32* %13
%218 = or i32 %217, 40
store i32 %218, i32* %13
br label %227
219: ; preds = %212
%220 = load i32, i32* %12
%221 = and i32 %220, 8
%222 = icmp ne i32 %221, 0
br i1 %222, label %223, label %226
223: ; preds = %219
%224 = load i32, i32* %13
%225 = or i32 %224, 32
store i32 %225, i32* %13
br label %226
226: ; preds = %223, %219
br label %227
227: ; preds = %226, %216
%228 = load i32, i32* %13
%229 = load i32, i32* %7
%230 = load i32, i32* %8
%231 = sub nsw i32 %230, 16
%232 = add nsw i32 %229, %231
%233 = add nsw i32 %232, 279
%234 = sext i32 %233 to i64
%235 = inttoptr i64 %234 to i32*
store volatile i32 %228, i32* %235
br label %236
236: ; preds = %227, %165
br label %237
237: ; preds = %236, %80
ret void
}

LLVM IR (-O2):
define void @USBHostEndpointConfig(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp eq i32 %0, 1074069504
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
%10 = icmp eq i32 %1, 0
%11 = tail call i32 @llvm.fshl.i32(i32 %1, i32 %1, i32 28)
%12 = icmp ult i32 %11, 8
%13 = zext i1 %12 to i32
%14 = tail call i32 @ASSERT(i32 %13)
%15 = icmp slt i32 %3, 32
%16 = zext i1 %15 to i32
%17 = tail call i32 @ASSERT(i32 %16)
br i1 %10, label %18, label %36
18: ; preds = %6
%19 = add nsw i32 %0, 267
%20 = sext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
store volatile i32 %3, i32* %21
%22 = and i32 %5, 16384
%23 = icmp eq i32 %22, 0
br i1 %23, label %28, label %24
24: ; preds = %18
%25 = add nsw i32 %0, 266
%26 = sext i32 %25 to i64
%27 = inttoptr i64 %26 to i32*
store volatile i32 64, i32* %27
br label %106
28: ; preds = %18
%29 = and i32 %5, 4096
%30 = icmp eq i32 %29, 0
%31 = add nsw i32 %0, 266
%32 = sext i32 %31 to i64
%33 = inttoptr i64 %32 to i32*
br i1 %30, label %35, label %34
34: ; preds = %28
store volatile i32 128, i32* %33
br label %106
35: ; preds = %28
store volatile i32 192, i32* %33
br label %106
36: ; preds = %6
%37 = and i32 %5, 16384
%38 = icmp eq i32 %37, 0
%39 = and i32 %5, 4096
%40 = icmp eq i32 %39, 0
%41 = select i1 %40, i32 192, i32 128
%42 = select i1 %38, i32 %41, i32 64
%43 = or i32 %42, %4
%44 = lshr i32 %5, 8
%45 = and i32 %44, 3
switch i32 %45, label %52 [
i32 1, label %46
i32 0, label %48
i32 2, label %50
i32 3, label %53
]
46: ; preds = %36
%47 = or i32 %43, 32
br label %53
48: ; preds = %36
%49 = or i32 %43, 16
br label %53
50: ; preds = %36
%51 = or i32 %43, 48
br label %53
52: ; preds = %36
unreachable
53: ; preds = %36, %50, %48, %46
%54 = phi i32 [ %51, %50 ], [ %49, %48 ], [ %47, %46 ], [ %43, %36 ]
%55 = and i32 %5, 8192
%56 = icmp eq i32 %55, 0
%57 = add i32 %0, -16
%58 = add i32 %57, %1
br i1 %56, label %85, label %59
59: ; preds = %53
%60 = add nsw i32 %58, 282
%61 = sext i32 %60 to i64
%62 = inttoptr i64 %61 to i32*
store volatile i32 %54, i32* %62
%63 = add nsw i32 %58, 283
%64 = sext i32 %63 to i64
%65 = inttoptr i64 %64 to i32*
store volatile i32 %3, i32* %65
%66 = add nsw i32 %58, 272
%67 = sext i32 %66 to i64
%68 = inttoptr i64 %67 to i32*
store volatile i32 %2, i32* %68
%69 = and i32 %5, 16
%70 = icmp eq i32 %69, 0
br i1 %70, label %75, label %71
71: ; preds = %59
%72 = shl i32 %5, 7
%73 = and i32 %72, 128
%74 = or i32 %73, 20
br label %80
75: ; preds = %59
%76 = trunc i32 %5 to i8
%77 = tail call i8 @llvm.bitreverse.i8(i8 %76)
%78 = and i8 %77, -112
%79 = zext i8 %78 to i32
br label %80
80: ; preds = %75, %71
%81 = phi i32 [ %74, %71 ], [ %79, %75 ]
%82 = add nsw i32 %58, 275
%83 = sext i32 %82 to i64
%84 = inttoptr i64 %83 to i32*
store volatile i32 %81, i32* %84
br label %106
85: ; preds = %53
%86 = add nsw i32 %58, 284
%87 = sext i32 %86 to i64
%88 = inttoptr i64 %87 to i32*
store volatile i32 %54, i32* %88
%89 = add nsw i32 %58, 285
%90 = sext i32 %89 to i64
%91 = inttoptr i64 %90 to i32*
store volatile i32 %3, i32* %91
%92 = add nsw i32 %58, 276
%93 = sext i32 %92 to i64
%94 = inttoptr i64 %93 to i32*
store volatile i32 %2, i32* %94
%95 = shl i32 %5, 5
%96 = and i32 %95, 192
%97 = and i32 %5, 16
%98 = icmp eq i32 %97, 0
%99 = shl i32 %5, 2
%100 = and i32 %99, 32
%101 = select i1 %98, i32 %100, i32 40
%102 = or i32 %96, %101
%103 = add nsw i32 %58, 279
%104 = sext i32 %103 to i64
%105 = inttoptr i64 %104 to i32*
store volatile i32 %102, i32* %105
br label %106
106: ; preds = %80, %85, %24, %35, %34
ret void
}