#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 */
struct palette {
  int dummy;
};

/* Variables and functions */
struct palette *mkpalette(int);
int /*<<< orphan*/ palettegradient(struct palette *, int, int, int, int, int,
                                   int, int, int);
struct palette *mktexturepalette(void) {
  struct palette *pa = mkpalette(201);
  palettegradient(pa, 253, 255, 192, 187, 111, 63, 0, 30);
  palettegradient(pa, 187, 111, 63, 13, 7, 5, 30, 120);
  palettegradient(pa, 13, 7, 5, 0, 0, 0, 120, 200);
  return pa;
}


x86 assembly (clang, -O0):
<mktexturepalette>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0xc9,%edi
call   1040 <mkpalette@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xfd,%esi
mov    $0xff,%edx
mov    $0xc0,%ecx
mov    $0xbb,%r8d
mov    $0x6f,%r9d
xor    %eax,%eax
movl   $0x3f,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x1e,0x10(%rsp)
call   1030 <palettegradient@plt>
mov    -0x8(%rbp),%rdi
mov    $0xbb,%esi
mov    $0x6f,%edx
mov    $0x3f,%ecx
mov    $0xd,%r8d
mov    $0x7,%r9d
movl   $0x5,(%rsp)
movl   $0x1e,0x8(%rsp)
movl   $0x78,0x10(%rsp)
call   1030 <palettegradient@plt>
mov    -0x8(%rbp),%rdi
mov    $0xd,%esi
mov    $0x7,%edx
mov    $0x5,%ecx
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
movl   $0x78,0x8(%rsp)
movl   $0xc8,0x10(%rsp)
call   1030 <palettegradient@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mktexturepalette>:
push   %rbx
mov    $0xc9,%edi
call   1040 <mkpalette@plt>
mov    %rax,%rbx
sub    $0x8,%rsp
mov    %rax,%rdi
mov    $0xfd,%esi
mov    $0xff,%edx
mov    $0xc0,%ecx
mov    $0xbb,%r8d
mov    $0x6f,%r9d
push   $0x1e
push   $0x0
push   $0x3f
call   1030 <palettegradient@plt>
add    $0x18,%rsp
mov    %rbx,%rdi
mov    $0xbb,%esi
mov    $0x6f,%edx
mov    $0x3f,%ecx
mov    $0xd,%r8d
mov    $0x7,%r9d
push   $0x78
push   $0x1e
push   $0x5
call   1030 <palettegradient@plt>
add    $0x18,%rsp
mov    %rbx,%rdi
mov    $0xd,%esi
mov    $0x7,%edx
mov    $0x5,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0xc8
push   $0x78
push   $0x0
call   1030 <palettegradient@plt>
add    $0x20,%rsp
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.palette = type { i32 }
define %struct.palette* @mktexturepalette() {
%1 = alloca %struct.palette*
%2 = call %struct.palette* @mkpalette(i32 201)
store %struct.palette* %2, %struct.palette** %1
%3 = load %struct.palette*, %struct.palette** %1
%4 = call i32 @palettegradient(%struct.palette* %3, i32 253, i32 255, i32 192, i32 187, i32 111, i32 63, i32 0, i32 30)
%5 = load %struct.palette*, %struct.palette** %1
%6 = call i32 @palettegradient(%struct.palette* %5, i32 187, i32 111, i32 63, i32 13, i32 7, i32 5, i32 30, i32 120)
%7 = load %struct.palette*, %struct.palette** %1
%8 = call i32 @palettegradient(%struct.palette* %7, i32 13, i32 7, i32 5, i32 0, i32 0, i32 0, i32 120, i32 200)
%9 = load %struct.palette*, %struct.palette** %1
ret %struct.palette* %9
}

LLVM IR (-O2):
%struct.palette = type { i32 }
define %struct.palette* @mktexturepalette() {
%1 = tail call %struct.palette* @mkpalette(i32 201)
%2 = tail call i32 @palettegradient(%struct.palette* %1, i32 253, i32 255, i32 192, i32 187, i32 111, i32 63, i32 0, i32 30)
%3 = tail call i32 @palettegradient(%struct.palette* %1, i32 187, i32 111, i32 63, i32 13, i32 7, i32 5, i32 30, i32 120)
%4 = tail call i32 @palettegradient(%struct.palette* %1, i32 13, i32 7, i32 5, i32 0, i32 0, i32 0, i32 120, i32 200)
ret %struct.palette* %1
}