#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*/ printf(char *, char const *);
void show_help() {
  const char *help_msg = {
      "Bonecam controller built on "
      "Mar 17 2022"
      "  "
      "08:02:07"
      "\n"
      "\n"
      "Usage: cam command <param1> <param2> ...\n"
      "\n"
      "  cam init  [w] [h] [fps]  Initialize camera\n"
      "  cam start [ip] [port]    Start streaming\n"
      "  cam stop                 Stop streaming\n"
      "  cam status               Show camera status\n"
      "\n"
      "  cam p  <azi> <ele>       Set azi and ele angles\n"
      "  cam pa <azi>             Set azi angle\n"
      "  cam pe <ele>             Set ele angle\n"
      "\n"
      "  cam r  <spa> <spe>       Set azi and ele rates\n"
      "  cam ra <sp>              Set azi rotation rate\n"
      "  cam re <sp>              Set ele rotation rate\n"
      "\n"
      "  cam m  <azi> <ele> <sp>  Move to pos. (azi,ele) at speed sp\n"
      "  cam ma <azi> <sp>        Move to azi at speed sp\n"
      "  cam me <ele> <sp>        Move to ele at speed sp\n"
      "\n"
      "Get/set image options. Use 'r' to reset (e.g. br, cr, ...):\n"
      "  cam b [val]              Brightness 0..255 (128)\n"
      "  cam c [val]              Contrast   0..255 (128)\n"
      "  cam s [val]              Saturation 0..255 (128)\n"
      "  cam h [val]              Sharpness  0..255 (128)\n"
      "  cam o [0|1]              Backlight compensation {0,1} (0)\n"
      "  cam l [val]              Power line freq. 0..2 (1 ~ 50Hz)\n"
      "  cam g [val]              Gain       0..255 (0)\n"
      "  cam x [0|1]              Exposure auto priority {0,1} (1)\n"
      "\n"
      "Following commands can be set to 'auto' using val=-1:\n"
      "  cam w [val]              White balance 2000..6500 (4000)\n"
      "  cam f [val]              Focus 0..250 (0)\n"
      "  cam e [val]              Exposure 3..2047 (250)\n"
      "\n"
      "Digital zoom, pan and tilt:\n"
      "  cam z  [val]             Zoom 100 ... 500 (100)\n"
      "  cam zp [val]             Pan  -10 ... +10  (0)\n"
      "  cam zt [val]             Tilt -10 ... +10  (0)\n"
      "  cam zr                   Reset digital zoom, pan and tilt\n"
      "\n"
      "Misc video options:\n"
      "  cam v                    Video options\n"
      "  cam vs <width> <height>  Set video frame size\n"
      "  cam vr <fps>             Set video frame rate for fps.\n"};
  printf("%s\n", help_msg);
}


x86 assembly (clang, -O0):
<show_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x15f0(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_help>:
lea    0x1607(%rip),%rdi
lea    0xee2(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [1822 x i8] c"Bonecam controller built on Mar 17 2022 08:02:07\0A\0AUsage: cam command <param1> <param2> ...\0A\0A cam init [w] [h] [fps] Initialize camera\0A cam start [ip] [port] Start streaming\0A cam stop Stop streaming\0A cam status Show camera status\0A\0A cam p <azi> <ele> Set azi and ele angles\0A cam pa <azi> Set azi angle\0A cam pe <ele> Set ele angle\0A\0A cam r <spa> <spe> Set azi and ele rates\0A cam ra <sp> Set azi rotation rate\0A cam re <sp> Set ele rotation rate\0A\0A cam m <azi> <ele> <sp> Move to pos. (azi,ele) at speed sp\0A cam ma <azi> <sp> Move to azi at speed sp\0A cam me <ele> <sp> Move to ele at speed sp\0A\0AGet/set image options. Use 'r' to reset (e.g. br, cr, ...):\0A cam b [val] Brightness 0..255 (128)\0A cam c [val] Contrast 0..255 (128)\0A cam s [val] Saturation 0..255 (128)\0A cam h [val] Sharpness 0..255 (128)\0A cam o [0|1] Backlight compensation {0,1} (0)\0A cam l [val] Power line freq. 0..2 (1 ~ 50Hz)\0A cam g [val] Gain 0..255 (0)\0A cam x [0|1] Exposure auto priority {0,1} (1)\0A\0AFollowing commands can be set to 'auto' using val=-1:\0A cam w [val] White balance 2000..6500 (4000)\0A cam f [val] Focus 0..250 (0)\0A cam e [val] Exposure 3..2047 (250)\0A\0ADigital zoom, pan and tilt:\0A cam z [val] Zoom 100 ... 500 (100)\0A cam zp [val] Pan -10 ... +10 (0)\0A cam zt [val] Tilt -10 ... +10 (0)\0A cam zr Reset digital zoom, pan and tilt\0A\0AMisc video options:\0A cam v Video options\0A cam vs <width> <height> Set video frame size\0A cam vr <fps> Set video frame rate for fps.\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @show_help() {
%1 = alloca i8*
store i8* getelementptr inbounds ([1822 x i8], [1822 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [1822 x i8] c"Bonecam controller built on Mar 17 2022 08:02:07\0A\0AUsage: cam command <param1> <param2> ...\0A\0A cam init [w] [h] [fps] Initialize camera\0A cam start [ip] [port] Start streaming\0A cam stop Stop streaming\0A cam status Show camera status\0A\0A cam p <azi> <ele> Set azi and ele angles\0A cam pa <azi> Set azi angle\0A cam pe <ele> Set ele angle\0A\0A cam r <spa> <spe> Set azi and ele rates\0A cam ra <sp> Set azi rotation rate\0A cam re <sp> Set ele rotation rate\0A\0A cam m <azi> <ele> <sp> Move to pos. (azi,ele) at speed sp\0A cam ma <azi> <sp> Move to azi at speed sp\0A cam me <ele> <sp> Move to ele at speed sp\0A\0AGet/set image options. Use 'r' to reset (e.g. br, cr, ...):\0A cam b [val] Brightness 0..255 (128)\0A cam c [val] Contrast 0..255 (128)\0A cam s [val] Saturation 0..255 (128)\0A cam h [val] Sharpness 0..255 (128)\0A cam o [0|1] Backlight compensation {0,1} (0)\0A cam l [val] Power line freq. 0..2 (1 ~ 50Hz)\0A cam g [val] Gain 0..255 (0)\0A cam x [0|1] Exposure auto priority {0,1} (1)\0A\0AFollowing commands can be set to 'auto' using val=-1:\0A cam w [val] White balance 2000..6500 (4000)\0A cam f [val] Focus 0..250 (0)\0A cam e [val] Exposure 3..2047 (250)\0A\0ADigital zoom, pan and tilt:\0A cam z [val] Zoom 100 ... 500 (100)\0A cam zp [val] Pan -10 ... +10 (0)\0A cam zt [val] Tilt -10 ... +10 (0)\0A cam zr Reset digital zoom, pan and tilt\0A\0AMisc video options:\0A cam v Video options\0A cam vs <width> <height> Set video frame size\0A cam vr <fps> Set video frame rate for fps.\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @show_help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1822 x i8], [1822 x i8]* @.str, i64 0, i64 0))
ret void
}