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

/* Variables and functions */
int jedec_bit_get(struct jedec *, int);
int /*<<< orphan*/ printf(char *, ...);
void dump_row_ues(struct jedec *jed) {
  int i;
  printf("%2d: ", 44);
  for (i = 0; i < 64; i++) {
    int v, fuse;
    fuse = 5891 - i;
    v = jedec_bit_get(jed, fuse);
    printf("%c", '0' + v);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<dump_row_ues>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x2c,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    118c <dump_row_ues+0x6c>
mov    $0x1703,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <jedec_bit_get@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
add    $0x30,%esi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <dump_row_ues+0x26>
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_row_ues>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xec3(%rip),%rdi
mov    $0x2c,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1703,%ebp
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <jedec_bit_get@plt>
lea    0x30(%rax),%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
cmp    $0x16c3,%ebp
jne    1150 <dump_row_ues+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
%struct.jedec = type { i32 }
@.str = [6 x i8] c"%2d: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @dump_row_ues(%struct.jedec* %0) {
%2 = alloca %struct.jedec*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store %struct.jedec* %0, %struct.jedec** %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 44)
store i32 0, i32* %3
br label %7
7: ; preds = %19, %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 64
br i1 %9, label %10, label %22
10: ; preds = %7
%11 = load i32, i32* %3
%12 = sub nsw i32 5891, %11
store i32 %12, i32* %5
%13 = load %struct.jedec*, %struct.jedec** %2
%14 = load i32, i32* %5
%15 = call i32 @jedec_bit_get(%struct.jedec* %13, i32 %14)
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = add nsw i32 48, %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %10
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %7
22: ; preds = %7
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.jedec = type { i32 }
@.str = [6 x i8] c"%2d: \00"
define void @dump_row_ues(%struct.jedec* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 44)
br label %3
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %9, %3 ]
%5 = sub nuw nsw i32 5891, %4
%6 = tail call i32 @jedec_bit_get(%struct.jedec* %0, i32 %5)
%7 = add nsw i32 %6, 48
%8 = tail call i32 @putchar(i32 %7)
%9 = add nuw nsw i32 %4, 1
%10 = icmp eq i32 %9, 64
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = tail call i32 @putchar(i32 10)
ret void
}