xunge/DecIR huggingface dataset:
cbuf35(f, n) { return (cbuf(f, n, 35)); }


x86 assembly (clang, -O0):
<cbuf35>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x23,%edx
mov    $0x0,%al
call   1030 <cbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf35>:
mov    $0x23,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf35(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %5, i32 %6, i32 35)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cbuf35(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 35)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ init_reg_v_patterns();
void videoL7_init() { init_reg_v_patterns(); }


x86 assembly (clang, -O0):
<videoL7_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <init_reg_v_patterns@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<videoL7_init>:
xor    %eax,%eax
jmp    1030 <init_reg_v_patterns@plt>

LLVM IR (-O0):
define void @videoL7_init() {
%1 = call i32 (...) @init_reg_v_patterns()
ret void
}

LLVM IR (-O2):
define void @videoL7_init() {
%1 = tail call i32 (...) @init_reg_v_patterns()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lcdc_memory_space_swap();
void lcddisplay_swap() { lcdc_memory_space_swap(); }


x86 assembly (clang, -O0):
<lcddisplay_swap>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <lcdc_memory_space_swap@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcddisplay_swap>:
xor    %eax,%eax
jmp    1030 <lcdc_memory_space_swap@plt>

LLVM IR (-O0):
define void @lcddisplay_swap() {
%1 = call i32 (...) @lcdc_memory_space_swap()
ret void
}

LLVM IR (-O2):
define void @lcddisplay_swap() {
%1 = tail call i32 (...) @lcdc_memory_space_swap()
ret void
}
int emit_object(void) { return 0; }


x86 assembly (clang, -O0):
<emit_object>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_object>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @emit_object() {
ret i32 0
}

LLVM IR (-O2):
define i32 @emit_object() {
ret i32 0
}
unsigned twoxbr_generic_input_fmts(void) { return (1 << 0) | (1 << 1); }


x86 assembly (clang, -O0):
<twoxbr_generic_input_fmts>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<twoxbr_generic_input_fmts>:
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @twoxbr_generic_input_fmts() {
ret i32 3
}

LLVM IR (-O2):
define i32 @twoxbr_generic_input_fmts() {
ret i32 3
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRBC_set(void) { return U_WMRCORENONE_set("U_WMRBC"); }


x86 assembly (clang, -O0):
<U_WMRBC_set>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <U_WMRCORENONE_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_WMRBC_set>:
lea    0xee9(%rip),%rdi
jmp    1030 <U_WMRCORENONE_set@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRBC\00"
define i8* @U_WMRBC_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRBC\00"
define i8* @U_WMRBC_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
void math_acos(void) {
  double d = luaL_check_number(1);
  lua_pushnumber(((acos(d)) * 180.0 / 3.14159265358979323846));
}


x86 assembly (clang, -O0):
<math_acos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <luaL_check_number@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <acos@plt>
movsd  0xea9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe95(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    $0x1,%al
call   1050 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_acos>:
push   %rax
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <luaL_check_number@plt>
cvtsi2sd %eax,%xmm0
call   1040 <acos@plt>
mulsd  0xeb2(%rip),%xmm0
divsd  0xeb2(%rip),%xmm0
mov    $0x1,%al
pop    %rcx
jmp    1050 <lua_pushnumber@plt>

LLVM IR (-O0):
define void @math_acos() {
%1 = alloca double
%2 = call i32 (i32, ...) bitcast (i32 (...)* @luaL_check_number to i32 (i32, ...)*)(i32 1)
%3 = sitofp i32 %2 to double
store double %3, double* %1
%4 = load double, double* %1
%5 = call double @acos(double %4)
%6 = fmul double %5, 1.800000e+02
%7 = fdiv double %6, 0x400921FB54442D18
%8 = call i32 (double, ...) bitcast (i32 (...)* @lua_pushnumber to i32 (double, ...)*)(double %7)
ret void
}

LLVM IR (-O2):
define void @math_acos() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @luaL_check_number to i32 (i32, ...)*)(i32 1)
%2 = sitofp i32 %1 to double
%3 = tail call double @acos(double %2)
%4 = fmul double %3, 1.800000e+02
%5 = fdiv double %4, 0x400921FB54442D18
%6 = tail call i32 (double, ...) bitcast (i32 (...)* @lua_pushnumber to i32 (double, ...)*)(double %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRBD_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


x86 assembly (clang, -O0):
<U_WMRBD_swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <U_WMRNOTIMPLEMENTED_swap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_WMRBD_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

LLVM IR (-O0):
define void @U_WMRBD_swap(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @U_WMRBD_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ printf(char *);
void sig_alarm(int signo) {
  (void)signo;
  printf("tick\n");
  alarm(5);
}


x86 assembly (clang, -O0):
<sig_alarm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1040 <alarm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_alarm>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x5,%edi
pop    %rax
jmp    1040 <alarm@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"tick\0A\00"
define void @sig_alarm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @alarm(i32 5)
ret void
}

LLVM IR (-O2):
@str = [5 x i8] c"tick\00"
define void @sig_alarm(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @alarm(i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fh_cli_cmd_set_mode(int);
void fh_cli_cmd_dft_mode() { fh_cli_cmd_set_mode((1)); }


x86 assembly (clang, -O0):
<fh_cli_cmd_dft_mode>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <fh_cli_cmd_set_mode@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fh_cli_cmd_dft_mode>:
mov    $0x1,%edi
jmp    1030 <fh_cli_cmd_set_mode@plt>

LLVM IR (-O0):
define void @fh_cli_cmd_dft_mode() {
%1 = call i32 @fh_cli_cmd_set_mode(i32 1)
ret void
}

LLVM IR (-O2):
define void @fh_cli_cmd_dft_mode() {
%1 = tail call i32 @fh_cli_cmd_set_mode(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void _delayMicroseconds(int i) { usleep(i); }


x86 assembly (clang, -O0):
<_delayMicroseconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_delayMicroseconds>:
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @_delayMicroseconds(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @usleep(i32 %3)
ret void
}

LLVM IR (-O2):
define void @_delayMicroseconds(i32 %0) {
%2 = tail call i32 @usleep(i32 %0)
ret void
}
int f7(int x, int y) {
  int s = (x < 0);
  int t = (y >= 0);
  return s != t;
}


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7>:
mov    %edi,%eax
xor    %esi,%eax
not    %eax
shr    $0x1f,%eax
ret

LLVM IR (-O0):
define i32 @f7(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 0
%9 = zext i1 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = icmp sge i32 %10, 0
%12 = zext i1 %11 to i32
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = icmp ne i32 %13, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @f7(i32 %0, i32 %1) {
%3 = xor i32 %0, %1
%4 = xor i32 %3, -1
%5 = lshr i32 %4, 31
ret i32 %5
}
/* Variables and functions */
int generic_test(char const *, char const *, int /*<<< orphan*/, int);
int /*<<< orphan*/ test_title(char *);
int test4(void) {
  const char *rd, *wr;
  rd = "solution";
  wr = "uart16550";
  test_title("Test 4. Write, small speed");
  return generic_test(rd, wr, 0, 5);
}


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecf(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xece(%rip),%rdi
call   1040 <test_title@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
mov    $0x5,%ecx
call   1030 <generic_test@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
push   %rax
lea    0xeeb(%rip),%rdi
call   1040 <test_title@plt>
lea    0xecc(%rip),%rdi
lea    0xece(%rip),%rsi
xor    %edx,%edx
mov    $0x5,%ecx
pop    %rax
jmp    1030 <generic_test@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"solution\00"
@.str.1 = [10 x i8] c"uart16550\00"
@.str.2 = [27 x i8] c"Test 4. Write, small speed\00"
define i32 @test4() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = call i32 @test_title(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = load i8*, i8** %2
%6 = call i32 @generic_test(i8* %4, i8* %5, i32 0, i32 5)
ret i32 %6
}

LLVM IR (-O2):
@.str = [9 x i8] c"solution\00"
@.str.1 = [10 x i8] c"uart16550\00"
@.str.2 = [27 x i8] c"Test 4. Write, small speed\00"
define i32 @test4() {
%1 = tail call i32 @test_title(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @generic_test(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 5)
ret i32 %2
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int offset(int, int /*<<< orphan*/, int, int);
scalar_t__ owl_escape_value(int);
int autohelperowl_attackpat69(struct pattern *patt, int transformation,
                              int move, int color, int action) {
  int a;
  (void)patt;
  (void)color;
  (void)action;
  a = offset(-2, 0, move, transformation);
  return owl_escape_value(a) > 0;
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat69>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0xfffffffe,%edi
xor    %esi,%esi
call   1040 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <owl_escape_value@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat69>:
push   %rax
mov    %esi,%ecx
mov    $0xfffffffe,%edi
xor    %esi,%esi
call   1040 <offset@plt>
mov    %eax,%edi
call   1030 <owl_escape_value@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat69(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 -2, i32 0, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %11
%19 = call i64 @owl_escape_value(i32 %18)
%20 = icmp sgt i64 %19, 0
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat69(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 -2, i32 0, i32 %2, i32 %1)
%7 = tail call i64 @owl_escape_value(i32 %6)
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int readByte(int);
int /*<<< orphan*/ writeByte(int, int);
void pullUpDnControlPiFaceSpecial(int pin, int pud) {
  uint8_t mask = 1 << pin;
  uint8_t old;
  old = readByte(0x0D);
  if (pud == 2)
    old |= mask;
  else
    old &= (~mask);
  writeByte(0x0D, old);
}


x86 assembly (clang, -O0):
<pullUpDnControlPiFaceSpecial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    $0xd,%edi
call   1030 <readByte@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    1160 <pullUpDnControlPiFaceSpecial+0x40>
mov    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    116c <pullUpDnControlPiFaceSpecial+0x4c>
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
mov    $0xd,%edi
call   1040 <writeByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pullUpDnControlPiFaceSpecial>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0xd,%edi
call   1030 <readByte@plt>
mov    %eax,%esi
bts    %ebp,%esi
btr    %ebp,%eax
cmp    $0x2,%ebx
cmovne %eax,%esi
mov    $0xd,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <writeByte@plt>

LLVM IR (-O0):
define void @pullUpDnControlPiFaceSpecial(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = shl i32 1, %7
store i32 %8, i32* %5
%9 = call i32 @readByte(i32 13)
store i32 %9, i32* %6
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 2
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = or i32 %14, %13
store i32 %15, i32* %6
br label %21
16: ; preds = %2
%17 = load i32, i32* %5
%18 = xor i32 %17, -1
%19 = load i32, i32* %6
%20 = and i32 %19, %18
store i32 %20, i32* %6
br label %21
21: ; preds = %16, %12
%22 = load i32, i32* %6
%23 = call i32 @writeByte(i32 13, i32 %22)
ret void
}

LLVM IR (-O2):
define void @pullUpDnControlPiFaceSpecial(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %0
%4 = tail call i32 @readByte(i32 13)
%5 = icmp eq i32 %1, 2
%6 = or i32 %4, %3
%7 = xor i32 %3, -1
%8 = and i32 %4, %7
%9 = select i1 %5, i32 %6, i32 %8
%10 = tail call i32 @writeByte(i32 13, i32 %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void stop_watchdog(int in_fd, int out_fd) {
  close(in_fd);
  close(out_fd);
}


x86 assembly (clang, -O0):
<stop_watchdog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_watchdog>:
push   %rbx
mov    %esi,%ebx
call   1030 <close@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>

LLVM IR (-O0):
define void @stop_watchdog(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 @close(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @close(i32 %7)
ret void
}

LLVM IR (-O2):
define void @stop_watchdog(i32 %0, i32 %1) {
%3 = tail call i32 @close(i32 %0)
%4 = tail call i32 @close(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, double);
int /*<<< orphan*/ stderr;
void min_caml_prerr_float(void *fv, double f) { fprintf(stderr, "%lf", f); }


x86 assembly (clang, -O0):
<min_caml_prerr_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
movsd  -0x10(%rbp),%xmm0
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_caml_prerr_float>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%lf\00"
define void @min_caml_prerr_float(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load i32, i32* @stderr
%6 = load double, double* %4
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %6)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%lf\00"
define void @min_caml_prerr_float(i8* nocapture readnone %0, double %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
ret void
}
/* Variables and functions */
int do_work(int, char **, char const *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  const char *name = argv[0];
  int stat;
  if (argc == 1) {
    fprintf(stderr, "Usage: %s <hex_num1> [<hex_num_2>...]\n", name);
    exit(1);
  }
  stat = do_work(argc, argv, name);
  exit(stat);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    117e <main+0x4e>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xe91(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <do_work@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    (%rsi),%rdx
cmp    $0x1,%edi
jne    1158 <main+0x28>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
call   1030 <do_work@plt>
mov    %eax,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Usage: %s <hex_num1> [<hex_num_2>...]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
store i8* %10, i8** %6
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load i32, i32* @stderr
%15 = load i8*, i8** %6
%16 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %2
%19 = load i32, i32* %4
%20 = load i8**, i8*** %5
%21 = load i8*, i8** %6
%22 = call i32 @do_work(i32 %19, i8** %20, i8* %21)
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = call i32 @exit(i32 %23)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Usage: %s <hex_num1> [<hex_num_2>...]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = load i8*, i8** %1
%4 = icmp eq i32 %0, 1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %3)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
%10 = tail call i32 @do_work(i32 %0, i8** %1, i8* %3)
%11 = tail call i32 @exit(i32 %10)
unreachable
}
void debug_isoc_submitted(struct imx21 *imx21, int frame, struct td *td) {}


x86 assembly (clang, -O0):
<debug_isoc_submitted>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug_isoc_submitted>:
ret

LLVM IR (-O0):
%struct.imx21 = type opaque
%struct.td = type opaque
define void @debug_isoc_submitted(%struct.imx21* %0, i32 %1, %struct.td* %2) {
%4 = alloca %struct.imx21*
%5 = alloca i32
%6 = alloca %struct.td*
store %struct.imx21* %0, %struct.imx21** %4
store i32 %1, i32* %5
store %struct.td* %2, %struct.td** %6
ret void
}

LLVM IR (-O2):
%struct.imx21 = type opaque
%struct.td = type opaque
define void @debug_isoc_submitted(%struct.imx21* nocapture %0, i32 %1, %struct.td* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit_1_or_2_operandsl_vartext(char *, char *);
void special_fdivrpl(void) { emit_1_or_2_operandsl_vartext("fdivrp", "fdivp"); }


x86 assembly (clang, -O0):
<special_fdivrpl>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee5(%rip),%rsi
call   1030 <emit_1_or_2_operandsl_vartext@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<special_fdivrpl>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
jmp    1030 <emit_1_or_2_operandsl_vartext@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"fdivrp\00"
@.str.1 = [6 x i8] c"fdivp\00"
define void @special_fdivrpl() {
%1 = call i32 @emit_1_or_2_operandsl_vartext(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"fdivrp\00"
@.str.1 = [6 x i8] c"fdivp\00"
define void @special_fdivrpl() {
%1 = tail call i32 @emit_1_or_2_operandsl_vartext(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void foo_1_1_1_2_2_2_2_2_2() {}


x86 assembly (clang, -O0):
<foo_1_1_1_2_2_2_2_2_2>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_1_1_1_2_2_2_2_2_2>:
ret

LLVM IR (-O0):
define void @foo_1_1_1_2_2_2_2_2_2() {
ret void
}

LLVM IR (-O2):
define void @foo_1_1_1_2_2_2_2_2_2() {
ret void
}
int HTextHeight(char *str) { return 0; }


x86 assembly (clang, -O0):
<HTextHeight>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HTextHeight>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @HTextHeight(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 0
}

LLVM IR (-O2):
define i32 @HTextHeight(i8* nocapture readnone %0) {
ret i32 0
}
double Ts_mu_fix(double s, double alpha __attribute__((unused))) { return s; }


x86 assembly (clang, -O0):
<Ts_mu_fix>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ts_mu_fix>:
ret

LLVM IR (-O0):
define double @Ts_mu_fix(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
ret double %5
}

LLVM IR (-O2):
define double @Ts_mu_fix(double returned %0, double %1) {
ret double %0
}
/* Variables and functions */
size_t c_tree_max_size();
size_t c_map_max_size(void) { return c_tree_max_size(); }


x86 assembly (clang, -O0):
<c_map_max_size>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <c_tree_max_size@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_map_max_size>:
xor    %eax,%eax
jmp    1030 <c_tree_max_size@plt>

LLVM IR (-O0):
define i64 @c_map_max_size() {
%1 = call i64 (...) @c_tree_max_size()
ret i64 %1
}

LLVM IR (-O2):
define i64 @c_map_max_size() {
%1 = tail call i64 (...) @c_tree_max_size()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, char *);
char *get_meta(char *meta_temp, char *metadta) {
  sscanf(metadta, "%*s%s", meta_temp);
  return meta_temp;
}


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

x86 assembly (clang, -O2):
<get_meta>:
push   %rbx
mov    %rsi,%rax
mov    %rdi,%rbx
lea    0xee2(%rip),%rsi
mov    %rax,%rdi
mov    %rbx,%rdx
call   1030 <sscanf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%*s%s\00"
define i8* @get_meta(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [6 x i8] c"%*s%s\00"
define i8* @get_meta(i8* returned %0, i8* nocapture %1) {
%3 = tail call i32 @sscanf(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %0
}
void ff_hevc_put_hevc_bi_qpel_h48_12_sse4() {}


x86 assembly (clang, -O0):
<ff_hevc_put_hevc_bi_qpel_h48_12_sse4>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ff_hevc_put_hevc_bi_qpel_h48_12_sse4>:
ret

LLVM IR (-O0):
define void @ff_hevc_put_hevc_bi_qpel_h48_12_sse4() {
ret void
}

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_h48_12_sse4() {
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int isUnaryOperator(char *operator) {
  if (strcmp(operator, "++") == 0 || strcmp(operator, "!") == 0) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isUnaryOperator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1150 <isUnaryOperator+0x40>
mov    -0x10(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    115c <isUnaryOperator+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1163 <isUnaryOperator+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isUnaryOperator>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1141 <isUnaryOperator+0x31>
lea    0xed7(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"++\00"
@.str.1 = [2 x i8] c"!\00"
define i32 @isUnaryOperator(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 1, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"++\00"
@.str.1 = [2 x i8] c"!\00"
define i32 @isUnaryOperator(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
struct j_state {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ i_instr_ri(struct j_state *, int, int, int,
                              int /*<<< orphan*/);
void i_sub_i(struct j_state *s, int reg, int32_t imm) {
  i_instr_ri(s, 1, 5, reg, imm);
}


x86 assembly (clang, -O0):
<i_sub_i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    $0x1,%esi
mov    $0x5,%edx
call   1030 <i_instr_ri@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_sub_i>:
mov    %edx,%r8d
mov    %esi,%ecx
mov    $0x1,%esi
mov    $0x5,%edx
jmp    1030 <i_instr_ri@plt>

LLVM IR (-O0):
%struct.j_state = type { i32 }
define void @i_sub_i(%struct.j_state* %0, i32 %1, i32 %2) {
%4 = alloca %struct.j_state*
%5 = alloca i32
%6 = alloca i32
store %struct.j_state* %0, %struct.j_state** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.j_state*, %struct.j_state** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @i_instr_ri(%struct.j_state* %7, i32 1, i32 5, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
%struct.j_state = type { i32 }
define void @i_sub_i(%struct.j_state* %0, i32 %1, i32 %2) {
%4 = tail call i32 @i_instr_ri(%struct.j_state* %0, i32 1, i32 5, i32 %1, i32 %2)
ret void
}
unsigned int gsize_get(const void *g, unsigned int pos) {
  return ((const unsigned int *)g)[pos];
}


x86 assembly (clang, -O0):
<gsize_get>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsize_get>:
mov    %esi,%eax
mov    (%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @gsize_get(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %6, i64 %8
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @gsize_get(i8* nocapture %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = zext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %3, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
scalar_t__ strlen(char *);
void arguments_print_version(void) {
  printf("%s %s\n", (strlen("Eucalyptus") ? "Eucalyptus" : "Eucalyptus"),
         "4.2.0");
}


x86 assembly (clang, -O0):
<arguments_print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xedc(%rip),%rdi
call   1030 <strlen@plt>
lea    0xed0(%rip),%rsi
cmp    $0x0,%rax
cmovne %rsi,%rsi
lea    0xeba(%rip),%rdi
lea    0xec5(%rip),%rdx
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arguments_print_version>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
lea    0xeed(%rip),%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [11 x i8] c"Eucalyptus\00"
@.str.2 = [6 x i8] c"4.2.0\00"
define void @arguments_print_version() {
%1 = call i64 @strlen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0)
%5 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [11 x i8] c"Eucalyptus\00"
@.str.2 = [6 x i8] c"4.2.0\00"
define void @arguments_print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void connectctx_deinit(struct connectctx *ctx) {}


x86 assembly (clang, -O0):
<connectctx_deinit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<connectctx_deinit>:
ret

LLVM IR (-O0):
%struct.connectctx = type opaque
define void @connectctx_deinit(%struct.connectctx* %0) {
%2 = alloca %struct.connectctx*
store %struct.connectctx* %0, %struct.connectctx** %2
ret void
}

LLVM IR (-O2):
%struct.connectctx = type opaque
define void @connectctx_deinit(%struct.connectctx* nocapture %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ serial;
};
typedef TYPE_1__ XClientMessageEvent;

/* Variables and functions */
unsigned long get_XClientMessageEvent_serial(void *_p) {
  return (unsigned long)((XClientMessageEvent *)_p)->serial;
}


x86 assembly (clang, -O0):
<get_XClientMessageEvent_serial>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_XClientMessageEvent_serial>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XClientMessageEvent_serial(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XClientMessageEvent_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
int simulated_while_shortcut_constant(int p) {
  int k = 0;
  int j = 0;
B:
  j++;
  if (k == 1 && j < 100) {
    goto B;
  }
  return k;
}


x86 assembly (clang, -O0):
<simulated_while_shortcut_constant>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1137 <simulated_while_shortcut_constant+0x37>
cmpl   $0x64,-0xc(%rbp)
jge    1137 <simulated_while_shortcut_constant+0x37>
jmp    1115 <simulated_while_shortcut_constant+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<simulated_while_shortcut_constant>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @simulated_while_shortcut_constant(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %13, %1
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
store i32 %7, i32* %4
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %14
10: ; preds = %5
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 100
br i1 %12, label %13, label %14
13: ; preds = %10
br label %5
14: ; preds = %10, %5
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @simulated_while_shortcut_constant(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strncasecmp(char *, char *, int);
void strncasecmp_diff_length_2() {
  char *x = "aBcDe";
  char *y = "abc";
  clang_analyzer_eval(strncasecmp(x, y, 5) == 1);
}


x86 assembly (clang, -O0):
<strncasecmp_diff_length_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x5,%edx
call   1030 <strncasecmp@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncasecmp_diff_length_2>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncasecmp@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"aBcDe\00"
@.str.1 = [4 x i8] c"abc\00"
define void @strncasecmp_diff_length_2() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strncasecmp(i8* %3, i8* %4, i32 5)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"aBcDe\00"
@.str.1 = [4 x i8] c"abc\00"
define void @strncasecmp_diff_length_2() {
%1 = tail call i32 @strncasecmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
void ARGBToRGBA() {}


x86 assembly (clang, -O0):
<ARGBToRGBA>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ARGBToRGBA>:
ret

LLVM IR (-O0):
define void @ARGBToRGBA() {
ret void
}

LLVM IR (-O2):
define void @ARGBToRGBA() {
ret void
}
int arch_get_reg(int usage, int indx) {
  if (usage == 0) {
    return indx;
  } else if (usage == 1) {
    return 4 + indx;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<arch_get_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111f <arch_get_reg+0x1f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113e <arch_get_reg+0x3e>
cmpl   $0x1,-0x8(%rbp)
jne    1137 <arch_get_reg+0x37>
mov    -0xc(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x4(%rbp)
jmp    113e <arch_get_reg+0x3e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_get_reg>:
mov    %esi,%eax
test   %edi,%edi
je     1114 <arch_get_reg+0x14>
cmp    $0x1,%edi
jne    110f <arch_get_reg+0xf>
add    $0x4,%eax
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @arch_get_reg(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %5
store i32 %9, i32* %3
br label %17
10: ; preds = %2
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %5
%15 = add nsw i32 4, %14
store i32 %15, i32* %3
br label %17
16: ; preds = %10
store i32 -1, i32* %3
br label %17
17: ; preds = %16, %13, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @arch_get_reg(i32 %0, i32 %1) {
switch i32 %0, label %5 [
i32 0, label %6
i32 1, label %3
]
3: ; preds = %2
%4 = add nsw i32 %1, 4
br label %6
5: ; preds = %2
br label %6
6: ; preds = %2, %5, %3
%7 = phi i32 [ %4, %3 ], [ -1, %5 ], [ %1, %2 ]
ret i32 %7
}
long int longint_ignoring_signedint(long int x, signed int y) { return x; }


x86 assembly (clang, -O0):
<longint_ignoring_signedint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<longint_ignoring_signedint>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @longint_ignoring_signedint(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @longint_ignoring_signedint(i64 returned %0, i32 %1) {
ret i64 %0
}
int intbytes(void) { return sizeof(int); }


x86 assembly (clang, -O0):
<intbytes>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intbytes>:
mov    $0x4,%eax
ret

LLVM IR (-O0):
define i32 @intbytes() {
ret i32 4
}

LLVM IR (-O2):
define i32 @intbytes() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ list_selectsettings();
void button_settings_onpress(void) { list_selectsettings(); }


x86 assembly (clang, -O0):
<button_settings_onpress>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <list_selectsettings@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<button_settings_onpress>:
xor    %eax,%eax
jmp    1030 <list_selectsettings@plt>

LLVM IR (-O0):
define void @button_settings_onpress() {
%1 = call i32 (...) @list_selectsettings()
ret void
}

LLVM IR (-O2):
define void @button_settings_onpress() {
%1 = tail call i32 (...) @list_selectsettings()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ string;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, float);
const char *myitoa_for_floats(float val, char *string) {
  snprintf(string, sizeof(string), "%f", val);
  return string;
}


x86 assembly (clang, -O0):
<myitoa_for_floats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movss  -0x4(%rbp),%xmm0
mov    $0x8,%esi
lea    0xeca(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myitoa_for_floats>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdx
mov    $0x8,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i8* @myitoa_for_floats(float %0, i8* %1) {
%3 = alloca float
%4 = alloca i8*
store float %0, float* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load float, float* %3
%7 = call i32 @snprintf(i8* %5, i32 8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %6)
%8 = load i8*, i8** %4
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i8* @myitoa_for_floats(float %0, i8* returned %1) {
%3 = tail call i32 @snprintf(i8* %1, i32 8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %0)
ret i8* %1
}
/* Variables and functions */
char *timlib_yyyymmdd_to_ora_date(char *);
char *timlib_yyyymmdd_to_oracle_format(char *s) {
  return timlib_yyyymmdd_to_ora_date(s);
}


x86 assembly (clang, -O0):
<timlib_yyyymmdd_to_oracle_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <timlib_yyyymmdd_to_ora_date@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timlib_yyyymmdd_to_oracle_format>:
jmp    1030 <timlib_yyyymmdd_to_ora_date@plt>

LLVM IR (-O0):
define i8* @timlib_yyyymmdd_to_oracle_format(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @timlib_yyyymmdd_to_ora_date(i8* %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @timlib_yyyymmdd_to_oracle_format(i8* %0) {
%2 = tail call i8* @timlib_yyyymmdd_to_ora_date(i8* %0)
ret i8* %2
}
void IWDGTimerStart(void) {
  (*((volatile unsigned long *)(0x40003000))) = 0x0000CCCC;
}


x86 assembly (clang, -O0):
<IWDGTimerStart>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40003000,%eax
movq   $0xcccc,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<IWDGTimerStart>:
movq   $0xcccc,0x40003000
ret

LLVM IR (-O0):
define void @IWDGTimerStart() {
store volatile i64 52428, i64* inttoptr (i64 1073754112 to i64*)
ret void
}

LLVM IR (-O2):
define void @IWDGTimerStart() {
store volatile i64 52428, i64* inttoptr (i64 1073754112 to i64*)
ret void
}
/* Variables and functions */
double pow(double, double);
double slrgb(double s) {
  if (s <= 0.04045)
    return s / 12.92;
  else
    return pow((s + 0.055) / 1.055, 2.4);
}


x86 assembly (clang, -O0):
<slrgb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     114b <slrgb+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  0xee3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1176 <slrgb+0x66>
movsd  0xec5(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xeb0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe9c(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slrgb>:
movsd  0xee8(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    113b <slrgb+0x2b>
addsd  0xeea(%rip),%xmm0
divsd  0xeea(%rip),%xmm0
movsd  0xeea(%rip),%xmm1
jmp    1030 <pow@plt>
divsd  0xec5(%rip),%xmm0
ret

LLVM IR (-O0):
define double @slrgb(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ole double %4, 4.045000e-02
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fdiv double %7, 1.292000e+01
store double %8, double* %2
br label %14
9: ; preds = %1
%10 = load double, double* %3
%11 = fadd double %10, 5.500000e-02
%12 = fdiv double %11, 1.055000e+00
%13 = call double @pow(double %12, double 2.400000e+00)
store double %13, double* %2
br label %14
14: ; preds = %9, %6
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @slrgb(double %0) {
%2 = fcmp ugt double %0, 4.045000e-02
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = fdiv double %0, 1.292000e+01
br label %9
5: ; preds = %1
%6 = fadd double %0, 5.500000e-02
%7 = fdiv double %6, 1.055000e+00
%8 = tail call double @pow(double %7, double 2.400000e+00)
br label %9
9: ; preds = %5, %3
%10 = phi double [ %4, %3 ], [ %8, %5 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ report(int /*<<< orphan*/, char *, char const *,
                          unsigned int);
void log_watchtab_invalid_action(const char *filename, unsigned line_no) {
  report(LOG_ERR, "Invalid action line at line %s:%u", filename, line_no);
}


x86 assembly (clang, -O0):
<log_watchtab_invalid_action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xeca(%rip),%rsi
call   1030 <report@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_watchtab_invalid_action>:
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
jmp    1030 <report@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [34 x i8] c"Invalid action line at line %s:%u\00"
define void @log_watchtab_invalid_action(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @LOG_ERR
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @report(i32 %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [34 x i8] c"Invalid action line at line %s:%u\00"
define void @log_watchtab_invalid_action(i8* %0, i32 %1) {
%3 = load i32, i32* @LOG_ERR
%4 = tail call i32 @report(i32 %3, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}