#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*/ put_AC(int, int, int /*<<< orphan*/, int);
int /*<<< orphan*/ put_bits(int, int, int);
void put_ACfirst(signed int run, signed int val, signed int id) {
  if (run == 0) {
    if (val == 1)
      goto __CPROVER_DUMP_L1;
    if (val == -1)
      goto __CPROVER_DUMP_L1;
    goto __CPROVER_DUMP_L2;
  __CPROVER_DUMP_L1:;
    put_bits(2 | (signed int)(val < 0), 2, id);
  } else {
  __CPROVER_DUMP_L2:;
    put_AC(run, val, 0, id);
  }
}


x86 assembly (clang, -O0):
<put_ACfirst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    117f <put_ACfirst+0x5f>
cmpl   $0x1,-0x8(%rbp)
jne    114a <put_ACfirst+0x2a>
jmp    115e <put_ACfirst+0x3e>
cmpl   $0xffffffff,-0x8(%rbp)
jne    1159 <put_ACfirst+0x39>
jmp    115e <put_ACfirst+0x3e>
jmp    1184 <put_ACfirst+0x64>
cmpl   $0x0,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
or     $0x2,%edi
mov    -0xc(%rbp),%edx
mov    $0x2,%esi
call   1030 <put_bits@plt>
jmp    1194 <put_ACfirst+0x74>
jmp    1184 <put_ACfirst+0x64>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%ecx
xor    %edx,%edx
call   1040 <put_AC@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_ACfirst>:
mov    %edx,%ecx
test   %edi,%edi
je     112d <put_ACfirst+0xd>
xor    %edx,%edx
jmp    1040 <put_AC@plt>
cmp    $0x1,%esi
je     1137 <put_ACfirst+0x17>
cmp    $0xffffffff,%esi
jne    1126 <put_ACfirst+0x6>
shr    $0x1f,%esi
or     $0x2,%esi
mov    %esi,%edi
mov    $0x2,%esi
mov    %ecx,%edx
jmp    1030 <put_bits@plt>

LLVM IR (-O0):
define void @put_ACfirst(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %25
9: ; preds = %3
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %9
br label %18
13: ; preds = %9
%14 = load i32, i32* %5
%15 = icmp eq i32 %14, -1
br i1 %15, label %16, label %17
16: ; preds = %13
br label %18
17: ; preds = %13
br label %26
18: ; preds = %16, %12
%19 = load i32, i32* %5
%20 = icmp slt i32 %19, 0
%21 = zext i1 %20 to i32
%22 = or i32 2, %21
%23 = load i32, i32* %6
%24 = call i32 @put_bits(i32 %22, i32 2, i32 %23)
br label %31
25: ; preds = %3
br label %26
26: ; preds = %25, %17
%27 = load i32, i32* %4
%28 = load i32, i32* %5
%29 = load i32, i32* %6
%30 = call i32 @put_AC(i32 %27, i32 %28, i32 0, i32 %29)
br label %31
31: ; preds = %26, %18
ret void
}

LLVM IR (-O2):
define void @put_ACfirst(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %10
5: ; preds = %3
switch i32 %1, label %10 [
i32 -1, label %6
i32 1, label %6
]
6: ; preds = %5, %5
%7 = lshr i32 %1, 31
%8 = or i32 %7, 2
%9 = tail call i32 @put_bits(i32 %8, i32 2, i32 %2)
br label %12
10: ; preds = %5, %3
%11 = tail call i32 @put_AC(i32 %0, i32 %1, i32 0, i32 %2)
br label %12
12: ; preds = %10, %6
ret void
}