#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*/ lotsOfArgs(int, int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ modifyInt(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  if (argc > 0) {
    int var_makes_block = argc + 1;
    printf("Break here to try targetted stepping.\n");
    lotsOfArgs(var_makes_block, modifyInt(20), 30, modifyInt(40));
    printf("Done calling lotsOfArgs.");
  }
  printf("All done.\n");
  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   $0x0,-0x8(%rbp)
jle    11a0 <main+0x70>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x14,%edi
call   1040 <modifyInt@plt>
mov    %eax,-0x18(%rbp)
mov    $0x28,%edi
call   1040 <modifyInt@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    %eax,%ecx
mov    $0x1e,%edx
call   1050 <lotsOfArgs@plt>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    118a <main+0x4a>
mov    %edi,%ebx
add    $0x1,%ebx
lea    0xed0(%rip),%rdi
call   1030 <puts@plt>
mov    $0x14,%edi
call   1050 <modifyInt@plt>
mov    %eax,%ebp
mov    $0x28,%edi
call   1050 <modifyInt@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    $0x1e,%edx
mov    %eax,%ecx
call   1060 <lotsOfArgs@plt>
lea    0xe7b(%rip),%rdi
call   1040 <printf@plt>
lea    0xe88(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Break here to try targetted stepping.\0A\00"
@.str.1 = [25 x i8] c"Done calling lotsOfArgs.\00"
@.str.2 = [11 x i8] c"All done.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %2
%10 = load i32, i32* %4
%11 = add nsw i32 %10, 1
store i32 %11, i32* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* %6
%14 = call i32 @modifyInt(i32 20)
%15 = call i32 @modifyInt(i32 40)
%16 = call i32 @lotsOfArgs(i32 %13, i32 %14, i32 30, i32 %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %9, %2
%19 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [25 x i8] c"Done calling lotsOfArgs.\00"
@str = [10 x i8] c"All done.\00"
@str.3 = [38 x i8] c"Break here to try targetted stepping.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = add nuw nsw i32 %0, 1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.3, i64 0, i64 0))
%7 = tail call i32 @modifyInt(i32 20)
%8 = tail call i32 @modifyInt(i32 40)
%9 = tail call i32 @lotsOfArgs(i32 %5, i32 %7, i32 30, i32 %8)
%10 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %4, %2
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i32 0
}