#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 *, ...);
void print_conf(unsigned conf0) {
  char const *s = " XO";
  printf("%c|%c|%c\n", s[(((conf0) >> (2 * (8))) & 3)],
         s[(((conf0) >> (2 * (7))) & 3)], s[(((conf0) >> (2 * (6))) & 3)]);
  printf("-+-+-\n");
  printf("%c|%c|%c\n", s[(((conf0) >> (2 * (5))) & 3)],
         s[(((conf0) >> (2 * (4))) & 3)], s[(((conf0) >> (2 * (3))) & 3)]);
  printf("-+-+-\n");
  printf("%c|%c|%c\n", s[(((conf0) >> (2 * (2))) & 3)],
         s[(((conf0) >> (2 * (1))) & 3)], s[(((conf0) >> (2 * (0))) & 3)]);
  printf("\n-----------\n");
}


x86 assembly (clang, -O0):
<print_conf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
and    $0x3,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%esi
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
shr    $0xe,%ecx
and    $0x3,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%edx
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
shr    $0xc,%ecx
and    $0x3,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%ecx
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
shr    $0xa,%ecx
and    $0x3,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%esi
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
shr    $0x8,%ecx
and    $0x3,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%edx
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
shr    $0x6,%ecx
and    $0x3,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%ecx
lea    0xe49(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
shr    $0x4,%ecx
and    $0x3,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%esi
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
shr    $0x2,%ecx
and    $0x3,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%edx
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
shr    $0x0,%ecx
and    $0x3,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%ecx
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_conf>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %edi,%eax
shr    $0x10,%eax
and    $0x3,%eax
lea    0xec7(%rip),%r12
movsbl (%rax,%r12,1),%esi
mov    %edi,%eax
shr    $0xe,%eax
and    $0x3,%eax
movsbl (%rax,%r12,1),%edx
mov    %edi,%eax
shr    $0xc,%eax
and    $0x3,%eax
movsbl (%rax,%r12,1),%ecx
lea    0xea5(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe9e(%rip),%r15
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
shr    $0xa,%eax
and    $0x3,%eax
movsbl (%rax,%r12,1),%esi
mov    %ebx,%eax
shr    $0x8,%eax
and    $0x3,%eax
movsbl (%rax,%r12,1),%edx
mov    %ebx,%eax
shr    $0x6,%eax
and    $0x3,%eax
movsbl (%rax,%r12,1),%ecx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
shr    $0x4,%eax
and    $0x3,%eax
movsbl (%rax,%r12,1),%esi
mov    %ebx,%eax
shr    $0x2,%eax
and    $0x3,%eax
movsbl (%rax,%r12,1),%edx
and    $0x3,%ebx
movsbl (%rbx,%r12,1),%ecx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe30(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [4 x i8] c" XO\00"
@.str.1 = [10 x i8] c"%c|%c|%c\0A\00"
@.str.2 = [7 x i8] c"-+-+-\0A\00"
@.str.3 = [14 x i8] c"\0A-----------\0A\00"
define void @print_conf(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %3
%5 = load i32, i32* %2
%6 = lshr i32 %5, 16
%7 = and i32 %6, 3
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %4, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = load i8*, i8** %3
%13 = load i32, i32* %2
%14 = lshr i32 %13, 14
%15 = and i32 %14, 3
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %12, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = load i8*, i8** %3
%21 = load i32, i32* %2
%22 = lshr i32 %21, 12
%23 = and i32 %22, 3
%24 = zext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %20, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %11, i32 %19, i32 %27)
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%30 = load i8*, i8** %3
%31 = load i32, i32* %2
%32 = lshr i32 %31, 10
%33 = and i32 %32, 3
%34 = zext i32 %33 to i64
%35 = getelementptr inbounds i8, i8* %30, i64 %34
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = load i8*, i8** %3
%39 = load i32, i32* %2
%40 = lshr i32 %39, 8
%41 = and i32 %40, 3
%42 = zext i32 %41 to i64
%43 = getelementptr inbounds i8, i8* %38, i64 %42
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = load i8*, i8** %3
%47 = load i32, i32* %2
%48 = lshr i32 %47, 6
%49 = and i32 %48, 3
%50 = zext i32 %49 to i64
%51 = getelementptr inbounds i8, i8* %46, i64 %50
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %37, i32 %45, i32 %53)
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%56 = load i8*, i8** %3
%57 = load i32, i32* %2
%58 = lshr i32 %57, 4
%59 = and i32 %58, 3
%60 = zext i32 %59 to i64
%61 = getelementptr inbounds i8, i8* %56, i64 %60
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = load i8*, i8** %3
%65 = load i32, i32* %2
%66 = lshr i32 %65, 2
%67 = and i32 %66, 3
%68 = zext i32 %67 to i64
%69 = getelementptr inbounds i8, i8* %64, i64 %68
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = load i8*, i8** %3
%73 = load i32, i32* %2
%74 = lshr i32 %73, 0
%75 = and i32 %74, 3
%76 = zext i32 %75 to i64
%77 = getelementptr inbounds i8, i8* %72, i64 %76
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %63, i32 %71, i32 %79)
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c" XO\00"
@.str.1 = [10 x i8] c"%c|%c|%c\0A\00"
@str.4 = [6 x i8] c"-+-+-\00"
@str.5 = [13 x i8] c"\0A-----------\00"
define void @print_conf(i32 %0) {
%2 = lshr i32 %0, 16
%3 = and i32 %2, 3
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [4 x i8], [4 x i8]* @.str, i64 0, i64 %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = lshr i32 %0, 14
%9 = and i32 %8, 3
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds [4 x i8], [4 x i8]* @.str, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = lshr i32 %0, 12
%15 = and i32 %14, 3
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds [4 x i8], [4 x i8]* @.str, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %13, i32 %19)
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.4, i64 0, i64 0))
%22 = lshr i32 %0, 10
%23 = and i32 %22, 3
%24 = zext i32 %23 to i64
%25 = getelementptr inbounds [4 x i8], [4 x i8]* @.str, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = lshr i32 %0, 8
%29 = and i32 %28, 3
%30 = zext i32 %29 to i64
%31 = getelementptr inbounds [4 x i8], [4 x i8]* @.str, i64 0, i64 %30
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = lshr i32 %0, 6
%35 = and i32 %34, 3
%36 = zext i32 %35 to i64
%37 = getelementptr inbounds [4 x i8], [4 x i8]* @.str, i64 0, i64 %36
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %27, i32 %33, i32 %39)
%41 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.4, i64 0, i64 0))
%42 = lshr i32 %0, 4
%43 = and i32 %42, 3
%44 = zext i32 %43 to i64
%45 = getelementptr inbounds [4 x i8], [4 x i8]* @.str, i64 0, i64 %44
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = lshr i32 %0, 2
%49 = and i32 %48, 3
%50 = zext i32 %49 to i64
%51 = getelementptr inbounds [4 x i8], [4 x i8]* @.str, i64 0, i64 %50
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = and i32 %0, 3
%55 = zext i32 %54 to i64
%56 = getelementptr inbounds [4 x i8], [4 x i8]* @.str, i64 0, i64 %55
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %47, i32 %53, i32 %58)
%60 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.5, i64 0, i64 0))
ret void
}