#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*/ code_byte(int);
int /*<<< orphan*/ lua_codeadjust(int);
void adjust_mult_assign(int vars, int exps, int temps) {
  if (exps < 0) {
    int r = vars - (-exps - 1);
    if (r >= 0)
      code_byte(r);
    else {
      code_byte(0);
      lua_codeadjust(temps);
    }
  } else if (vars != exps)
    lua_codeadjust(temps);
}


x86 assembly (clang, -O0):
<adjust_mult_assign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1176 <adjust_mult_assign+0x56>
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
sub    $0x1,%ecx
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1162 <adjust_mult_assign+0x42>
mov    -0x10(%rbp),%edi
call   1030 <code_byte@plt>
jmp    1171 <adjust_mult_assign+0x51>
xor    %edi,%edi
call   1030 <code_byte@plt>
mov    -0xc(%rbp),%edi
call   1040 <lua_codeadjust@plt>
jmp    118f <adjust_mult_assign+0x6f>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     118a <adjust_mult_assign+0x6a>
mov    -0xc(%rbp),%edi
call   1040 <lua_codeadjust@plt>
jmp    118f <adjust_mult_assign+0x6f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adjust_mult_assign>:
push   %rbx
mov    %edx,%ebx
test   %esi,%esi
js     112d <adjust_mult_assign+0xd>
cmp    %esi,%edi
jne    1140 <adjust_mult_assign+0x20>
pop    %rbx
ret
add    %esi,%edi
inc    %edi
js     1139 <adjust_mult_assign+0x19>
pop    %rbx
jmp    1030 <code_byte@plt>
xor    %edi,%edi
call   1030 <code_byte@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <lua_codeadjust@plt>

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

LLVM IR (-O2):
define void @adjust_mult_assign(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = add i32 %0, 1
%7 = add i32 %6, %1
%8 = icmp sgt i32 %7, -1
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = tail call i32 @code_byte(i32 %7)
br label %18
11: ; preds = %5
%12 = tail call i32 @code_byte(i32 0)
%13 = tail call i32 @lua_codeadjust(i32 %2)
br label %18
14: ; preds = %3
%15 = icmp eq i32 %0, %1
br i1 %15, label %18, label %16
16: ; preds = %14
%17 = tail call i32 @lua_codeadjust(i32 %2)
br label %18
18: ; preds = %9, %11, %14, %16
ret void
}