#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;

/* Variables and functions */
int /*<<< orphan*/ gpio_write_value(int, int);
void Write_number_to_7segdisplay(uint8_t numberToDisplay) {
  switch (numberToDisplay) {
  case 0:
    gpio_write_value(66, 1);
    gpio_write_value(67, 1);
    gpio_write_value(69, 1);
    gpio_write_value(45, 1);
    gpio_write_value(44, 1);
    gpio_write_value(26, 1);
    gpio_write_value(46, 0);
    break;
  case 1:
    gpio_write_value(66, 0);
    gpio_write_value(67, 1);
    gpio_write_value(69, 1);
    gpio_write_value(45, 0);
    gpio_write_value(44, 0);
    gpio_write_value(26, 0);
    gpio_write_value(46, 0);
    break;
  case 2:
    gpio_write_value(66, 1);
    gpio_write_value(67, 1);
    gpio_write_value(69, 0);
    gpio_write_value(45, 1);
    gpio_write_value(44, 1);
    gpio_write_value(26, 0);
    gpio_write_value(46, 1);
    break;
  case 3:
    gpio_write_value(66, 1);
    gpio_write_value(67, 1);
    gpio_write_value(69, 1);
    gpio_write_value(45, 1);
    gpio_write_value(44, 0);
    gpio_write_value(26, 0);
    gpio_write_value(46, 1);
    break;
  case 4:
    gpio_write_value(66, 0);
    gpio_write_value(67, 1);
    gpio_write_value(69, 1);
    gpio_write_value(45, 0);
    gpio_write_value(44, 0);
    gpio_write_value(26, 1);
    gpio_write_value(46, 1);
    break;
  case 5:
    gpio_write_value(66, 1);
    gpio_write_value(67, 0);
    gpio_write_value(69, 1);
    gpio_write_value(45, 1);
    gpio_write_value(44, 0);
    gpio_write_value(26, 1);
    gpio_write_value(46, 1);
    break;
  case 6:
    gpio_write_value(66, 1);
    gpio_write_value(67, 0);
    gpio_write_value(69, 1);
    gpio_write_value(45, 1);
    gpio_write_value(44, 1);
    gpio_write_value(26, 1);
    gpio_write_value(46, 1);
    break;
  case 7:
    gpio_write_value(66, 1);
    gpio_write_value(67, 1);
    gpio_write_value(69, 1);
    gpio_write_value(45, 0);
    gpio_write_value(44, 0);
    gpio_write_value(26, 0);
    gpio_write_value(46, 0);
    break;
  case 8:
    gpio_write_value(66, 1);
    gpio_write_value(67, 1);
    gpio_write_value(69, 1);
    gpio_write_value(45, 1);
    gpio_write_value(44, 1);
    gpio_write_value(26, 1);
    gpio_write_value(46, 1);
    break;
  case 9:
    gpio_write_value(66, 1);
    gpio_write_value(67, 1);
    gpio_write_value(69, 1);
    gpio_write_value(45, 1);
    gpio_write_value(44, 0);
    gpio_write_value(26, 1);
    gpio_write_value(46, 1);
    break;
  case 10:
    gpio_write_value(66, 0);
    gpio_write_value(67, 0);
    gpio_write_value(69, 0);
    gpio_write_value(45, 0);
    gpio_write_value(44, 0);
    gpio_write_value(26, 0);
    gpio_write_value(46, 0);
    break;
  }
}


x86 assembly (clang, -O0):
<Write_number_to_7segdisplay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0xa,%rax
ja     15a1 <Write_number_to_7segdisplay+0x491>
mov    -0x10(%rbp),%rax
lea    0xec9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x42,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x43,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x45,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2d,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2c,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2e,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
jmp    15a1 <Write_number_to_7segdisplay+0x491>
mov    $0x42,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x43,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x45,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2d,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2c,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2e,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
jmp    15a1 <Write_number_to_7segdisplay+0x491>
mov    $0x42,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x43,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x45,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2d,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2c,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2e,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
jmp    15a1 <Write_number_to_7segdisplay+0x491>
mov    $0x42,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x43,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x45,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2d,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2c,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2e,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
jmp    15a1 <Write_number_to_7segdisplay+0x491>
mov    $0x42,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x43,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x45,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2d,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2c,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2e,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
jmp    15a1 <Write_number_to_7segdisplay+0x491>
mov    $0x42,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x43,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x45,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2d,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2c,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2e,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
jmp    15a1 <Write_number_to_7segdisplay+0x491>
mov    $0x42,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x43,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x45,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2d,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2c,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2e,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
jmp    15a1 <Write_number_to_7segdisplay+0x491>
mov    $0x42,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x43,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x45,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2d,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2c,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2e,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
jmp    15a1 <Write_number_to_7segdisplay+0x491>
mov    $0x42,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x43,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x45,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2d,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2c,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2e,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
jmp    15a1 <Write_number_to_7segdisplay+0x491>
mov    $0x42,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x43,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x45,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2d,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2c,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2e,%edi
mov    $0x1,%esi
call   1030 <gpio_write_value@plt>
jmp    15a1 <Write_number_to_7segdisplay+0x491>
mov    $0x42,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x43,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x45,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2d,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2c,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2e,%edi
xor    %esi,%esi
call   1030 <gpio_write_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Write_number_to_7segdisplay>:
cmp    $0xa,%edi
ja     11d5 <Write_number_to_7segdisplay+0xc5>
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
movslq %edi,%rax
lea    0xed2(%rip),%rcx
mov    (%rcx,%rax,4),%esi
lea    0xef4(%rip),%rcx
mov    (%rcx,%rax,4),%ebp
lea    0xf16(%rip),%rcx
mov    (%rcx,%rax,4),%ebx
lea    0xf38(%rip),%rcx
mov    (%rcx,%rax,4),%r13d
lea    0xf59(%rip),%rcx
mov    (%rcx,%rax,4),%r12d
lea    0xf7a(%rip),%rcx
mov    (%rcx,%rax,4),%r15d
lea    0xf9b(%rip),%rcx
mov    (%rcx,%rax,4),%r14d
mov    $0x42,%edi
call   1030 <gpio_write_value@plt>
mov    $0x43,%edi
mov    %ebp,%esi
call   1030 <gpio_write_value@plt>
mov    $0x45,%edi
mov    %ebx,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2d,%edi
mov    %r13d,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2c,%edi
mov    %r12d,%esi
call   1030 <gpio_write_value@plt>
mov    $0x1a,%edi
mov    %r15d,%esi
call   1030 <gpio_write_value@plt>
mov    $0x2e,%edi
mov    %r14d,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <gpio_write_value@plt>
ret

LLVM IR (-O0):
define void @Write_number_to_7segdisplay(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %92 [
i32 0, label %4
i32 1, label %12
i32 2, label %20
i32 3, label %28
i32 4, label %36
i32 5, label %44
i32 6, label %52
i32 7, label %60
i32 8, label %68
i32 9, label %76
i32 10, label %84
]
4: ; preds = %1
%5 = call i32 @gpio_write_value(i32 66, i32 1)
%6 = call i32 @gpio_write_value(i32 67, i32 1)
%7 = call i32 @gpio_write_value(i32 69, i32 1)
%8 = call i32 @gpio_write_value(i32 45, i32 1)
%9 = call i32 @gpio_write_value(i32 44, i32 1)
%10 = call i32 @gpio_write_value(i32 26, i32 1)
%11 = call i32 @gpio_write_value(i32 46, i32 0)
br label %92
12: ; preds = %1
%13 = call i32 @gpio_write_value(i32 66, i32 0)
%14 = call i32 @gpio_write_value(i32 67, i32 1)
%15 = call i32 @gpio_write_value(i32 69, i32 1)
%16 = call i32 @gpio_write_value(i32 45, i32 0)
%17 = call i32 @gpio_write_value(i32 44, i32 0)
%18 = call i32 @gpio_write_value(i32 26, i32 0)
%19 = call i32 @gpio_write_value(i32 46, i32 0)
br label %92
20: ; preds = %1
%21 = call i32 @gpio_write_value(i32 66, i32 1)
%22 = call i32 @gpio_write_value(i32 67, i32 1)
%23 = call i32 @gpio_write_value(i32 69, i32 0)
%24 = call i32 @gpio_write_value(i32 45, i32 1)
%25 = call i32 @gpio_write_value(i32 44, i32 1)
%26 = call i32 @gpio_write_value(i32 26, i32 0)
%27 = call i32 @gpio_write_value(i32 46, i32 1)
br label %92
28: ; preds = %1
%29 = call i32 @gpio_write_value(i32 66, i32 1)
%30 = call i32 @gpio_write_value(i32 67, i32 1)
%31 = call i32 @gpio_write_value(i32 69, i32 1)
%32 = call i32 @gpio_write_value(i32 45, i32 1)
%33 = call i32 @gpio_write_value(i32 44, i32 0)
%34 = call i32 @gpio_write_value(i32 26, i32 0)
%35 = call i32 @gpio_write_value(i32 46, i32 1)
br label %92
36: ; preds = %1
%37 = call i32 @gpio_write_value(i32 66, i32 0)
%38 = call i32 @gpio_write_value(i32 67, i32 1)
%39 = call i32 @gpio_write_value(i32 69, i32 1)
%40 = call i32 @gpio_write_value(i32 45, i32 0)
%41 = call i32 @gpio_write_value(i32 44, i32 0)
%42 = call i32 @gpio_write_value(i32 26, i32 1)
%43 = call i32 @gpio_write_value(i32 46, i32 1)
br label %92
44: ; preds = %1
%45 = call i32 @gpio_write_value(i32 66, i32 1)
%46 = call i32 @gpio_write_value(i32 67, i32 0)
%47 = call i32 @gpio_write_value(i32 69, i32 1)
%48 = call i32 @gpio_write_value(i32 45, i32 1)
%49 = call i32 @gpio_write_value(i32 44, i32 0)
%50 = call i32 @gpio_write_value(i32 26, i32 1)
%51 = call i32 @gpio_write_value(i32 46, i32 1)
br label %92
52: ; preds = %1
%53 = call i32 @gpio_write_value(i32 66, i32 1)
%54 = call i32 @gpio_write_value(i32 67, i32 0)
%55 = call i32 @gpio_write_value(i32 69, i32 1)
%56 = call i32 @gpio_write_value(i32 45, i32 1)
%57 = call i32 @gpio_write_value(i32 44, i32 1)
%58 = call i32 @gpio_write_value(i32 26, i32 1)
%59 = call i32 @gpio_write_value(i32 46, i32 1)
br label %92
60: ; preds = %1
%61 = call i32 @gpio_write_value(i32 66, i32 1)
%62 = call i32 @gpio_write_value(i32 67, i32 1)
%63 = call i32 @gpio_write_value(i32 69, i32 1)
%64 = call i32 @gpio_write_value(i32 45, i32 0)
%65 = call i32 @gpio_write_value(i32 44, i32 0)
%66 = call i32 @gpio_write_value(i32 26, i32 0)
%67 = call i32 @gpio_write_value(i32 46, i32 0)
br label %92
68: ; preds = %1
%69 = call i32 @gpio_write_value(i32 66, i32 1)
%70 = call i32 @gpio_write_value(i32 67, i32 1)
%71 = call i32 @gpio_write_value(i32 69, i32 1)
%72 = call i32 @gpio_write_value(i32 45, i32 1)
%73 = call i32 @gpio_write_value(i32 44, i32 1)
%74 = call i32 @gpio_write_value(i32 26, i32 1)
%75 = call i32 @gpio_write_value(i32 46, i32 1)
br label %92
76: ; preds = %1
%77 = call i32 @gpio_write_value(i32 66, i32 1)
%78 = call i32 @gpio_write_value(i32 67, i32 1)
%79 = call i32 @gpio_write_value(i32 69, i32 1)
%80 = call i32 @gpio_write_value(i32 45, i32 1)
%81 = call i32 @gpio_write_value(i32 44, i32 0)
%82 = call i32 @gpio_write_value(i32 26, i32 1)
%83 = call i32 @gpio_write_value(i32 46, i32 1)
br label %92
84: ; preds = %1
%85 = call i32 @gpio_write_value(i32 66, i32 0)
%86 = call i32 @gpio_write_value(i32 67, i32 0)
%87 = call i32 @gpio_write_value(i32 69, i32 0)
%88 = call i32 @gpio_write_value(i32 45, i32 0)
%89 = call i32 @gpio_write_value(i32 44, i32 0)
%90 = call i32 @gpio_write_value(i32 26, i32 0)
%91 = call i32 @gpio_write_value(i32 46, i32 0)
br label %92
92: ; preds = %1, %84, %76, %68, %60, %52, %44, %36, %28, %20, %12, %4
ret void
}

LLVM IR (-O2):
@switch.table.Write_number_to_7segdisplay = [11 x i32] [i32 1, i32 0, i32 1, i32 1, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0]
@switch.table.Write_number_to_7segdisplay.1 = [11 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 0, i32 0, i32 1, i32 1, i32 1, i32 0]
@switch.table.Write_number_to_7segdisplay.2 = [11 x i32] [i32 1, i32 1, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0]
@switch.table.Write_number_to_7segdisplay.3 = [11 x i32] [i32 1, i32 0, i32 1, i32 1, i32 0, i32 1, i32 1, i32 0, i32 1, i32 1, i32 0]
@switch.table.Write_number_to_7segdisplay.4 = [11 x i32] [i32 1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0]
@switch.table.Write_number_to_7segdisplay.5 = [11 x i32] [i32 1, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 0, i32 1, i32 1, i32 0]
@switch.table.Write_number_to_7segdisplay.6 = [11 x i32] [i32 0, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0, i32 1, i32 1, i32 0]
define void @Write_number_to_7segdisplay(i32 %0) {
%2 = icmp ult i32 %0, 11
br i1 %2, label %3, label %32
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.Write_number_to_7segdisplay, i64 0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %0 to i64
%8 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.Write_number_to_7segdisplay.1, i64 0, i64 %7
%9 = load i32, i32* %8
%10 = sext i32 %0 to i64
%11 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.Write_number_to_7segdisplay.2, i64 0, i64 %10
%12 = load i32, i32* %11
%13 = sext i32 %0 to i64
%14 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.Write_number_to_7segdisplay.3, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = sext i32 %0 to i64
%17 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.Write_number_to_7segdisplay.4, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = sext i32 %0 to i64
%20 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.Write_number_to_7segdisplay.5, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = sext i32 %0 to i64
%23 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.Write_number_to_7segdisplay.6, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = tail call i32 @gpio_write_value(i32 66, i32 %6)
%26 = tail call i32 @gpio_write_value(i32 67, i32 %9)
%27 = tail call i32 @gpio_write_value(i32 69, i32 %12)
%28 = tail call i32 @gpio_write_value(i32 45, i32 %15)
%29 = tail call i32 @gpio_write_value(i32 44, i32 %18)
%30 = tail call i32 @gpio_write_value(i32 26, i32 %21)
%31 = tail call i32 @gpio_write_value(i32 46, i32 %24)
br label %32
32: ; preds = %1, %3
ret void
}