#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*/ deflate_put_bitsR(int, int);
void deflate_put_literal(int val) {
  if (val < 144) {
    val = 48 + val;
    deflate_put_bitsR(8, val);
    return;
  }
  if (val < 256) {
    val = 400 + (val - 144);
    deflate_put_bitsR(9, val);
    return;
  }
  if (val < 280) {
    deflate_put_bitsR(7, val - 256);
    return;
  }
  if (val < 288) {
    deflate_put_bitsR(8, 192 + (val - 280));
    return;
  }
  return;
}


x86 assembly (clang, -O0):
<deflate_put_literal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x90,-0x4(%rbp)
jge    1143 <deflate_put_literal+0x33>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x8,%edi
call   1030 <deflate_put_bitsR@plt>
jmp    11c7 <deflate_put_literal+0xb7>
cmpl   $0x100,-0x4(%rbp)
jge    1172 <deflate_put_literal+0x62>
mov    -0x4(%rbp),%eax
sub    $0x90,%eax
add    $0x190,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x9,%edi
call   1030 <deflate_put_bitsR@plt>
jmp    11c7 <deflate_put_literal+0xb7>
cmpl   $0x118,-0x4(%rbp)
jge    1197 <deflate_put_literal+0x87>
mov    -0x4(%rbp),%esi
sub    $0x100,%esi
mov    $0x7,%edi
call   1030 <deflate_put_bitsR@plt>
jmp    11c7 <deflate_put_literal+0xb7>
cmpl   $0x120,-0x4(%rbp)
jge    11c2 <deflate_put_literal+0xb2>
mov    -0x4(%rbp),%esi
sub    $0x118,%esi
add    $0xc0,%esi
mov    $0x8,%edi
call   1030 <deflate_put_bitsR@plt>
jmp    11c7 <deflate_put_literal+0xb7>
jmp    11c7 <deflate_put_literal+0xb7>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deflate_put_literal>:
mov    $0x8,%eax
mov    $0x30,%esi
cmp    $0x90,%edi
jl     1157 <deflate_put_literal+0x47>
cmp    $0x100,%edi
jae    1136 <deflate_put_literal+0x26>
mov    $0x9,%eax
mov    $0x100,%esi
jmp    1157 <deflate_put_literal+0x47>
cmp    $0x118,%edi
jae    114a <deflate_put_literal+0x3a>
mov    $0x7,%eax
mov    $0xffffff00,%esi
jmp    1157 <deflate_put_literal+0x47>
mov    $0xffffffa8,%esi
cmp    $0x11f,%edi
ja     1160 <deflate_put_literal+0x50>
add    %edi,%esi
mov    %eax,%edi
jmp    1030 <deflate_put_bitsR@plt>
ret

LLVM IR (-O0):
define void @deflate_put_literal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 144
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = add nsw i32 48, %6
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @deflate_put_bitsR(i32 8, i32 %8)
br label %35
10: ; preds = %1
%11 = load i32, i32* %2
%12 = icmp slt i32 %11, 256
br i1 %12, label %13, label %19
13: ; preds = %10
%14 = load i32, i32* %2
%15 = sub nsw i32 %14, 144
%16 = add nsw i32 400, %15
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = call i32 @deflate_put_bitsR(i32 9, i32 %17)
br label %35
19: ; preds = %10
%20 = load i32, i32* %2
%21 = icmp slt i32 %20, 280
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = load i32, i32* %2
%24 = sub nsw i32 %23, 256
%25 = call i32 @deflate_put_bitsR(i32 7, i32 %24)
br label %35
26: ; preds = %19
%27 = load i32, i32* %2
%28 = icmp slt i32 %27, 288
br i1 %28, label %29, label %34
29: ; preds = %26
%30 = load i32, i32* %2
%31 = sub nsw i32 %30, 280
%32 = add nsw i32 192, %31
%33 = call i32 @deflate_put_bitsR(i32 8, i32 %32)
br label %35
34: ; preds = %26
br label %35
35: ; preds = %34, %29, %22, %13, %5
ret void
}

LLVM IR (-O2):
define void @deflate_put_literal(i32 %0) {
%2 = icmp slt i32 %0, 144
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 256
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = icmp ult i32 %0, 280
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = icmp ult i32 %0, 288
br i1 %8, label %9, label %14
9: ; preds = %7, %5, %3, %1
%10 = phi i32 [ 48, %1 ], [ 256, %3 ], [ -256, %5 ], [ -88, %7 ]
%11 = phi i32 [ 8, %1 ], [ 9, %3 ], [ 7, %5 ], [ 8, %7 ]
%12 = add nsw i32 %10, %0
%13 = tail call i32 @deflate_put_bitsR(i32 %11, i32 %12)
br label %14
14: ; preds = %9, %7
ret void
}