#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*/ nonnull_arg(int *);
int /*<<< orphan*/ nonnull_assign1(int *);
int /*<<< orphan*/ nonnull_assign2(int *);
int /*<<< orphan*/ nonnull_assign3(int *);
int /*<<< orphan*/ nonnull_init1(int *);
int /*<<< orphan*/ nonnull_init2(int *);
int /*<<< orphan*/ nonnull_retval1(int *);
int /*<<< orphan*/ nonnull_retval2(int *, int *, int *, int *,
                                   int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/);
int main(int argc, char **argv) {
  int *p = (argc > 1) ? &argc : ((int *)0);
  nonnull_retval1(p);
  nonnull_retval2(p, p, p, p, 0, 0, 0, 0);
  nonnull_arg(p);
  nonnull_assign1(p);
  nonnull_assign2(p);
  nonnull_assign3(p);
  nonnull_init1(p);
  nonnull_init2(p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    11ad <main+0x2d>
lea    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    11b8 <main+0x38>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    11b8 <main+0x38>
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <nonnull_retval1@plt>
mov    -0x18(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x0,0x8(%rsp)
call   1080 <nonnull_retval2@plt>
mov    -0x18(%rbp),%rdi
call   1050 <nonnull_arg@plt>
mov    -0x18(%rbp),%rdi
call   1070 <nonnull_assign1@plt>
mov    -0x18(%rbp),%rdi
call   10a0 <nonnull_assign2@plt>
mov    -0x18(%rbp),%rdi
call   1060 <nonnull_assign3@plt>
mov    -0x18(%rbp),%rdi
call   1040 <nonnull_init1@plt>
mov    -0x18(%rbp),%rdi
call   1090 <nonnull_init2@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,0xc(%rsp)
xor    %eax,%eax
cmp    $0x2,%edi
lea    0xc(%rsp),%rbx
cmovl  %rax,%rbx
mov    %rbx,%rdi
call   1030 <nonnull_retval1@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    %rbx,%rcx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
call   1080 <nonnull_retval2@plt>
add    $0x10,%rsp
mov    %rbx,%rdi
call   1050 <nonnull_arg@plt>
mov    %rbx,%rdi
call   1070 <nonnull_assign1@plt>
mov    %rbx,%rdi
call   10a0 <nonnull_assign2@plt>
mov    %rbx,%rdi
call   1060 <nonnull_assign3@plt>
mov    %rbx,%rdi
call   1040 <nonnull_init1@plt>
mov    %rbx,%rdi
call   1090 <nonnull_init2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
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, 1
br i1 %8, label %9, label %10
9: ; preds = %2
br label %11
10: ; preds = %2
br label %11
11: ; preds = %10, %9
%12 = phi i32* [ %4, %9 ], [ null, %10 ]
store i32* %12, i32** %6
%13 = load i32*, i32** %6
%14 = call i32 @nonnull_retval1(i32* %13)
%15 = load i32*, i32** %6
%16 = load i32*, i32** %6
%17 = load i32*, i32** %6
%18 = load i32*, i32** %6
%19 = call i32 @nonnull_retval2(i32* %15, i32* %16, i32* %17, i32* %18, i32 0, i32 0, i32 0, i32 0)
%20 = load i32*, i32** %6
%21 = call i32 @nonnull_arg(i32* %20)
%22 = load i32*, i32** %6
%23 = call i32 @nonnull_assign1(i32* %22)
%24 = load i32*, i32** %6
%25 = call i32 @nonnull_assign2(i32* %24)
%26 = load i32*, i32** %6
%27 = call i32 @nonnull_assign3(i32* %26)
%28 = load i32*, i32** %6
%29 = call i32 @nonnull_init1(i32* %28)
%30 = load i32*, i32** %6
%31 = call i32 @nonnull_init2(i32* %30)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = icmp sgt i32 %0, 1
%5 = select i1 %4, i32* %3, i32* null
%6 = call i32 @nonnull_retval1(i32* %5)
%7 = call i32 @nonnull_retval2(i32* %5, i32* %5, i32* %5, i32* %5, i32 0, i32 0, i32 0, i32 0)
%8 = call i32 @nonnull_arg(i32* %5)
%9 = call i32 @nonnull_assign1(i32* %5)
%10 = call i32 @nonnull_assign2(i32* %5)
%11 = call i32 @nonnull_assign3(i32* %5)
%12 = call i32 @nonnull_init1(i32* %5)
%13 = call i32 @nonnull_init2(i32* %5)
ret i32 0
}