#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*/ ft_putchar(char);
void ligne_1(int x) {
  int a;
  a = 0;
  while (a != x) {
    if (a != 0 && a != x - 1) {
      ft_putchar('*');
    } else if (a == 0) {
      ft_putchar('/');
    } else {
      ft_putchar('\\');
    }
    a++;
  }
}


x86 assembly (clang, -O0):
<ligne_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
je     118e <ligne_1+0x7e>
cmpl   $0x0,-0x8(%rbp)
je     1158 <ligne_1+0x48>
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     1158 <ligne_1+0x48>
mov    $0x2a,%edi
call   1030 <ft_putchar@plt>
jmp    1180 <ligne_1+0x70>
cmpl   $0x0,-0x8(%rbp)
jne    1171 <ligne_1+0x61>
mov    $0x2f,%edi
call   1030 <ft_putchar@plt>
jmp    117b <ligne_1+0x6b>
mov    $0x5c,%edi
call   1030 <ft_putchar@plt>
jmp    1180 <ligne_1+0x70>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <ligne_1+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ligne_1>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
je     1145 <ligne_1+0x35>
mov    %edi,%ebx
mov    $0x2f,%edi
call   1030 <ft_putchar@plt>
cmp    $0x1,%ebx
je     1145 <ligne_1+0x35>
add    $0xffffffff,%ebx
mov    $0x5c,%ebp
cmp    $0x1,%ebx
mov    $0x2a,%edi
cmove  %ebp,%edi
call   1030 <ft_putchar@plt>
add    $0xffffffff,%ebx
jne    1130 <ligne_1+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @ligne_1(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @ft_putchar(i8 signext 47)
%6 = icmp eq i32 %0, 1
br i1 %6, label %14, label %7
7: ; preds = %3, %7
%8 = phi i32 [ %12, %7 ], [ 1, %3 ]
%9 = icmp eq i32 %8, %4
%10 = select i1 %9, i8 92, i8 42
%11 = tail call i32 @ft_putchar(i8 signext %10)
%12 = add nuw nsw i32 %8, 1
%13 = icmp eq i32 %12, %0
br i1 %13, label %14, label %7
14: ; preds = %7, %3, %1
ret void
}