#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*/ I2cDigits_disableDigits();
int /*<<< orphan*/ I2cDigits_display1Digit(unsigned int);
int /*<<< orphan*/ I2cDigits_enableLeftDigit();
int /*<<< orphan*/ I2cDigits_enableRightDigit();
int /*<<< orphan*/ delay(unsigned int);
void I2cDigits_display2Digits(unsigned int num, unsigned int nanosecsDelay) {
  num = (num > 99) ? 99 : num;
  unsigned int digit1 = num / 10;
  unsigned int digit2 = num % 10;
  I2cDigits_disableDigits();
  I2cDigits_enableLeftDigit();
  I2cDigits_display1Digit(digit1);
  delay(nanosecsDelay);
  I2cDigits_disableDigits();
  I2cDigits_enableRightDigit();
  I2cDigits_display1Digit(digit2);
  delay(nanosecsDelay);
}


x86 assembly (clang, -O0):
<I2cDigits_display2Digits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x63,-0x4(%rbp)
jbe    1175 <I2cDigits_display2Digits+0x25>
mov    $0x63,%eax
mov    %eax,-0x14(%rbp)
jmp    117b <I2cDigits_display2Digits+0x2b>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,-0x10(%rbp)
mov    $0x0,%al
call   1070 <I2cDigits_disableDigits@plt>
mov    $0x0,%al
call   1050 <I2cDigits_enableLeftDigit@plt>
mov    -0xc(%rbp),%edi
call   1060 <I2cDigits_display1Digit@plt>
mov    -0x8(%rbp),%edi
call   1030 <delay@plt>
mov    $0x0,%al
call   1070 <I2cDigits_disableDigits@plt>
mov    $0x0,%al
call   1040 <I2cDigits_enableRightDigit@plt>
mov    -0x10(%rbp),%edi
call   1060 <I2cDigits_display1Digit@plt>
mov    -0x8(%rbp),%edi
call   1030 <delay@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2cDigits_display2Digits>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x63,%edi
mov    $0x63,%eax
cmovb  %edi,%eax
mov    %esi,%ebp
movzbl %al,%eax
imul   $0xcd,%eax,%ebx
shr    $0xb,%ebx
lea    (%rbx,%rbx,1),%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movzbl %al,%r14d
xor    %eax,%eax
call   1070 <I2cDigits_disableDigits@plt>
xor    %eax,%eax
call   1050 <I2cDigits_enableLeftDigit@plt>
mov    %ebx,%edi
call   1060 <I2cDigits_display1Digit@plt>
mov    %ebp,%edi
call   1030 <delay@plt>
xor    %eax,%eax
call   1070 <I2cDigits_disableDigits@plt>
xor    %eax,%eax
call   1040 <I2cDigits_enableRightDigit@plt>
mov    %r14d,%edi
call   1060 <I2cDigits_display1Digit@plt>
mov    %ebp,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @I2cDigits_display2Digits(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = icmp ugt i32 %7, 99
br i1 %8, label %9, label %10
9: ; preds = %2
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %9
%13 = phi i32 [ 99, %9 ], [ %11, %10 ]
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = udiv i32 %14, 10
store i32 %15, i32* %5
%16 = load i32, i32* %3
%17 = urem i32 %16, 10
store i32 %17, i32* %6
%18 = call i32 (...) @I2cDigits_disableDigits()
%19 = call i32 (...) @I2cDigits_enableLeftDigit()
%20 = load i32, i32* %5
%21 = call i32 @I2cDigits_display1Digit(i32 %20)
%22 = load i32, i32* %4
%23 = call i32 @delay(i32 %22)
%24 = call i32 (...) @I2cDigits_disableDigits()
%25 = call i32 (...) @I2cDigits_enableRightDigit()
%26 = load i32, i32* %6
%27 = call i32 @I2cDigits_display1Digit(i32 %26)
%28 = load i32, i32* %4
%29 = call i32 @delay(i32 %28)
ret void
}

LLVM IR (-O2):
define void @I2cDigits_display2Digits(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, 99
%4 = select i1 %3, i32 %0, i32 99
%5 = trunc i32 %4 to i8
%6 = udiv i8 %5, 10
%7 = zext i8 %6 to i32
%8 = urem i8 %5, 10
%9 = zext i8 %8 to i32
%10 = tail call i32 (...) @I2cDigits_disableDigits()
%11 = tail call i32 (...) @I2cDigits_enableLeftDigit()
%12 = tail call i32 @I2cDigits_display1Digit(i32 %7)
%13 = tail call i32 @delay(i32 %1)
%14 = tail call i32 (...) @I2cDigits_disableDigits()
%15 = tail call i32 (...) @I2cDigits_enableRightDigit()
%16 = tail call i32 @I2cDigits_display1Digit(i32 %9)
%17 = tail call i32 @delay(i32 %1)
ret void
}