#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*/ cleanUp(int, char **, char **);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ htmlBody();
int /*<<< orphan*/ htmlFooter();
int /*<<< orphan*/ htmlHeader(char *);
int /*<<< orphan*/ i2c_write_register(char *, int, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void reset_reg(int form_method, char **getvars, char **postvars) {
  htmlHeader("FCD	Write I2C Reg");
  htmlBody();
  printf("<p><font face=\"Tahoma\" size=\"7\">Reset Camera Module	to "
         "it's	default	\n</font></p>");
  htmlFooter();
  cleanUp(form_method, getvars, postvars);
  fflush(stdout);
  i2c_write_register("/dev/i2c-0", 0x5D, 0x0D, 1);
  i2c_write_register("/dev/i2c-0", 0x5D, 0x0D, 0);
  return;
}


x86 assembly (clang, -O0):
<reset_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xe76(%rip),%rdi
call   1080 <htmlHeader@plt>
mov    $0x0,%al
call   1050 <htmlBody@plt>
lea    0xe75(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1090 <htmlFooter@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1070 <cleanUp@plt>
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
lea    0xe95(%rip),%rdi
mov    $0x5d,%esi
mov    $0xd,%edx
mov    $0x1,%ecx
call   1030 <i2c_write_register@plt>
lea    0xe7a(%rip),%rdi
mov    $0x5d,%esi
mov    $0xd,%edx
xor    %ecx,%ecx
call   1030 <i2c_write_register@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_reg>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xe7d(%rip),%rdi
call   1080 <htmlHeader@plt>
xor    %eax,%eax
call   1050 <htmlBody@plt>
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1090 <htmlFooter@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1070 <cleanUp@plt>
mov    0x2e2a(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
lea    0xe9f(%rip),%rbx
mov    %rbx,%rdi
mov    $0x5d,%esi
mov    $0xd,%edx
mov    $0x1,%ecx
call   1030 <i2c_write_register@plt>
mov    %rbx,%rdi
mov    $0x5d,%esi
mov    $0xd,%edx
xor    %ecx,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <i2c_write_register@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"FCD\09Write I2C Reg\00"
@.str.1 = [81 x i8] c"<p><font face=\22Tahoma\22 size=\227\22>Reset Camera Module\09to it's\09default\09\0A</font></p>\00"
@stdout = global i32 0
@.str.2 = [11 x i8] c"/dev/i2c-0\00"
define void @reset_reg(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%7 = call i32 @htmlHeader(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @htmlBody()
%9 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (...) @htmlFooter()
%11 = load i32, i32* %4
%12 = load i8**, i8*** %5
%13 = load i8**, i8*** %6
%14 = call i32 @cleanUp(i32 %11, i8** %12, i8** %13)
%15 = load i32, i32* @stdout
%16 = call i32 @fflush(i32 %15)
%17 = call i32 @i2c_write_register(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 93, i32 13, i32 1)
%18 = call i32 @i2c_write_register(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 93, i32 13, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"FCD\09Write I2C Reg\00"
@.str.1 = [81 x i8] c"<p><font face=\22Tahoma\22 size=\227\22>Reset Camera Module\09to it's\09default\09\0A</font></p>\00"
@stdout = global i32 0
@.str.2 = [11 x i8] c"/dev/i2c-0\00"
define void @reset_reg(i32 %0, i8** %1, i8** %2) {
%4 = tail call i32 @htmlHeader(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @htmlBody()
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 (...) @htmlFooter()
%8 = tail call i32 @cleanUp(i32 %0, i8** %1, i8** %2)
%9 = load i32, i32* @stdout
%10 = tail call i32 @fflush(i32 %9)
%11 = tail call i32 @i2c_write_register(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 93, i32 13, i32 1)
%12 = tail call i32 @i2c_write_register(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 93, i32 13, i32 0)
ret void
}