#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 */
struct Wheel {
  int dummy;
};
struct Map {
  int dummy;
};

/* Variables and functions */
char cycle(struct Wheel *);
int /*<<< orphan*/ exit(int);
struct Wheel *find(char, struct Map *);
int /*<<< orphan*/ printf(char *, char);
void printOne(char k, struct Map *m) {
  struct Wheel *w = find(k, m);
  char c;
  if (w == NULL) {
    printf("Missing the wheel for: %c\n", k);
    exit(1);
  }
  c = cycle(w);
  if ('0' <= c && c <= '9') {
    printf(" %c", c);
  } else {
    printOne(c, m);
  }
}


x86 assembly (clang, -O0):
<printOne>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1050 <find@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    119a <printOne+0x4a>
lea    0xe79(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x18(%rbp),%rdi
call   1070 <cycle@plt>
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     11d9 <printOne+0x89>
movsbl -0x19(%rbp),%eax
cmp    $0x39,%eax
jg     11d9 <printOne+0x89>
lea    0xe50(%rip),%rdi
movsbl -0x19(%rbp),%esi
call   1040 <printf@plt>
jmp    11e8 <printOne+0x98>
mov    -0x19(%rbp),%al
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1030 <printOne@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printOne>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%eax
nopl   0x0(%rax,%rax,1)
movsbl %al,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <find@plt>
test   %rax,%rax
je     1187 <printOne+0x47>
mov    %rax,%rdi
call   1060 <cycle@plt>
lea    -0x30(%rax),%ecx
cmp    $0x9,%cl
ja     1150 <printOne+0x10>
movsbl %al,%esi
lea    0xe9f(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>
lea    0xe72(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.Map = type { i32 }
%struct.Wheel = type { i32 }
@.str = [27 x i8] c"Missing the wheel for: %c\0A\00"
@.str.1 = [4 x i8] c" %c\00"
define void @printOne(i8 signext %0, %struct.Map* %1) {
%3 = alloca i8
%4 = alloca %struct.Map*
%5 = alloca %struct.Wheel*
%6 = alloca i8
store i8 %0, i8* %3
store %struct.Map* %1, %struct.Map** %4
%7 = load i8, i8* %3
%8 = load %struct.Map*, %struct.Map** %4
%9 = call %struct.Wheel* @find(i8 signext %7, %struct.Map* %8)
store %struct.Wheel* %9, %struct.Wheel** %5
%10 = load %struct.Wheel*, %struct.Wheel** %5
%11 = icmp eq %struct.Wheel* %10, null
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i8, i8* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 signext %13)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %2
%17 = load %struct.Wheel*, %struct.Wheel** %5
%18 = call signext i8 @cycle(%struct.Wheel* %17)
store i8 %18, i8* %6
%19 = load i8, i8* %6
%20 = sext i8 %19 to i32
%21 = icmp sle i32 48, %20
br i1 %21, label %22, label %29
22: ; preds = %16
%23 = load i8, i8* %6
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 57
br i1 %25, label %26, label %29
26: ; preds = %22
%27 = load i8, i8* %6
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %27)
br label %32
29: ; preds = %22, %16
%30 = load i8, i8* %6
%31 = load %struct.Map*, %struct.Map** %4
br label %32
32: ; preds = %29, %26
ret void
}

LLVM IR (-O2):
%struct.Map = type { i32 }
%struct.Wheel = type { i32 }
@.str = [27 x i8] c"Missing the wheel for: %c\0A\00"
@.str.1 = [4 x i8] c" %c\00"
define void @printOne(i8 signext %0, %struct.Map* %1) {
br label %3
3: ; preds = %10, %2
%4 = phi i8 [ %0, %2 ], [ %11, %10 ]
%5 = tail call %struct.Wheel* @find(i8 signext %4, %struct.Map* %1)
%6 = icmp eq %struct.Wheel* %5, null
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8 signext %4)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %3
%11 = tail call signext i8 @cycle(%struct.Wheel* %5)
%12 = add i8 %11, -48
%13 = icmp ult i8 %12, 10
br i1 %13, label %14, label %3
14: ; preds = %10
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %11)
ret void
}