#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*/ print_bit(unsigned char);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  unsigned char u1, u2, u3;
  u1 = 99;
  u2 = 14;
  printf("u1 = ");
  print_bit(u1);
  printf("u1 = %d\n", u1);
  printf("u2 = ");
  print_bit(u2);
  printf("u2 = %d\n", u2);
  printf("u2 = %d\n", (char)u2);
  u3 = u1 - u2;
  printf("u3 = %d\n", u3);
  printf("u3 = ");
  print_bit(u3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x63,-0x11(%rbp)
movb   $0xe,-0x12(%rbp)
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movzbl -0x11(%rbp),%edi
call   1040 <print_bit@plt>
movzbl -0x11(%rbp),%esi
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movzbl -0x12(%rbp),%edi
call   1040 <print_bit@plt>
movzbl -0x12(%rbp),%esi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x12(%rbp),%esi
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movzbl -0x11(%rbp),%eax
movzbl -0x12(%rbp),%ecx
sub    %ecx,%eax
mov    %al,-0x13(%rbp)
movzbl -0x13(%rbp),%esi
lea    0xe6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movzbl -0x13(%rbp),%edi
call   1040 <print_bit@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x63,%edi
call   1040 <print_bit@plt>
lea    0xec6(%rip),%rdi
mov    $0x63,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xe,%edi
call   1040 <print_bit@plt>
lea    0xeaa(%rip),%rbx
mov    %rbx,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe8e(%rip),%rdi
mov    $0x55,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe84(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x55,%edi
call   1040 <print_bit@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"u1 = \00"
@.str.1 = [9 x i8] c"u1 = %d\0A\00"
@.str.2 = [6 x i8] c"u2 = \00"
@.str.3 = [9 x i8] c"u2 = %d\0A\00"
@.str.4 = [9 x i8] c"u3 = %d\0A\00"
@.str.5 = [6 x i8] c"u3 = \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i8 99, i8* %5
store i8 14, i8* %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = load i8, i8* %5
%10 = call i32 @print_bit(i8 zeroext %9)
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%15 = load i8, i8* %6
%16 = call i32 @print_bit(i8 zeroext %15)
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %18)
%20 = load i8, i8* %6
%21 = sext i8 %20 to i32
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %21)
%23 = load i8, i8* %5
%24 = zext i8 %23 to i32
%25 = load i8, i8* %6
%26 = zext i8 %25 to i32
%27 = sub nsw i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 %30)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%33 = load i8, i8* %7
%34 = call i32 @print_bit(i8 zeroext %33)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"u1 = \00"
@.str.1 = [9 x i8] c"u1 = %d\0A\00"
@.str.2 = [6 x i8] c"u2 = \00"
@.str.3 = [9 x i8] c"u2 = %d\0A\00"
@.str.4 = [9 x i8] c"u3 = %d\0A\00"
@.str.5 = [6 x i8] c"u3 = \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @print_bit(i8 zeroext 99)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 99)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @print_bit(i8 zeroext 14)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 14)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 14)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32 85)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%12 = tail call i32 @print_bit(i8 zeroext 85)
ret i32 0
}