void add_zone_dind2(unsigned int *znr, int *corrected) {
  static char blk[(1 << 10)];
  int i, blk_chg = 0;
  int block;
  block = add_zone2(znr, corrected);
  if (!block)
    return;
  read_block(block, blk);
  for (i = 0; i < (1 << 10) >> 2; i++)
    add_zone_ind2(i + (unsigned int *)blk, &blk_chg);
  if (blk_chg)
    write_block(block, blk);
}


x86 assembly (clang, -O0):
<add_zone_dind2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <add_zone2@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1178 <add_zone_dind2+0x38>
jmp    11e3 <add_zone_dind2+0xa3>
mov    -0x1c(%rbp),%edi
lea    0x2ece(%rip),%rsi
mov    $0x0,%al
call   1060 <read_block@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jge    11c8 <add_zone_dind2+0x88>
movslq -0x14(%rbp),%rax
lea    0x2ea8(%rip),%rdi
shl    $0x2,%rax
add    %rax,%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1050 <add_zone_ind2@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1190 <add_zone_dind2+0x50>
cmpl   $0x0,-0x18(%rbp)
je     11e3 <add_zone_dind2+0xa3>
mov    -0x1c(%rbp),%edi
lea    0x2e74(%rip),%rsi
mov    $0x0,%al
call   1040 <write_block@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_zone_dind2>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
xor    %eax,%eax
call   1030 <add_zone2@plt>
test   %eax,%eax
je     11b3 <add_zone_dind2+0x73>
mov    %eax,%r14d
lea    0x2eec(%rip),%r15
mov    %eax,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1060 <read_block@plt>
lea    0x4(%rsp),%rbp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
lea    (%r15,%rbx,1),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <add_zone_ind2@plt>
add    $0x4,%rbx
cmp    $0x400,%rbx
jne    1180 <add_zone_dind2+0x40>
cmpl   $0x0,0x4(%rsp)
je     11b3 <add_zone_dind2+0x73>
lea    0x2ea7(%rip),%rsi
mov    %r14d,%edi
xor    %eax,%eax
call   1040 <write_block@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@add_zone_dind2.blk = internal global [1024 x i8] zeroinitializer
define void @add_zone_dind2(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 0, i32* %6
%8 = load i32*, i32** %3
%9 = load i32*, i32** %4
%10 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @add_zone2 to i32 (i32*, i32*, ...)*)(i32* %8, i32* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %2
br label %34
14: ; preds = %2
%15 = load i32, i32* %7
%16 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @read_block to i32 (i32, i8*, ...)*)(i32 %15, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @add_zone_dind2.blk, i64 0, i64 0))
store i32 0, i32* %5
br label %17
17: ; preds = %25, %14
%18 = load i32, i32* %5
%19 = icmp slt i32 %18, 256
br i1 %19, label %20, label %28
20: ; preds = %17
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i32, i32* bitcast ([1024 x i8]* @add_zone_dind2.blk to i32*), i64 %22
%24 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @add_zone_ind2 to i32 (i32*, i32*, ...)*)(i32* %23, i32* %6)
br label %25
25: ; preds = %20
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
br label %17
28: ; preds = %17
%29 = load i32, i32* %6
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %28
%32 = load i32, i32* %7
%33 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @write_block to i32 (i32, i8*, ...)*)(i32 %32, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @add_zone_dind2.blk, i64 0, i64 0))
br label %34
34: ; preds = %13, %31, %28
ret void
}

LLVM IR (-O2):
@add_zone_dind2.blk = internal global [1024 x i8] zeroinitializer
define void @add_zone_dind2(i32* %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = tail call i32 (i32*, i32*, ...) bitcast (i32 (...)* @add_zone2 to i32 (i32*, i32*, ...)*)(i32* %0, i32* %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %20, label %7
7: ; preds = %2
%8 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @read_block to i32 (i32, i8*, ...)*)(i32 %5, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @add_zone_dind2.blk, i64 0, i64 0))
br label %9
9: ; preds = %7, %9
%10 = phi i64 [ 0, %7 ], [ %13, %9 ]
%11 = getelementptr inbounds i32, i32* bitcast ([1024 x i8]* @add_zone_dind2.blk to i32*), i64 %10
%12 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @add_zone_ind2 to i32 (i32*, i32*, ...)*)(i32* %11, i32* %3)
%13 = add nuw nsw i64 %10, 1
%14 = icmp eq i64 %13, 256
br i1 %14, label %15, label %9
15: ; preds = %9
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @write_block to i32 (i32, i8*, ...)*)(i32 %5, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @add_zone_dind2.blk, i64 0, i64 0))
br label %20
20: ; preds = %15, %18, %2
ret void
}