#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);
int /*<<< orphan*/ ft_putnb(int);
int /*<<< orphan*/ ft_putstr(char *);
int my_atoi(char *);
int main(int argc, char **argv) {
  if (argc != 2) {
    ft_putchar('\n');
    return (0);
  }
  int i;
  int nb;
  i = 1;
  nb = my_atoi(argv[1]);
  while (i < 10) {
    int index;
    index = 0;
    ft_putchar(i + '0');
    ft_putstr(" x ");
    ft_putnb(nb);
    ft_putstr(" = ");
    ft_putnb(i * nb);
    ft_putchar('\n');
    i++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1176 <main+0x36>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
movl   $0x0,-0x4(%rbp)
jmp    11f7 <main+0xb7>
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <my_atoi@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    11f0 <main+0xb0>
movl   $0x0,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    $0x30,%eax
movsbl %al,%edi
call   1050 <ft_putchar@plt>
lea    0xe4d(%rip),%rdi
call   1060 <ft_putstr@plt>
mov    -0x18(%rbp),%edi
call   1040 <ft_putnb@plt>
lea    0xe3d(%rip),%rdi
call   1060 <ft_putstr@plt>
mov    -0x14(%rbp),%edi
imul   -0x18(%rbp),%edi
call   1040 <ft_putnb@plt>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118d <main+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
cmp    $0x2,%edi
jne    133a <main+0x1fa>
mov    0x8(%rsi),%rdi
call   1030 <my_atoi@plt>
mov    %eax,%ebx
mov    $0x31,%edi
call   1050 <ft_putchar@plt>
lea    0xe93(%rip),%r14
mov    %r14,%rdi
call   1060 <ft_putstr@plt>
mov    %ebx,%edi
call   1040 <ft_putnb@plt>
lea    0xe81(%rip),%r15
mov    %r15,%rdi
call   1060 <ft_putstr@plt>
mov    %ebx,%edi
call   1040 <ft_putnb@plt>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
mov    $0x32,%edi
call   1050 <ft_putchar@plt>
mov    %r14,%rdi
call   1060 <ft_putstr@plt>
mov    %ebx,%edi
call   1040 <ft_putnb@plt>
mov    %r15,%rdi
call   1060 <ft_putstr@plt>
lea    (%rbx,%rbx,1),%r12d
mov    %r12d,%edi
call   1040 <ft_putnb@plt>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
mov    $0x33,%edi
call   1050 <ft_putchar@plt>
mov    %r14,%rdi
call   1060 <ft_putstr@plt>
mov    %ebx,%edi
call   1040 <ft_putnb@plt>
mov    %r15,%rdi
call   1060 <ft_putstr@plt>
lea    (%rbx,%rbx,2),%edi
call   1040 <ft_putnb@plt>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
mov    $0x34,%edi
call   1050 <ft_putchar@plt>
mov    %r14,%rdi
call   1060 <ft_putstr@plt>
mov    %ebx,%edi
call   1040 <ft_putnb@plt>
mov    %r15,%rdi
call   1060 <ft_putstr@plt>
lea    0x0(,%rbx,4),%edi
call   1040 <ft_putnb@plt>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
mov    $0x35,%edi
call   1050 <ft_putchar@plt>
mov    %r14,%rdi
call   1060 <ft_putstr@plt>
mov    %ebx,%edi
call   1040 <ft_putnb@plt>
mov    %r15,%rdi
call   1060 <ft_putstr@plt>
lea    (%rbx,%rbx,4),%edi
call   1040 <ft_putnb@plt>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
mov    $0x36,%edi
call   1050 <ft_putchar@plt>
mov    %r14,%rdi
call   1060 <ft_putstr@plt>
mov    %ebx,%edi
call   1040 <ft_putnb@plt>
mov    %r15,%rdi
call   1060 <ft_putstr@plt>
lea    (%r12,%r12,2),%edi
call   1040 <ft_putnb@plt>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
mov    $0x37,%edi
call   1050 <ft_putchar@plt>
mov    %r14,%rdi
call   1060 <ft_putstr@plt>
mov    %ebx,%edi
call   1040 <ft_putnb@plt>
mov    %r15,%rdi
call   1060 <ft_putstr@plt>
lea    0x0(,%rbx,8),%ebp
mov    %ebp,%edi
sub    %ebx,%edi
call   1040 <ft_putnb@plt>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
mov    $0x38,%edi
call   1050 <ft_putchar@plt>
mov    %r14,%rdi
call   1060 <ft_putstr@plt>
mov    %ebx,%edi
call   1040 <ft_putnb@plt>
mov    %r15,%rdi
call   1060 <ft_putstr@plt>
mov    %ebp,%edi
call   1040 <ft_putnb@plt>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
mov    $0x39,%edi
call   1050 <ft_putchar@plt>
mov    %r14,%rdi
call   1060 <ft_putstr@plt>
mov    %ebx,%edi
call   1040 <ft_putnb@plt>
mov    %r15,%rdi
call   1060 <ft_putstr@plt>
lea    (%rbx,%rbx,8),%edi
call   1040 <ft_putnb@plt>
mov    $0xa,%edi
call   1050 <ft_putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c" x \00"
@.str.1 = [4 x i8] c" = \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 2
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @ft_putchar(i8 signext 10)
store i32 0, i32* %3
br label %38
13: ; preds = %2
store i32 1, i32* %6
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @my_atoi(i8* %16)
store i32 %17, i32* %7
br label %18
18: ; preds = %21, %13
%19 = load i32, i32* %6
%20 = icmp slt i32 %19, 10
br i1 %20, label %21, label %37
21: ; preds = %18
store i32 0, i32* %8
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 48
%24 = trunc i32 %23 to i8
%25 = call i32 @ft_putchar(i8 signext %24)
%26 = call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%27 = load i32, i32* %7
%28 = call i32 @ft_putnb(i32 %27)
%29 = call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%30 = load i32, i32* %6
%31 = load i32, i32* %7
%32 = mul nsw i32 %30, %31
%33 = call i32 @ft_putnb(i32 %32)
%34 = call i32 @ft_putchar(i8 signext 10)
%35 = load i32, i32* %6
%36 = add nsw i32 %35, 1
store i32 %36, i32* %6
br label %18
37: ; preds = %18
store i32 0, i32* %3
br label %38
38: ; preds = %37, %11
%39 = load i32, i32* %3
ret i32 %39
}

LLVM IR (-O2):
@.str = [4 x i8] c" x \00"
@.str.1 = [4 x i8] c" = \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %69
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @my_atoi(i8* %6)
%8 = tail call i32 @ft_putchar(i8 signext 49)
%9 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @ft_putnb(i32 %7)
%11 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32 @ft_putnb(i32 %7)
%13 = tail call i32 @ft_putchar(i8 signext 10)
%14 = tail call i32 @ft_putchar(i8 signext 50)
%15 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%16 = tail call i32 @ft_putnb(i32 %7)
%17 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%18 = shl nsw i32 %7, 1
%19 = tail call i32 @ft_putnb(i32 %18)
%20 = tail call i32 @ft_putchar(i8 signext 10)
%21 = tail call i32 @ft_putchar(i8 signext 51)
%22 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%23 = tail call i32 @ft_putnb(i32 %7)
%24 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%25 = mul nsw i32 %7, 3
%26 = tail call i32 @ft_putnb(i32 %25)
%27 = tail call i32 @ft_putchar(i8 signext 10)
%28 = tail call i32 @ft_putchar(i8 signext 52)
%29 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%30 = tail call i32 @ft_putnb(i32 %7)
%31 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%32 = shl nsw i32 %7, 2
%33 = tail call i32 @ft_putnb(i32 %32)
%34 = tail call i32 @ft_putchar(i8 signext 10)
%35 = tail call i32 @ft_putchar(i8 signext 53)
%36 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%37 = tail call i32 @ft_putnb(i32 %7)
%38 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%39 = mul nsw i32 %7, 5
%40 = tail call i32 @ft_putnb(i32 %39)
%41 = tail call i32 @ft_putchar(i8 signext 10)
%42 = tail call i32 @ft_putchar(i8 signext 54)
%43 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%44 = tail call i32 @ft_putnb(i32 %7)
%45 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%46 = mul nsw i32 %7, 6
%47 = tail call i32 @ft_putnb(i32 %46)
%48 = tail call i32 @ft_putchar(i8 signext 10)
%49 = tail call i32 @ft_putchar(i8 signext 55)
%50 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%51 = tail call i32 @ft_putnb(i32 %7)
%52 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%53 = mul nsw i32 %7, 7
%54 = tail call i32 @ft_putnb(i32 %53)
%55 = tail call i32 @ft_putchar(i8 signext 10)
%56 = tail call i32 @ft_putchar(i8 signext 56)
%57 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%58 = tail call i32 @ft_putnb(i32 %7)
%59 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%60 = shl nsw i32 %7, 3
%61 = tail call i32 @ft_putnb(i32 %60)
%62 = tail call i32 @ft_putchar(i8 signext 10)
%63 = tail call i32 @ft_putchar(i8 signext 57)
%64 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%65 = tail call i32 @ft_putnb(i32 %7)
%66 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%67 = mul nsw i32 %7, 9
%68 = tail call i32 @ft_putnb(i32 %67)
br label %69
69: ; preds = %2, %4
%70 = tail call i32 @ft_putchar(i8 signext 10)
ret i32 0
}