#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*/ printf(char *, ...);
void numline(int *upcol, int *downcol, int start, int fin) {
  int k, n;
  for (k = start; k <= fin; k++) {
    if ((n = upcol[k]) != 0 || (n = downcol[25 - k]) != 0)
      printf("%4d", n);
    else
      printf("    ");
  }
}


x86 assembly (clang, -O0):
<numline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     11a4 <numline+0x94>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x20(%rbp)
cmp    $0x0,%eax
jne    116d <numline+0x5d>
mov    -0x10(%rbp),%rax
mov    $0x19,%ecx
sub    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x20(%rbp)
cmp    $0x0,%eax
je     1183 <numline+0x73>
mov    -0x20(%rbp),%esi
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1191 <numline+0x81>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1196 <numline+0x86>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112c <numline+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numline>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    %ecx,%edx
jle    112e <numline+0x1e>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ecx,%r12d
movslq %edx,%rax
mov    $0x19,%ecx
sub    %rax,%rcx
lea    (%rsi,%rcx,4),%rbx
lea    (%rdi,%rax,4),%r13
sub    %edx,%r12d
add    $0x1,%r12d
lea    0xeb2(%rip),%r14
lea    0xea7(%rip),%r15
xor    %ebp,%ebp
jmp    1177 <numline+0x67>
nopl   (%rax)
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0xfffffffffffffffc,%rbx
add    $0x1,%rbp
cmp    %ebp,%r12d
je     111f <numline+0xf>
mov    0x0(%r13,%rbp,4),%esi
test   %esi,%esi
jne    1160 <numline+0x50>
mov    (%rbx),%esi
test   %esi,%esi
jne    1160 <numline+0x50>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    116a <numline+0x5a>

LLVM IR (-O0):
@.str = [4 x i8] c"%4d\00"
@.str.1 = [5 x i8] c" \00"
define void @numline(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %7
store i32 %11, i32* %9
br label %12
12: ; preds = %37, %4
%13 = load i32, i32* %9
%14 = load i32, i32* %8
%15 = icmp sle i32 %13, %14
br i1 %15, label %16, label %40
16: ; preds = %12
%17 = load i32*, i32** %5
%18 = load i32, i32* %9
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
store i32 %21, i32* %10
%22 = icmp ne i32 %21, 0
br i1 %22, label %31, label %23
23: ; preds = %16
%24 = load i32*, i32** %6
%25 = load i32, i32* %9
%26 = sub nsw i32 25, %25
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %24, i64 %27
%29 = load i32, i32* %28
store i32 %29, i32* %10
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %23, %16
%32 = load i32, i32* %10
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %32)
br label %36
34: ; preds = %23
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %36
36: ; preds = %34, %31
br label %37
37: ; preds = %36
%38 = load i32, i32* %9
%39 = add nsw i32 %38, 1
store i32 %39, i32* %9
br label %12
40: ; preds = %12
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%4d\00"
@.str.1 = [5 x i8] c" \00"
define void @numline(i32* nocapture %0, i32* nocapture %1, i32 %2, i32 %3) {
%5 = icmp sgt i32 %2, %3
br i1 %5, label %28, label %6
6: ; preds = %4
%7 = sext i32 %2 to i64
%8 = add i32 %3, 1
br label %9
9: ; preds = %6, %24
%10 = phi i64 [ %7, %6 ], [ %25, %24 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %9
%15 = sub nsw i64 25, %10
%16 = getelementptr inbounds i32, i32* %1, i64 %15
%17 = load i32, i32* %16
%18 = icmp eq i32 %17, 0
br i1 %18, label %22, label %19
19: ; preds = %14, %9
%20 = phi i32 [ %12, %9 ], [ %17, %14 ]
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
br label %24
22: ; preds = %14
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %19, %22
%25 = add nsw i64 %10, 1
%26 = trunc i64 %25 to i32
%27 = icmp eq i32 %8, %26
br i1 %27, label %28, label %9
28: ; preds = %24, %4
ret void
}