#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*/ set_normal_scale();
int /*<<< orphan*/ zoom_in(int const, int const, int const, int const);
int /*<<< orphan*/ zoom_out(int const, int const, int const, int const);
void zoom_end(void *cookie, int commit, const int *start, const int *end) {
  int f = (intptr_t)cookie;
  if (!commit)
    return;
  if (f < 0)
    zoom_in(start[0], start[1], end[0], end[1]);
  else
    zoom_out(start[0], start[1], end[0], end[1]);
  set_normal_scale();
}


x86 assembly (clang, -O0):
<zoom_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    115d <zoom_end+0x2d>
jmp    11b1 <zoom_end+0x81>
cmpl   $0x0,-0x24(%rbp)
jge    118b <zoom_end+0x5b>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
mov    -0x20(%rbp),%rax
mov    0x4(%rax),%ecx
call   1030 <zoom_in@plt>
jmp    11aa <zoom_end+0x7a>
mov    -0x18(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
mov    -0x20(%rbp),%rax
mov    0x4(%rax),%ecx
call   1050 <zoom_out@plt>
mov    $0x0,%al
call   1040 <set_normal_scale@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zoom_end>:
test   %esi,%esi
je     1150 <zoom_end+0x20>
push   %rax
mov    (%rdx),%eax
mov    0x4(%rdx),%esi
mov    (%rcx),%edx
mov    0x4(%rcx),%ecx
test   $0x80000000,%edi
jne    1151 <zoom_end+0x21>
mov    %eax,%edi
call   1050 <zoom_out@plt>
jmp    1158 <zoom_end+0x28>
ret
mov    %eax,%edi
call   1030 <zoom_in@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <set_normal_scale@plt>

LLVM IR (-O0):
define void @zoom_end(i8* %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%10 = load i8*, i8** %5
%11 = ptrtoint i8* %10 to i64
%12 = trunc i64 %11 to i32
store i32 %12, i32* %9
%13 = load i32, i32* %6
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %4
br label %49
16: ; preds = %4
%17 = load i32, i32* %9
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %33
19: ; preds = %16
%20 = load i32*, i32** %7
%21 = getelementptr inbounds i32, i32* %20, i64 0
%22 = load i32, i32* %21
%23 = load i32*, i32** %7
%24 = getelementptr inbounds i32, i32* %23, i64 1
%25 = load i32, i32* %24
%26 = load i32*, i32** %8
%27 = getelementptr inbounds i32, i32* %26, i64 0
%28 = load i32, i32* %27
%29 = load i32*, i32** %8
%30 = getelementptr inbounds i32, i32* %29, i64 1
%31 = load i32, i32* %30
%32 = call i32 @zoom_in(i32 %22, i32 %25, i32 %28, i32 %31)
br label %47
33: ; preds = %16
%34 = load i32*, i32** %7
%35 = getelementptr inbounds i32, i32* %34, i64 0
%36 = load i32, i32* %35
%37 = load i32*, i32** %7
%38 = getelementptr inbounds i32, i32* %37, i64 1
%39 = load i32, i32* %38
%40 = load i32*, i32** %8
%41 = getelementptr inbounds i32, i32* %40, i64 0
%42 = load i32, i32* %41
%43 = load i32*, i32** %8
%44 = getelementptr inbounds i32, i32* %43, i64 1
%45 = load i32, i32* %44
%46 = call i32 @zoom_out(i32 %36, i32 %39, i32 %42, i32 %45)
br label %47
47: ; preds = %33, %19
%48 = call i32 (...) @set_normal_scale()
br label %49
49: ; preds = %47, %15
ret void
}

LLVM IR (-O2):
define void @zoom_end(i8* %0, i32 %1, i32* nocapture %2, i32* nocapture %3) {
%5 = icmp eq i32 %1, 0
br i1 %5, label %22, label %6
6: ; preds = %4
%7 = ptrtoint i8* %0 to i64
%8 = and i64 %7, 2147483648
%9 = icmp eq i64 %8, 0
%10 = load i32, i32* %2
%11 = getelementptr inbounds i32, i32* %2, i64 1
%12 = load i32, i32* %11
%13 = load i32, i32* %3
%14 = getelementptr inbounds i32, i32* %3, i64 1
%15 = load i32, i32* %14
br i1 %9, label %18, label %16
16: ; preds = %6
%17 = tail call i32 @zoom_in(i32 %10, i32 %12, i32 %13, i32 %15)
br label %20
18: ; preds = %6
%19 = tail call i32 @zoom_out(i32 %10, i32 %12, i32 %13, i32 %15)
br label %20
20: ; preds = %18, %16
%21 = tail call i32 (...) @set_normal_scale()
br label %22
22: ; preds = %4, %20
ret void
}