#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 bla();
scalar_t__ f(int, int);
scalar_t__ malloc(int);
int main(int argc, char *argv[]) {
  int x;
  int y;
  char *a;
  a = (char *)malloc(10);
  a[0] = 'b';
  y = bla();
  if (f(x, y))
    x = 4;
  if (argc > 5)
    x = 2;
  else
    x = 1;
  if (argc > 27)
    ++x;
  else
    --x;
  bla();
  return y;
}


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)
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movb   $0x62,(%rax)
mov    $0x0,%al
call   1050 <bla@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <f@plt>
cmp    $0x0,%rax
je     1181 <main+0x51>
movl   $0x4,-0x14(%rbp)
cmpl   $0x5,-0x8(%rbp)
jle    1197 <main+0x67>
movl   $0x2,-0x14(%rbp)
jmp    119e <main+0x6e>
movl   $0x1,-0x14(%rbp)
cmpl   $0x1b,-0x8(%rbp)
jle    11b6 <main+0x86>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11bf <main+0x8f>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <bla@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%edi
call   1040 <malloc@plt>
movb   $0x62,(%rax)
xor    %eax,%eax
call   1050 <bla@plt>
mov    %eax,%ebx
mov    %eax,%esi
call   1030 <f@plt>
xor    %eax,%eax
call   1050 <bla@plt>
mov    %ebx,%eax
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
%7 = alloca i32
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i64 @malloc(i32 10)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %8
%11 = load i8*, i8** %8
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 98, i8* %12
%13 = call i32 (...) @bla()
store i32 %13, i32* %7
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = call i64 @f(i32 %14, i32 %15)
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %2
store i32 4, i32* %6
br label %19
19: ; preds = %18, %2
%20 = load i32, i32* %4
%21 = icmp sgt i32 %20, 5
br i1 %21, label %22, label %23
22: ; preds = %19
store i32 2, i32* %6
br label %24
23: ; preds = %19
store i32 1, i32* %6
br label %24
24: ; preds = %23, %22
%25 = load i32, i32* %4
%26 = icmp sgt i32 %25, 27
br i1 %26, label %27, label %30
27: ; preds = %24
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %33
30: ; preds = %24
%31 = load i32, i32* %6
%32 = add nsw i32 %31, -1
store i32 %32, i32* %6
br label %33
33: ; preds = %30, %27
%34 = call i32 (...) @bla()
%35 = load i32, i32* %7
ret i32 %35
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 10)
%4 = inttoptr i64 %3 to i8*
store i8 98, i8* %4
%5 = tail call i32 (...) @bla()
%6 = tail call i64 @f(i32 undef, i32 %5)
%7 = tail call i32 (...) @bla()
ret i32 %5
}