#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*/ printf(char *, int);
int get_config_default(int attribute, int *value) {
  switch (attribute) {
  case 1:
  case 4:
  case 5:
    *value = 1;
    break;
  case 6:
    *value = 0;
    break;
  case 7:
    *value = 0;
    break;
  case 8:
    *value = 5;
    break;
  case 9:
    *value = 6;
    break;
  case 10:
    *value = 5;
    break;
  case 11:
    *value = 8;
    break;
  case 12:
    *value = 16;
    break;
  case 13:
  case 14:
  case 15:
  case 16:
  case 17:
    *value = 0;
    break;
  case 0x8011:
    *value = 0x00000001;
    break;
  case 0x800B:
    *value = 1;
    break;
  case 0x8013:
    *value = 1;
    break;
  case 0x8010:
    *value = 0x00000001;
    break;
  case 2:
    *value = 16;
    return 0;
  default:
    printf("libGL: unknown attrib %i\n", attribute);
    *value = 0;
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<get_config_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0x1,%eax
je     122f <get_config_default+0x11f>
jmp    1133 <get_config_default+0x23>
mov    -0x14(%rbp),%eax
sub    $0x2,%eax
je     12f2 <get_config_default+0x1e2>
jmp    1144 <get_config_default+0x34>
mov    -0x14(%rbp),%eax
add    $0xfffffffc,%eax
sub    $0x2,%eax
jb     122f <get_config_default+0x11f>
jmp    1158 <get_config_default+0x48>
mov    -0x14(%rbp),%eax
sub    $0x6,%eax
je     123e <get_config_default+0x12e>
jmp    1169 <get_config_default+0x59>
mov    -0x14(%rbp),%eax
sub    $0x7,%eax
je     124d <get_config_default+0x13d>
jmp    117a <get_config_default+0x6a>
mov    -0x14(%rbp),%eax
sub    $0x8,%eax
je     125c <get_config_default+0x14c>
jmp    118b <get_config_default+0x7b>
mov    -0x14(%rbp),%eax
sub    $0x9,%eax
je     126b <get_config_default+0x15b>
jmp    119c <get_config_default+0x8c>
mov    -0x14(%rbp),%eax
sub    $0xa,%eax
je     127a <get_config_default+0x16a>
jmp    11ad <get_config_default+0x9d>
mov    -0x14(%rbp),%eax
sub    $0xb,%eax
je     1289 <get_config_default+0x179>
jmp    11be <get_config_default+0xae>
mov    -0x14(%rbp),%eax
sub    $0xc,%eax
je     1298 <get_config_default+0x188>
jmp    11cf <get_config_default+0xbf>
mov    -0x14(%rbp),%eax
add    $0xfffffff3,%eax
sub    $0x5,%eax
jb     12a7 <get_config_default+0x197>
jmp    11e3 <get_config_default+0xd3>
mov    -0x14(%rbp),%eax
sub    $0x800b,%eax
je     12c5 <get_config_default+0x1b5>
jmp    11f6 <get_config_default+0xe6>
mov    -0x14(%rbp),%eax
sub    $0x8010,%eax
je     12e3 <get_config_default+0x1d3>
jmp    1209 <get_config_default+0xf9>
mov    -0x14(%rbp),%eax
sub    $0x8011,%eax
je     12b6 <get_config_default+0x1a6>
jmp    121c <get_config_default+0x10c>
mov    -0x14(%rbp),%eax
sub    $0x8013,%eax
je     12d4 <get_config_default+0x1c4>
jmp    1308 <get_config_default+0x1f8>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    132d <get_config_default+0x21d>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    132d <get_config_default+0x21d>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    132d <get_config_default+0x21d>
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
jmp    132d <get_config_default+0x21d>
mov    -0x10(%rbp),%rax
movl   $0x6,(%rax)
jmp    132d <get_config_default+0x21d>
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
jmp    132d <get_config_default+0x21d>
mov    -0x10(%rbp),%rax
movl   $0x8,(%rax)
jmp    132d <get_config_default+0x21d>
mov    -0x10(%rbp),%rax
movl   $0x10,(%rax)
jmp    132d <get_config_default+0x21d>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    132d <get_config_default+0x21d>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    132d <get_config_default+0x21d>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    132d <get_config_default+0x21d>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    132d <get_config_default+0x21d>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
jmp    132d <get_config_default+0x21d>
mov    -0x10(%rbp),%rax
movl   $0x10,(%rax)
movl   $0x0,-0x4(%rbp)
jmp    1334 <get_config_default+0x224>
mov    -0x8(%rbp),%esi
lea    0xcee(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1334 <get_config_default+0x224>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_config_default>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
xor    %eax,%eax
mov    $0x1,%ecx
lea    -0x1(%rsi),%edx
cmp    $0x10,%edx
ja     113b <get_config_default+0x2b>
lea    0xed4(%rip),%rdi
movslq (%rdi,%rdx,4),%rdx
add    %rdi,%rdx
jmp    *%rdx
xor    %ecx,%ecx
xor    %eax,%eax
jmp    117f <get_config_default+0x6f>
lea    -0x800b(%rsi),%edx
cmp    $0x8,%edx
ja     1150 <get_config_default+0x40>
mov    $0x161,%edi
bt     %edx,%edi
jb     117f <get_config_default+0x6f>
lea    0xeed(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
xor    %ecx,%ecx
jmp    117f <get_config_default+0x6f>
mov    $0x10,%ecx
jmp    117f <get_config_default+0x6f>
mov    $0x5,%ecx
jmp    117f <get_config_default+0x6f>
mov    $0x6,%ecx
jmp    117f <get_config_default+0x6f>
mov    $0x8,%ecx
mov    %ecx,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"libGL: unknown attrib %i\0A\00"
define i32 @get_config_default(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 %35 [
i32 1, label %7
i32 4, label %7
i32 5, label %7
i32 6, label %9
i32 7, label %11
i32 8, label %13
i32 9, label %15
i32 10, label %17
i32 11, label %19
i32 12, label %21
i32 13, label %23
i32 14, label %23
i32 15, label %23
i32 16, label %23
i32 17, label %23
i32 32785, label %25
i32 32779, label %27
i32 32787, label %29
i32 32784, label %31
i32 2, label %33
]
7: ; preds = %2, %2, %2
%8 = load i32*, i32** %5
store i32 1, i32* %8
br label %39
9: ; preds = %2
%10 = load i32*, i32** %5
store i32 0, i32* %10
br label %39
11: ; preds = %2
%12 = load i32*, i32** %5
store i32 0, i32* %12
br label %39
13: ; preds = %2
%14 = load i32*, i32** %5
store i32 5, i32* %14
br label %39
15: ; preds = %2
%16 = load i32*, i32** %5
store i32 6, i32* %16
br label %39
17: ; preds = %2
%18 = load i32*, i32** %5
store i32 5, i32* %18
br label %39
19: ; preds = %2
%20 = load i32*, i32** %5
store i32 8, i32* %20
br label %39
21: ; preds = %2
%22 = load i32*, i32** %5
store i32 16, i32* %22
br label %39
23: ; preds = %2, %2, %2, %2, %2
%24 = load i32*, i32** %5
store i32 0, i32* %24
br label %39
25: ; preds = %2
%26 = load i32*, i32** %5
store i32 1, i32* %26
br label %39
27: ; preds = %2
%28 = load i32*, i32** %5
store i32 1, i32* %28
br label %39
29: ; preds = %2
%30 = load i32*, i32** %5
store i32 1, i32* %30
br label %39
31: ; preds = %2
%32 = load i32*, i32** %5
store i32 1, i32* %32
br label %39
33: ; preds = %2
%34 = load i32*, i32** %5
store i32 16, i32* %34
store i32 0, i32* %3
br label %40
35: ; preds = %2
%36 = load i32, i32* %4
%37 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %36)
%38 = load i32*, i32** %5
store i32 0, i32* %38
store i32 1, i32* %3
br label %40
39: ; preds = %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11, %9, %7
store i32 0, i32* %3
br label %40
40: ; preds = %39, %35, %33
%41 = load i32, i32* %3
ret i32 %41
}

LLVM IR (-O2):
@.str = [26 x i8] c"libGL: unknown attrib %i\0A\00"
define i32 @get_config_default(i32 %0, i32* nocapture writeonly %1) {
switch i32 %0, label %12 [
i32 1, label %14
i32 4, label %14
i32 5, label %14
i32 6, label %3
i32 7, label %4
i32 8, label %5
i32 9, label %6
i32 10, label %7
i32 11, label %8
i32 12, label %9
i32 13, label %10
i32 14, label %10
i32 15, label %10
i32 16, label %10
i32 17, label %10
i32 32785, label %14
i32 32779, label %14
i32 32787, label %14
i32 32784, label %14
i32 2, label %11
]
3: ; preds = %2
br label %14
4: ; preds = %2
br label %14
5: ; preds = %2
br label %14
6: ; preds = %2
br label %14
7: ; preds = %2
br label %14
8: ; preds = %2
br label %14
9: ; preds = %2
br label %14
10: ; preds = %2, %2, %2, %2, %2
br label %14
11: ; preds = %2
br label %14
12: ; preds = %2
%13 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %14
14: ; preds = %2, %2, %2, %2, %2, %2, %2, %3, %4, %5, %6, %7, %8, %9, %10, %12, %11
%15 = phi i32 [ 0, %3 ], [ 0, %4 ], [ 5, %5 ], [ 6, %6 ], [ 5, %7 ], [ 8, %8 ], [ 16, %9 ], [ 0, %10 ], [ 0, %12 ], [ 16, %11 ], [ 1, %2 ], [ 1, %2 ], [ 1, %2 ], [ 1, %2 ], [ 1, %2 ], [ 1, %2 ], [ 1, %2 ]
%16 = phi i32 [ 0, %3 ], [ 0, %4 ], [ 0, %5 ], [ 0, %6 ], [ 0, %7 ], [ 0, %8 ], [ 0, %9 ], [ 0, %10 ], [ 1, %12 ], [ 0, %11 ], [ 0, %2 ], [ 0, %2 ], [ 0, %2 ], [ 0, %2 ], [ 0, %2 ], [ 0, %2 ], [ 0, %2 ]
store i32 %15, i32* %1
ret i32 %16
}