#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*/ affiche_entier(int);
int /*<<< orphan*/ fatal(int, char *, int);
int /*<<< orphan*/ putchar(char);
int readl(int *);
int main(void) {
  int line[81];
  int i, j;
  i = readl(line);
  j = 0;
  while (line[j])
    putchar(line[j++]);
  putchar('\n');
  affiche_entier(i);
  putchar('\n');
  fatal(1 == 1, "1==1 is true\n", 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x150(%rbp),%rdi
call   1040 <readl@plt>
mov    %eax,-0x154(%rbp)
movl   $0x0,-0x158(%rbp)
movslq -0x158(%rbp),%rax
cmpl   $0x0,-0x150(%rbp,%rax,4)
je     11aa <main+0x6a>
mov    -0x158(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x158(%rbp)
cltq
mov    -0x150(%rbp,%rax,4),%eax
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    116e <main+0x2e>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x154(%rbp),%edi
call   1050 <affiche_entier@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%edi
lea    0xe2b(%rip),%rsi
mov    $0x2,%edx
call   1060 <fatal@plt>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x148,%rsp
mov    %rsp,%rdi
call   1040 <readl@plt>
mov    %eax,%ebp
mov    (%rsp),%eax
test   %eax,%eax
je     1172 <main+0x32>
lea    0x4(%rsp),%rbx
nop
movsbl %al,%edi
call   1030 <putchar@plt>
mov    (%rbx),%eax
add    $0x4,%rbx
test   %eax,%eax
jne    1160 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %ebp,%edi
call   1050 <affiche_entier@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe6c(%rip),%rsi
mov    $0x1,%edi
mov    $0x2,%edx
call   1060 <fatal@plt>
xor    %eax,%eax
add    $0x148,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"1==1 is true\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [81 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = getelementptr inbounds [81 x i32], [81 x i32]* %2, i64 0, i64 0
%6 = call i32 @readl(i32* %5)
store i32 %6, i32* %3
store i32 0, i32* %4
br label %7
7: ; preds = %13, %0
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [81 x i32], [81 x i32]* %2, i64 0, i64 %9
%11 = load i32, i32* %10
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %7
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
%16 = sext i32 %14 to i64
%17 = getelementptr inbounds [81 x i32], [81 x i32]* %2, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = trunc i32 %18 to i8
%20 = call i32 @putchar(i8 signext %19)
br label %7
21: ; preds = %7
%22 = call i32 @putchar(i8 signext 10)
%23 = load i32, i32* %3
%24 = call i32 @affiche_entier(i32 %23)
%25 = call i32 @putchar(i8 signext 10)
%26 = call i32 @fatal(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"1==1 is true\0A\00"
define i32 @main() {
%1 = alloca [81 x i32]
%2 = bitcast [81 x i32]* %1 to i8*
%3 = getelementptr inbounds [81 x i32], [81 x i32]* %1, i64 0, i64 0
%4 = call i32 @readl(i32* %3)
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %0, %7
%8 = phi i64 [ %10, %7 ], [ 0, %0 ]
%9 = phi i32 [ %14, %7 ], [ %5, %0 ]
%10 = add nuw i64 %8, 1
%11 = trunc i32 %9 to i8
%12 = call i32 @putchar(i8 signext %11)
%13 = getelementptr inbounds [81 x i32], [81 x i32]* %1, i64 0, i64 %10
%14 = load i32, i32* %13
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %7
16: ; preds = %7, %0
%17 = call i32 @putchar(i8 signext 10)
%18 = call i32 @affiche_entier(i32 %4)
%19 = call i32 @putchar(i8 signext 10)
%20 = call i32 @fatal(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}