#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 */
char *get_marker_name(int);
int get_marker_number(char *);
int /*<<< orphan*/ printf(char *, int, int, char *, int, int);
int main() {
  int i;
  for (i = 0; i < 256; i++) {
    char *name = get_marker_name(i);
    int number = get_marker_number(name);
    if (number != i) {
      printf("marker %5d, %3x : %10s : %5d, %3x\n", i, i, name, number, number);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x100,-0x8(%rbp)
jge    11a8 <main+0x78>
mov    -0x8(%rbp),%edi
call   1050 <get_marker_name@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <get_marker_number@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1195 <main+0x65>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
jmp    119a <main+0x6a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %ebx,%ebx
lea    0xec2(%rip),%r14
jmp    114b <main+0x1b>
add    $0x1,%ebx
cmp    $0x100,%ebx
je     1178 <main+0x48>
mov    %ebx,%edi
call   1050 <get_marker_name@plt>
mov    %rax,%r15
mov    %rax,%rdi
call   1040 <get_marker_number@plt>
cmp    %eax,%ebx
je     1140 <main+0x10>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
mov    %r15,%rcx
mov    %eax,%r8d
mov    %eax,%r9d
call   1030 <printf@plt>
jmp    1140 <main+0x10>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [35 x i8] c"marker %5d, %3x : %10s : %5d, %3x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %5
5: ; preds = %24, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 256
br i1 %7, label %8, label %27
8: ; preds = %5
%9 = load i32, i32* %2
%10 = call i8* @get_marker_name(i32 %9)
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = call i32 @get_marker_number(i8* %11)
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = load i32, i32* %2
%15 = icmp ne i32 %13, %14
br i1 %15, label %16, label %23
16: ; preds = %8
%17 = load i32, i32* %2
%18 = load i32, i32* %2
%19 = load i8*, i8** %3
%20 = load i32, i32* %4
%21 = load i32, i32* %4
%22 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %18, i8* %19, i32 %20, i32 %21)
br label %23
23: ; preds = %16, %8
br label %24
24: ; preds = %23
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %5
27: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"marker %5d, %3x : %10s : %5d, %3x\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %8
%2 = phi i32 [ 0, %0 ], [ %9, %8 ]
%3 = tail call i8* @get_marker_name(i32 %2)
%4 = tail call i32 @get_marker_number(i8* %3)
%5 = icmp eq i32 %4, %2
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2, i8* %3, i32 %4, i32 %4)
br label %8
8: ; preds = %6, %1
%9 = add nuw nsw i32 %2, 1
%10 = icmp eq i32 %9, 256
br i1 %10, label %11, label %1
11: ; preds = %8
ret i32 0
}