#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 atoi(char *);
int lower_number(int, int);
int find_integers_amount(int argc, char *argv[]) {
  int integers_amount_parameter;
  int lowest_integers_amount;
  if (argc < 2) {
    return 0;
  } else {
    integers_amount_parameter = atoi(argv[1]);
  }
  lowest_integers_amount = lower_number(integers_amount_parameter, argc - 2);
  lowest_integers_amount = lower_number(lowest_integers_amount, 100);
  return lowest_integers_amount;
}


x86 assembly (clang, -O0):
<find_integers_amount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1145 <find_integers_amount+0x25>
movl   $0x0,-0x4(%rbp)
jmp    117c <find_integers_amount+0x5c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%esi
sub    $0x2,%esi
call   1030 <lower_number@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    $0x64,%esi
call   1030 <lower_number@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_integers_amount>:
cmp    $0x2,%edi
jge    1128 <find_integers_amount+0x8>
xor    %eax,%eax
ret
push   %rbx
mov    %edi,%ebx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
add    $0xfffffffe,%ebx
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <lower_number@plt>
mov    %eax,%edi
mov    $0x64,%esi
pop    %rbx
jmp    1030 <lower_number@plt>

LLVM IR (-O0):
define i32 @find_integers_amount(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 2
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 0, i32* %3
br label %24
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @atoi(i8* %14)
store i32 %15, i32* %6
br label %16
16: ; preds = %11
%17 = load i32, i32* %6
%18 = load i32, i32* %4
%19 = sub nsw i32 %18, 2
%20 = call i32 @lower_number(i32 %17, i32 %19)
store i32 %20, i32* %7
%21 = load i32, i32* %7
%22 = call i32 @lower_number(i32 %21, i32 100)
store i32 %22, i32* %7
%23 = load i32, i32* %7
store i32 %23, i32* %3
br label %24
24: ; preds = %16, %10
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @find_integers_amount(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = add nsw i32 %0, -2
%9 = tail call i32 @lower_number(i32 %7, i32 %8)
%10 = tail call i32 @lower_number(i32 %9, i32 100)
br label %11
11: ; preds = %2, %4
%12 = phi i32 [ %10, %4 ], [ 0, %2 ]
ret i32 %12
}