#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 *);
int /*<<< orphan*/ printout_number_under1000000(int, int);
int printout_number(int N) {
  if (((N) > 0 ? (N) : -(N)) >= 1000000)
    return 1;
  if (N < 0) {
    printf("minus ");
    N = -N;
  }
  printout_number_under1000000(N, 1);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<printout_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1140 <printout_number+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <printout_number+0x28>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    $0xf4240,%eax
jl     1162 <printout_number+0x42>
movl   $0x1,-0x4(%rbp)
jmp    11a0 <printout_number+0x80>
cmpl   $0x0,-0x8(%rbp)
jge    1180 <printout_number+0x60>
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
call   1030 <printout_number_under1000000@plt>
lea    0xe73(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printout_number>:
push   %rbx
mov    %edi,%ebx
neg    %ebx
mov    %edi,%ecx
cmovns %ebx,%ecx
mov    $0x1,%eax
cmp    $0xf423f,%ecx
ja     116f <printout_number+0x3f>
test   %edi,%edi
jns    1159 <printout_number+0x29>
lea    0xeae(%rip),%rdi
call   1050 <printf@plt>
mov    %ebx,%edi
mov    $0x1,%esi
call   1040 <printout_number_under1000000@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"minus \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @printout_number(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32, i32* %3
br label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sub nsw i32 0, %9
br label %11
11: ; preds = %8, %6
%12 = phi i32 [ %7, %6 ], [ %10, %8 ]
%13 = icmp sge i32 %12, 1000000
br i1 %13, label %14, label %15
14: ; preds = %11
store i32 1, i32* %2
br label %26
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%20 = load i32, i32* %3
%21 = sub nsw i32 0, %20
store i32 %21, i32* %3
br label %22
22: ; preds = %18, %15
%23 = load i32, i32* %3
%24 = call i32 @printout_number_under1000000(i32 %23, i32 1)
%25 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %26
26: ; preds = %22, %14
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
@.str = [7 x i8] c"minus \00"
define i32 @printout_number(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%4 = icmp ugt i32 %3, 999999
br i1 %4, label %13, label %5
5: ; preds = %1
%6 = icmp slt i32 %0, 0
br i1 %6, label %7, label %9
7: ; preds = %5
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %2, %7 ], [ %0, %5 ]
%11 = tail call i32 @printout_number_under1000000(i32 %10, i32 1)
%12 = tail call i32 @putchar(i32 10)
br label %13
13: ; preds = %1, %9
%14 = phi i32 [ 0, %9 ], [ 1, %1 ]
ret i32 %14
}