#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*/ __CRAB_assume(int);
int /*<<< orphan*/ __CRAB_intrinsic_check_does_not_have_tag(int *, int);
int /*<<< orphan*/ init(int *, int *, int *);
int int_nd();
int /*<<< orphan*/ loop_body(int *, int *, int *);
int /*<<< orphan*/ sea_dsa_set_read(int *);
int main(int argc, char **argv) {
  int x = 0;
  int y = 1;
  int i = 0;
  init(&x, &y, &i);
  int n = int_nd();
  __CRAB_assume(n > 0);
  while (i < n) {
    loop_body(&x, &y, &i);
  }
  __CRAB_intrinsic_check_does_not_have_tag(&i, 2);
  sea_dsa_set_read(&i);
  ;
  __CRAB_intrinsic_check_does_not_have_tag(&i, 3);
  sea_dsa_set_read(&i);
  ;
  __CRAB_intrinsic_check_does_not_have_tag(&y, 1);
  sea_dsa_set_read(&y);
  ;
  __CRAB_intrinsic_check_does_not_have_tag(&x, 3);
  sea_dsa_set_read(&x);
  ;
  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)
movl   $0x0,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1030 <init@plt>
mov    $0x0,%al
call   1070 <int_nd@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <__CRAB_assume@plt>
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    11d9 <main+0x79>
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1040 <loop_body@plt>
jmp    11b7 <main+0x57>
lea    -0x1c(%rbp),%rdi
mov    $0x2,%esi
call   1080 <__CRAB_intrinsic_check_does_not_have_tag@plt>
lea    -0x1c(%rbp),%rdi
call   1050 <sea_dsa_set_read@plt>
lea    -0x1c(%rbp),%rdi
mov    $0x3,%esi
call   1080 <__CRAB_intrinsic_check_does_not_have_tag@plt>
lea    -0x1c(%rbp),%rdi
call   1050 <sea_dsa_set_read@plt>
lea    -0x18(%rbp),%rdi
mov    $0x1,%esi
call   1080 <__CRAB_intrinsic_check_does_not_have_tag@plt>
lea    -0x18(%rbp),%rdi
call   1050 <sea_dsa_set_read@plt>
lea    -0x14(%rbp),%rdi
mov    $0x3,%esi
call   1080 <__CRAB_intrinsic_check_does_not_have_tag@plt>
lea    -0x14(%rbp),%rdi
call   1050 <sea_dsa_set_read@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x0,0x14(%rsp)
movl   $0x1,0x10(%rsp)
movl   $0x0,0xc(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <init@plt>
xor    %eax,%eax
call   1070 <int_nd@plt>
mov    %eax,%ebx
xor    %edi,%edi
test   %eax,%eax
setg   %dil
call   1060 <__CRAB_assume@plt>
cmp    %ebx,0xc(%rsp)
jge    11e4 <main+0x84>
lea    0x14(%rsp),%r14
lea    0x10(%rsp),%r15
lea    0xc(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1040 <loop_body@plt>
cmp    %ebx,0xc(%rsp)
jl     11d0 <main+0x70>
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1080 <__CRAB_intrinsic_check_does_not_have_tag@plt>
mov    %rbx,%rdi
call   1050 <sea_dsa_set_read@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1080 <__CRAB_intrinsic_check_does_not_have_tag@plt>
mov    %rbx,%rdi
call   1050 <sea_dsa_set_read@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1080 <__CRAB_intrinsic_check_does_not_have_tag@plt>
mov    %rbx,%rdi
call   1050 <sea_dsa_set_read@plt>
lea    0x14(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1080 <__CRAB_intrinsic_check_does_not_have_tag@plt>
mov    %rbx,%rdi
call   1050 <sea_dsa_set_read@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
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 i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 1, i32* %7
store i32 0, i32* %8
%10 = call i32 @init(i32* %6, i32* %7, i32* %8)
%11 = call i32 (...) @int_nd()
store i32 %11, i32* %9
%12 = load i32, i32* %9
%13 = icmp sgt i32 %12, 0
%14 = zext i1 %13 to i32
%15 = call i32 @__CRAB_assume(i32 %14)
br label %16
16: ; preds = %20, %2
%17 = load i32, i32* %8
%18 = load i32, i32* %9
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = call i32 @loop_body(i32* %6, i32* %7, i32* %8)
br label %16
22: ; preds = %16
%23 = call i32 @__CRAB_intrinsic_check_does_not_have_tag(i32* %8, i32 2)
%24 = call i32 @sea_dsa_set_read(i32* %8)
%25 = call i32 @__CRAB_intrinsic_check_does_not_have_tag(i32* %8, i32 3)
%26 = call i32 @sea_dsa_set_read(i32* %8)
%27 = call i32 @__CRAB_intrinsic_check_does_not_have_tag(i32* %7, i32 1)
%28 = call i32 @sea_dsa_set_read(i32* %7)
%29 = call i32 @__CRAB_intrinsic_check_does_not_have_tag(i32* %6, i32 3)
%30 = call i32 @sea_dsa_set_read(i32* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%7 = bitcast i32* %4 to i8*
store i32 1, i32* %4
%8 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%9 = call i32 @init(i32* %3, i32* %4, i32* %5)
%10 = call i32 (...) @int_nd()
%11 = icmp sgt i32 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @__CRAB_assume(i32 %12)
%14 = load i32, i32* %5
%15 = icmp slt i32 %14, %10
br i1 %15, label %16, label %20
16: ; preds = %2, %16
%17 = call i32 @loop_body(i32* %3, i32* %4, i32* %5)
%18 = load i32, i32* %5
%19 = icmp slt i32 %18, %10
br i1 %19, label %16, label %20
20: ; preds = %16, %2
%21 = call i32 @__CRAB_intrinsic_check_does_not_have_tag(i32* %5, i32 2)
%22 = call i32 @sea_dsa_set_read(i32* %5)
%23 = call i32 @__CRAB_intrinsic_check_does_not_have_tag(i32* %5, i32 3)
%24 = call i32 @sea_dsa_set_read(i32* %5)
%25 = call i32 @__CRAB_intrinsic_check_does_not_have_tag(i32* %4, i32 1)
%26 = call i32 @sea_dsa_set_read(i32* %4)
%27 = call i32 @__CRAB_intrinsic_check_does_not_have_tag(i32* %3, i32 3)
%28 = call i32 @sea_dsa_set_read(i32* %3)
ret i32 0
}