#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 ip_usbph {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ip_usbph_flush(struct ip_usbph *);
int /*<<< orphan*/ ip_usbph_font_digit(char);
int /*<<< orphan*/ ip_usbph_top_digit(struct ip_usbph *, int,
                                      int /*<<< orphan*/);
void digit_test(struct ip_usbph *ph) {
  ip_usbph_top_digit(ph, 0, ip_usbph_font_digit('1'));
  ip_usbph_top_digit(ph, 1, ip_usbph_font_digit('8'));
  ip_usbph_top_digit(ph, 2, ip_usbph_font_digit('8'));
  ip_usbph_top_digit(ph, 3, ip_usbph_font_digit('1'));
  ip_usbph_top_digit(ph, 4, ip_usbph_font_digit('8'));
  ip_usbph_top_digit(ph, 5, ip_usbph_font_digit('8'));
  ip_usbph_top_digit(ph, 6, ip_usbph_font_digit('8'));
  ip_usbph_top_digit(ph, 7, ip_usbph_font_digit('8'));
  ip_usbph_top_digit(ph, 8, ip_usbph_font_digit('8'));
  ip_usbph_top_digit(ph, 9, ip_usbph_font_digit('8'));
  ip_usbph_top_digit(ph, 10, ip_usbph_font_digit('8'));
  ip_usbph_flush(ph);
}


x86 assembly (clang, -O0):
<digit_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    $0x31,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    -0x60(%rbp),%rdi
mov    %eax,%edx
xor    %esi,%esi
call   1030 <ip_usbph_top_digit@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    -0x58(%rbp),%rdi
mov    %eax,%edx
mov    $0x1,%esi
call   1030 <ip_usbph_top_digit@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    -0x50(%rbp),%rdi
mov    %eax,%edx
mov    $0x2,%esi
call   1030 <ip_usbph_top_digit@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    $0x31,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    -0x48(%rbp),%rdi
mov    %eax,%edx
mov    $0x3,%esi
call   1030 <ip_usbph_top_digit@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%edx
mov    $0x4,%esi
call   1030 <ip_usbph_top_digit@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%edx
mov    $0x5,%esi
call   1030 <ip_usbph_top_digit@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%edx
mov    $0x6,%esi
call   1030 <ip_usbph_top_digit@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%edx
mov    $0x7,%esi
call   1030 <ip_usbph_top_digit@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%edx
mov    $0x8,%esi
call   1030 <ip_usbph_top_digit@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
mov    $0x9,%esi
call   1030 <ip_usbph_top_digit@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%edx
mov    $0xa,%esi
call   1030 <ip_usbph_top_digit@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ip_usbph_flush@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit_test>:
push   %rbx
mov    %rdi,%rbx
mov    $0x31,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %eax,%edx
call   1030 <ip_usbph_top_digit@plt>
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
call   1030 <ip_usbph_top_digit@plt>
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    %eax,%edx
call   1030 <ip_usbph_top_digit@plt>
mov    $0x31,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    %eax,%edx
call   1030 <ip_usbph_top_digit@plt>
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    %eax,%edx
call   1030 <ip_usbph_top_digit@plt>
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    %eax,%edx
call   1030 <ip_usbph_top_digit@plt>
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
mov    %eax,%edx
call   1030 <ip_usbph_top_digit@plt>
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
mov    %eax,%edx
call   1030 <ip_usbph_top_digit@plt>
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    %eax,%edx
call   1030 <ip_usbph_top_digit@plt>
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    %eax,%edx
call   1030 <ip_usbph_top_digit@plt>
mov    $0x38,%edi
call   1050 <ip_usbph_font_digit@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
mov    %eax,%edx
call   1030 <ip_usbph_top_digit@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <ip_usbph_flush@plt>

LLVM IR (-O0):
%struct.ip_usbph = type { i32 }
define void @digit_test(%struct.ip_usbph* %0) {
%2 = alloca %struct.ip_usbph*
store %struct.ip_usbph* %0, %struct.ip_usbph** %2
%3 = load %struct.ip_usbph*, %struct.ip_usbph** %2
%4 = call i32 @ip_usbph_font_digit(i8 signext 49)
%5 = call i32 @ip_usbph_top_digit(%struct.ip_usbph* %3, i32 0, i32 %4)
%6 = load %struct.ip_usbph*, %struct.ip_usbph** %2
%7 = call i32 @ip_usbph_font_digit(i8 signext 56)
%8 = call i32 @ip_usbph_top_digit(%struct.ip_usbph* %6, i32 1, i32 %7)
%9 = load %struct.ip_usbph*, %struct.ip_usbph** %2
%10 = call i32 @ip_usbph_font_digit(i8 signext 56)
%11 = call i32 @ip_usbph_top_digit(%struct.ip_usbph* %9, i32 2, i32 %10)
%12 = load %struct.ip_usbph*, %struct.ip_usbph** %2
%13 = call i32 @ip_usbph_font_digit(i8 signext 49)
%14 = call i32 @ip_usbph_top_digit(%struct.ip_usbph* %12, i32 3, i32 %13)
%15 = load %struct.ip_usbph*, %struct.ip_usbph** %2
%16 = call i32 @ip_usbph_font_digit(i8 signext 56)
%17 = call i32 @ip_usbph_top_digit(%struct.ip_usbph* %15, i32 4, i32 %16)
%18 = load %struct.ip_usbph*, %struct.ip_usbph** %2
%19 = call i32 @ip_usbph_font_digit(i8 signext 56)
%20 = call i32 @ip_usbph_top_digit(%struct.ip_usbph* %18, i32 5, i32 %19)
%21 = load %struct.ip_usbph*, %struct.ip_usbph** %2
%22 = call i32 @ip_usbph_font_digit(i8 signext 56)
%23 = call i32 @ip_usbph_top_digit(%struct.ip_usbph* %21, i32 6, i32 %22)
%24 = load %struct.ip_usbph*, %struct.ip_usbph** %2
%25 = call i32 @ip_usbph_font_digit(i8 signext 56)
%26 = call i32 @ip_usbph_top_digit(%struct.ip_usbph* %24, i32 7, i32 %25)
%27 = load %struct.ip_usbph*, %struct.ip_usbph** %2
%28 = call i32 @ip_usbph_font_digit(i8 signext 56)
%29 = call i32 @ip_usbph_top_digit(%struct.ip_usbph* %27, i32 8, i32 %28)
%30 = load %struct.ip_usbph*, %struct.ip_usbph** %2
%31 = call i32 @ip_usbph_font_digit(i8 signext 56)
%32 = call i32 @ip_usbph_top_digit(%struct.ip_usbph* %30, i32 9, i32 %31)
%33 = load %struct.ip_usbph*, %struct.ip_usbph** %2
%34 = call i32 @ip_usbph_font_digit(i8 signext 56)
%35 = call i32 @ip_usbph_top_digit(%struct.ip_usbph* %33, i32 10, i32 %34)
%36 = load %struct.ip_usbph*, %struct.ip_usbph** %2
%37 = call i32 @ip_usbph_flush(%struct.ip_usbph* %36)
ret void
}

LLVM IR (-O2):
%struct.ip_usbph = type { i32 }
define void @digit_test(%struct.ip_usbph* %0) {
%2 = tail call i32 @ip_usbph_font_digit(i8 signext 49)
%3 = tail call i32 @ip_usbph_top_digit(%struct.ip_usbph* %0, i32 0, i32 %2)
%4 = tail call i32 @ip_usbph_font_digit(i8 signext 56)
%5 = tail call i32 @ip_usbph_top_digit(%struct.ip_usbph* %0, i32 1, i32 %4)
%6 = tail call i32 @ip_usbph_font_digit(i8 signext 56)
%7 = tail call i32 @ip_usbph_top_digit(%struct.ip_usbph* %0, i32 2, i32 %6)
%8 = tail call i32 @ip_usbph_font_digit(i8 signext 49)
%9 = tail call i32 @ip_usbph_top_digit(%struct.ip_usbph* %0, i32 3, i32 %8)
%10 = tail call i32 @ip_usbph_font_digit(i8 signext 56)
%11 = tail call i32 @ip_usbph_top_digit(%struct.ip_usbph* %0, i32 4, i32 %10)
%12 = tail call i32 @ip_usbph_font_digit(i8 signext 56)
%13 = tail call i32 @ip_usbph_top_digit(%struct.ip_usbph* %0, i32 5, i32 %12)
%14 = tail call i32 @ip_usbph_font_digit(i8 signext 56)
%15 = tail call i32 @ip_usbph_top_digit(%struct.ip_usbph* %0, i32 6, i32 %14)
%16 = tail call i32 @ip_usbph_font_digit(i8 signext 56)
%17 = tail call i32 @ip_usbph_top_digit(%struct.ip_usbph* %0, i32 7, i32 %16)
%18 = tail call i32 @ip_usbph_font_digit(i8 signext 56)
%19 = tail call i32 @ip_usbph_top_digit(%struct.ip_usbph* %0, i32 8, i32 %18)
%20 = tail call i32 @ip_usbph_font_digit(i8 signext 56)
%21 = tail call i32 @ip_usbph_top_digit(%struct.ip_usbph* %0, i32 9, i32 %20)
%22 = tail call i32 @ip_usbph_font_digit(i8 signext 56)
%23 = tail call i32 @ip_usbph_top_digit(%struct.ip_usbph* %0, i32 10, i32 %22)
%24 = tail call i32 @ip_usbph_flush(%struct.ip_usbph* %0)
ret void
}