main(argc, argv) char **argv;
{
  int i, a, b, c, r;
  char labbuf[100];
  for (i = 0; i < 48; i++) {
    r = scanf("%x %x %x", &a, &b, &c);
    bs(i, 0, a);
    bs(i, 16, b);
    bs(i, 32, c);
  }
  bitshow();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x30,-0x14(%rbp)
jge    11b8 <main+0x88>
lea    0xe9f(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1050 <scanf@plt>
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%edx
xor    %esi,%esi
mov    $0x0,%al
call   1030 <bs@plt>
mov    -0x14(%rbp),%edi
mov    -0x1c(%rbp),%edx
mov    $0x10,%esi
mov    $0x0,%al
call   1030 <bs@plt>
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%edx
mov    $0x20,%esi
mov    $0x0,%al
call   1030 <bs@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1150 <main+0x20>
mov    $0x0,%al
call   1040 <bitshow@plt>
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xebd(%rip),%r14
lea    0xc(%rsp),%r15
lea    0x8(%rsp),%r12
lea    0x4(%rsp),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0xc(%rsp),%edx
mov    %ebp,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <bs@plt>
mov    0x8(%rsp),%edx
mov    %ebp,%edi
mov    $0x10,%esi
xor    %eax,%eax
call   1030 <bs@plt>
mov    0x4(%rsp),%edx
mov    %ebp,%edi
mov    $0x20,%esi
xor    %eax,%eax
call   1030 <bs@plt>
add    $0x1,%ebp
cmp    $0x30,%ebp
jne    1160 <main+0x30>
xor    %eax,%eax
call   1040 <bitshow@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%x %x %x\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [100 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %12
12: ; preds = %26, %2
%13 = load i32, i32* %6
%14 = icmp slt i32 %13, 48
br i1 %14, label %15, label %29
15: ; preds = %12
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %7, i32* %8, i32* %9)
store i32 %16, i32* %10
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @bs to i32 (i32, i32, i32, ...)*)(i32 %17, i32 0, i32 %18)
%20 = load i32, i32* %6
%21 = load i32, i32* %8
%22 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @bs to i32 (i32, i32, i32, ...)*)(i32 %20, i32 16, i32 %21)
%23 = load i32, i32* %6
%24 = load i32, i32* %9
%25 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @bs to i32 (i32, i32, i32, ...)*)(i32 %23, i32 32, i32 %24)
br label %26
26: ; preds = %15
%27 = load i32, i32* %6
%28 = add nsw i32 %27, 1
store i32 %28, i32* %6
br label %12
29: ; preds = %12
%30 = call i32 (...) @bitshow()
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
@.str = [9 x i8] c"%x %x %x\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
br label %9
9: ; preds = %2, %9
%10 = phi i32 [ 0, %2 ], [ %18, %9 ]
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4, i32* %5)
%12 = load i32, i32* %3
%13 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @bs to i32 (i32, i32, i32, ...)*)(i32 %10, i32 0, i32 %12)
%14 = load i32, i32* %4
%15 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @bs to i32 (i32, i32, i32, ...)*)(i32 %10, i32 16, i32 %14)
%16 = load i32, i32* %5
%17 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @bs to i32 (i32, i32, i32, ...)*)(i32 %10, i32 32, i32 %16)
%18 = add nuw nsw i32 %10, 1
%19 = icmp eq i32 %18, 48
br i1 %19, label %20, label %9
20: ; preds = %9
%21 = call i32 (...) @bitshow()
ret i32 0
}