#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 */
scalar_t__ unknown_function();
void latest_prune_join(int *a, int n) {
  int x;
  if (unknown_function()) {
    if (n < 4) {
      x = 1;
    } else {
      x = 0;
    }
  } else {
    if (n < 5) {
      x = 1;
    } else {
      return;
    }
  }
  if (x) {
    a[n] = 0;
  }
}


x86 assembly (clang, -O0):
<latest_prune_join>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <unknown_function@plt>
cmp    $0x0,%rax
je     1152 <latest_prune_join+0x42>
cmpl   $0x4,-0xc(%rbp)
jge    1146 <latest_prune_join+0x36>
movl   $0x1,-0x10(%rbp)
jmp    114d <latest_prune_join+0x3d>
movl   $0x0,-0x10(%rbp)
jmp    1172 <latest_prune_join+0x62>
cmpl   $0x5,-0xc(%rbp)
jge    1168 <latest_prune_join+0x58>
movl   $0x1,-0x10(%rbp)
jmp    116d <latest_prune_join+0x5d>
jmp    118b <latest_prune_join+0x7b>
jmp    1172 <latest_prune_join+0x62>
cmpl   $0x0,-0x10(%rbp)
je     118b <latest_prune_join+0x7b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<latest_prune_join>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <unknown_function@plt>
test   %rax,%rax
je     113a <latest_prune_join+0x2a>
cmp    $0x3,%ebp
jg     1133 <latest_prune_join+0x23>
movslq %ebp,%rax
movl   $0x0,(%rbx,%rax,4)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
cmp    $0x4,%ebp
jle    1129 <latest_prune_join+0x19>
jmp    1133 <latest_prune_join+0x23>

LLVM IR (-O0):
define void @latest_prune_join(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = call i64 (...) @unknown_function()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 4
br i1 %10, label %11, label %12
11: ; preds = %8
store i32 1, i32* %5
br label %13
12: ; preds = %8
store i32 0, i32* %5
br label %13
13: ; preds = %12, %11
br label %20
14: ; preds = %2
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 5
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 1, i32* %5
br label %19
18: ; preds = %14
br label %28
19: ; preds = %17
br label %20
20: ; preds = %19, %13
%21 = load i32, i32* %5
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = load i32*, i32** %3
%25 = load i32, i32* %4
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %24, i64 %26
store i32 0, i32* %27
br label %28
28: ; preds = %18, %23, %20
ret void
}

LLVM IR (-O2):
define void @latest_prune_join(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i64 (...) @unknown_function()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = icmp sgt i32 %1, 3
br i1 %6, label %12, label %9
7: ; preds = %2
%8 = icmp slt i32 %1, 5
br i1 %8, label %9, label %12
9: ; preds = %7, %5
%10 = sext i32 %1 to i64
%11 = getelementptr inbounds i32, i32* %0, i64 %10
store i32 0, i32* %11
br label %12
12: ; preds = %5, %9, %7
ret void
}