#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 */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ waddch(int /*<<< orphan*/ *, char);
int interface_w_print_separator_line(WINDOW *wgrid, int col_dim) {
  int col;
  for (col = 0; col < col_dim; col++) {
    if (col == 0)
      waddch(wgrid, ' ');
    else
      waddch(wgrid, ' ');
    waddch(wgrid, ' ');
    waddch(wgrid, ' ');
    waddch(wgrid, ' ');
  }
  return (0);
}


x86 assembly (clang, -O0):
<interface_w_print_separator_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1195 <interface_w_print_separator_line+0x85>
cmpl   $0x0,-0x10(%rbp)
jne    114f <interface_w_print_separator_line+0x3f>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
jmp    115d <interface_w_print_separator_line+0x4d>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <interface_w_print_separator_line+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interface_w_print_separator_line>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1199 <interface_w_print_separator_line+0x89>
mov    %esi,%ebx
mov    %rdi,%r14
mov    $0x20,%esi
call   1030 <waddch@plt>
mov    %r14,%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
mov    %r14,%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
mov    %r14,%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
cmp    $0x1,%ebx
je     1199 <interface_w_print_separator_line+0x89>
add    $0xffffffff,%ebx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
mov    %r14,%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
mov    %r14,%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
mov    %r14,%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
add    $0xffffffff,%ebx
jne    1160 <interface_w_print_separator_line+0x50>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @interface_w_print_separator_line(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %26, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %29
10: ; preds = %6
%11 = load i32, i32* %5
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32*, i32** %3
%15 = call i32 @waddch(i32* %14, i8 signext 32)
br label %19
16: ; preds = %10
%17 = load i32*, i32** %3
%18 = call i32 @waddch(i32* %17, i8 signext 32)
br label %19
19: ; preds = %16, %13
%20 = load i32*, i32** %3
%21 = call i32 @waddch(i32* %20, i8 signext 32)
%22 = load i32*, i32** %3
%23 = call i32 @waddch(i32* %22, i8 signext 32)
%24 = load i32*, i32** %3
%25 = call i32 @waddch(i32* %24, i8 signext 32)
br label %26
26: ; preds = %19
%27 = load i32, i32* %5
%28 = add nsw i32 %27, 1
store i32 %28, i32* %5
br label %6
29: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @interface_w_print_separator_line(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %18
4: ; preds = %2
%5 = tail call i32 @waddch(i32* %0, i8 signext 32)
%6 = tail call i32 @waddch(i32* %0, i8 signext 32)
%7 = tail call i32 @waddch(i32* %0, i8 signext 32)
%8 = tail call i32 @waddch(i32* %0, i8 signext 32)
%9 = icmp eq i32 %1, 1
br i1 %9, label %18, label %10
10: ; preds = %4, %10
%11 = phi i32 [ %16, %10 ], [ 1, %4 ]
%12 = tail call i32 @waddch(i32* %0, i8 signext 32)
%13 = tail call i32 @waddch(i32* %0, i8 signext 32)
%14 = tail call i32 @waddch(i32* %0, i8 signext 32)
%15 = tail call i32 @waddch(i32* %0, i8 signext 32)
%16 = add nuw nsw i32 %11, 1
%17 = icmp eq i32 %16, %1
br i1 %17, label %18, label %10
18: ; preds = %10, %4, %2
ret i32 0
}