#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  fprintf(stdout, "Une ligne sur stdout\n");
  fprintf(stdout, "Une ligne sur stdout\n");
  fprintf(stdout, "Une ligne sur stdout\n");
  fprintf(stderr, "Une ligne sur stderr\n");
  fprintf(stdout, "Une ligne sur stdout\n");
  fprintf(stdout, "Une ligne sur stdout\n");
  fprintf(stdout, "Une ligne sur stdout\n");
  fprintf(stderr, "Une ligne sur stderr\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
lea    0xeb5(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%edi
lea    0xe76(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
lea    0xe61(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
lea    0xe4c(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
lea    0xe4d(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    0x2eb9(%rip),%r15
mov    (%r15),%edi
lea    0xed7(%rip),%rbx
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    0x2e92(%rip),%r12
mov    (%r12),%edi
lea    0xebd(%rip),%r14
mov    %r14,%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r15),%edi
mov    %rbx,%rsi
call   1030 <fprintf@plt>
mov    (%r12),%edi
mov    %r14,%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [22 x i8] c"Une ligne sur stdout\0A\00"
@stderr = global i32 0
@.str.1 = [22 x i8] c"Une ligne sur stderr\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @stdout
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @stdout
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%14 = load i32, i32* @stdout
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @stdout
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%18 = load i32, i32* @stdout
%19 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%20 = load i32, i32* @stderr
%21 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [22 x i8] c"Une ligne sur stdout\0A\00"
@stderr = global i32 0
@.str.1 = [22 x i8] c"Une ligne sur stderr\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* @stdout
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @stdout
%14 = tail call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%15 = load i32, i32* @stdout
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%17 = load i32, i32* @stderr
%18 = tail call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}