xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ lgen(char *, char *, int);
void cgldsw(int n) { lgen("%s\tax,%c%d", "mov", n); }


x86 assembly (clang, -O0):
<cgldsw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xedb(%rip),%rdi
lea    0xedf(%rip),%rsi
call   1030 <lgen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgldsw>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
lea    0xeeb(%rip),%rsi
jmp    1030 <lgen@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%s\09ax,%c%d\00"
@.str.1 = [4 x i8] c"mov\00"
define void @cgldsw(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @lgen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s\09ax,%c%d\00"
@.str.1 = [4 x i8] c"mov\00"
define void @cgldsw(i32 %0) {
%2 = tail call i32 @lgen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bsearch_my(int *, int, int);
int main() {
  int a[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  bsearch_my(a, 9, 5);
  bsearch_my(a, 9, 115);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x28,%edx
call   1030 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0x9,%esi
mov    $0x5,%edx
call   1040 <bsearch_my@plt>
lea    -0x30(%rbp),%rdi
mov    $0x9,%esi
mov    $0x73,%edx
call   1040 <bsearch_my@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xf04(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xee8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecc(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0x5,%edx
call   1030 <bsearch_my@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0x73,%edx
call   1030 <bsearch_my@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%5 = call i32 @bsearch_my(i32* %4, i32 9, i32 5)
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%7 = call i32 @bsearch_my(i32* %6, i32 9, i32 115)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @bsearch_my(i32* %3, i32 9, i32 5)
%5 = call i32 @bsearch_my(i32* %3, i32 9, i32 115)
ret i32 0
}
int test_imm_44int16_mem(short *val) {
  return ((*val) & (-0x44 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_44int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffffbc,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_44int16_mem>:
movzwl (%rdi),%eax
test   $0xffbc,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_44int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -68
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_44int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -68
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *_resposta_padrao(int, int, char *);
char *AssociarAssinatura(int sessao, char *codigo_ativacao,
                         char *composicao_cnpj, char *assinatura) {
  return _resposta_padrao(sessao, 13000, "Assinatura do AC registrada");
}


x86 assembly (clang, -O0):
<AssociarAssinatura>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x32c8,%esi
lea    0xeca(%rip),%rdx
call   1030 <_resposta_padrao@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AssociarAssinatura>:
lea    0xee9(%rip),%rdx
mov    $0x32c8,%esi
jmp    1030 <_resposta_padrao@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Assinatura do AC registrada\00"
define i8* @AssociarAssinatura(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = call i8* @_resposta_padrao(i32 %9, i32 13000, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i8* %10
}

LLVM IR (-O2):
@.str = [28 x i8] c"Assinatura do AC registrada\00"
define i8* @AssociarAssinatura(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
%5 = tail call i8* @_resposta_padrao(i32 %0, i32 13000, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ glDeleteLists(int, int);
void oth_display_free() {
  glDeleteLists(1, 1);
  glDeleteLists(2, 1);
}


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

x86 assembly (clang, -O2):
<oth_display_free>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <glDeleteLists@plt>
mov    $0x2,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <glDeleteLists@plt>

LLVM IR (-O0):
define void @oth_display_free() {
%1 = call i32 @glDeleteLists(i32 1, i32 1)
%2 = call i32 @glDeleteLists(i32 2, i32 1)
ret void
}

LLVM IR (-O2):
define void @oth_display_free() {
%1 = tail call i32 @glDeleteLists(i32 1, i32 1)
%2 = tail call i32 @glDeleteLists(i32 2, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int check_pointersize() {
  fprintf(stdout, "sizeof(long)=%ld , sizeof(void*)=%ld\n", (long)sizeof(long),
          (long)sizeof(void *));
  if (sizeof(long) < sizeof(void *)) {
    fprintf(stderr, "\n");
    fprintf(stderr, "CINT INSTALLATION FATAL ERROR :\n");
    fprintf(stderr, "        sizeof(long)=%ld < sizeof(void*)=%ld\n",
            (long)sizeof(long), (long)sizeof(void *));
    fprintf(stderr, "  SORRY, CAN NOT INSTALL CINT.\n");
    fprintf(stderr,
            "Size of long must be greater or equal to size of void*\n\n");
    exit(EXIT_FAILURE);
  }
  return (0);
}


x86 assembly (clang, -O0):
<check_pointersize>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x8,%ecx
mov    %rcx,%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_pointersize>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
mov    $0x8,%edx
mov    $0x8,%ecx
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [38 x i8] c"sizeof(long)=%ld , sizeof(void*)=%ld\0A\00"
@EXIT_FAILURE = global i32 0
@stderr = global i32 0
define i32 @check_pointersize() {
%1 = load i32, i32* @stdout
%2 = call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i64 8, i64 8)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [38 x i8] c"sizeof(long)=%ld , sizeof(void*)=%ld\0A\00"
@EXIT_FAILURE = global i32 0
@stderr = global i32 0
define i32 @check_pointersize() {
%1 = load i32, i32* @stdout
%2 = tail call i32 (i32, i8*, ...) @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i64 8, i64 8)
ret i32 0
}
void CMOS_write(char reg, char byte) {
  CMOS_sync();
  asm volatile("cli");
  outb(0x70, reg);
  outb(0x71, byte);
  asm volatile("sti");
}


x86 assembly (clang, -O0):
<CMOS_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    $0x0,%al
call   1040 <CMOS_sync@plt>
cli
movsbl -0x1(%rbp),%esi
mov    $0x70,%edi
mov    $0x0,%al
call   1030 <outb@plt>
movsbl -0x2(%rbp),%esi
mov    $0x71,%edi
mov    $0x0,%al
call   1030 <outb@plt>
sti
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CMOS_write>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <CMOS_sync@plt>
cli
mov    $0x70,%edi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <outb@plt>
mov    $0x71,%edi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <outb@plt>
sti
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @CMOS_write(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call i32 (...) @CMOS_sync()
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 112, i32 %7)
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 113, i32 %10)
ret void
}

LLVM IR (-O2):
define void @CMOS_write(i8 signext %0, i8 signext %1) {
%3 = tail call i32 (...) @CMOS_sync()
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
%4 = sext i8 %0 to i32
%5 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 112, i32 %4)
%6 = sext i8 %1 to i32
%7 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @outb to i32 (i32, i32, ...)*)(i32 113, i32 %6)
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
char *strcpy(char *dest, const char *src) {
  char *i = dest;
  char *j = (char *)src;
  while (*j) {
    *i = *j;
    i++;
    j++;
  }
  *(++i) = 0;
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <strcpy+0x52>
mov    -0x20(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111c <strcpy+0x1c>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,0x1(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
mov    %rdi,%rdx
test   %cl,%cl
je     1131 <strcpy+0x31>
add    $0x1,%rsi
mov    %rax,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %cl,(%rdx)
add    $0x1,%rdx
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1120 <strcpy+0x20>
movb   $0x0,0x1(%rdx)
ret

LLVM IR (-O0):
define i8* @strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %4
store i8* %8, i8** %6
br label %9
9: ; preds = %13, %2
%10 = load i8*, i8** %6
%11 = load i8, i8* %10
%12 = icmp ne i8 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %9
%14 = load i8*, i8** %6
%15 = load i8, i8* %14
%16 = load i8*, i8** %5
store i8 %15, i8* %16
%17 = load i8*, i8** %5
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %5
%19 = load i8*, i8** %6
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %6
br label %9
21: ; preds = %9
%22 = load i8*, i8** %5
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %5
store i8 0, i8* %23
%24 = load i8*, i8** %3
ret i8* %24
}

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %1, %2 ]
%8 = phi i8* [ %9, %5 ], [ %0, %2 ]
store i8 %6, i8* %8
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
%14 = phi i8* [ %0, %2 ], [ %9, %5 ]
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 0, i8* %15
ret i8* %0
}
void EC_KEY_free(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_KEY_free() {
ret void
}
void hostapd_deinit_wps(struct hostapd_data *hapd) {}


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

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

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

LLVM IR (-O2):
%struct.hostapd_data = type opaque
define void @hostapd_deinit_wps(%struct.hostapd_data* nocapture %0) {
ret void
}
/* Variables and functions */
double det3(double *, double *, double *);
double dot(double *, double *);
double wingangle(double x[3], double y[3], double z[3]) {
  if (det3(x, y, z) <= 0.0)
    return 1.0 - dot(x, y);
  else
    return 3.0 + dot(x, y);
}


x86 assembly (clang, -O0):
<wingangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <det3@plt>
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     117b <wingangle+0x5b>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <dot@plt>
movaps %xmm0,%xmm1
movsd  0xe9b(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    119c <wingangle+0x7c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <dot@plt>
movaps %xmm0,%xmm1
movsd  0xe6d(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wingangle>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <det3@plt>
movapd %xmm0,(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <dot@plt>
movsd  0xeb6(%rip),%xmm1
subsd  %xmm0,%xmm1
addsd  0xeb2(%rip),%xmm0
xorpd  %xmm2,%xmm2
movapd (%rsp),%xmm3
cmpnlesd %xmm2,%xmm3
andpd  %xmm3,%xmm0
andnpd %xmm1,%xmm3
orpd   %xmm3,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define double @wingangle(double* %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
%8 = load double*, double** %5
%9 = load double*, double** %6
%10 = load double*, double** %7
%11 = call double @det3(double* %8, double* %9, double* %10)
%12 = fcmp ole double %11, 0.000000e+00
br i1 %12, label %13, label %18
13: ; preds = %3
%14 = load double*, double** %5
%15 = load double*, double** %6
%16 = call double @dot(double* %14, double* %15)
%17 = fsub double 1.000000e+00, %16
store double %17, double* %4
br label %23
18: ; preds = %3
%19 = load double*, double** %5
%20 = load double*, double** %6
%21 = call double @dot(double* %19, double* %20)
%22 = fadd double 3.000000e+00, %21
store double %22, double* %4
br label %23
23: ; preds = %18, %13
%24 = load double, double* %4
ret double %24
}

LLVM IR (-O2):
define double @wingangle(double* %0, double* %1, double* %2) {
%4 = tail call double @det3(double* %0, double* %1, double* %2)
%5 = fcmp ugt double %4, 0.000000e+00
%6 = tail call double @dot(double* %0, double* %1)
%7 = fsub double 1.000000e+00, %6
%8 = fadd double %6, 3.000000e+00
%9 = select i1 %5, double %8, double %7
ret double %9
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_INTEGER;

/* Variables and functions */
int /*<<< orphan*/ ASN1_INTEGER_it;
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
ASN1_INTEGER *ASN1_INTEGER_new(void) {
  return (ASN1_INTEGER *)ASN1_item_new(&ASN1_INTEGER_it);
}


x86 assembly (clang, -O0):
<ASN1_INTEGER_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_INTEGER_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@ASN1_INTEGER_it = global i32 0
define i32* @ASN1_INTEGER_new() {
%1 = call i64 @ASN1_item_new(i32* @ASN1_INTEGER_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@ASN1_INTEGER_it = global i32 0
define i32* @ASN1_INTEGER_new() {
%1 = tail call i64 @ASN1_item_new(i32* @ASN1_INTEGER_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
long double logb(long double);
long double logbl(long double a1) { return logb(a1); }


x86 assembly (clang, -O0):
<logbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <logb@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logbl>:
jmp    1030 <logb@plt>

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

LLVM IR (-O2):
define x86_fp80 @logbl(x86_fp80 %0) {
%2 = tail call x86_fp80 @logb(x86_fp80 %0)
ret x86_fp80 %2
}
void free_argv(int argc, char **argv) {
  if (argv) {
    for (int i = 0; i < argc; i++)
      free(argv[i]);
  }
  free(argv);
}


x86 assembly (clang, -O0):
<free_argv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1161 <free_argv+0x51>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115c <free_argv+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1131 <free_argv+0x21>
jmp    1161 <free_argv+0x51>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_argv>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
test   %rsi,%rsi
je     1142 <free_argv+0x32>
test   %edi,%edi
jle    1142 <free_argv+0x32>
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_argv+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_argv(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = icmp ne i8** %6, null
br i1 %7, label %8, label %23
8: ; preds = %2
store i32 0, i32* %5
br label %9
9: ; preds = %19, %8
%10 = load i32, i32* %5
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %22
13: ; preds = %9
%14 = load i8**, i8*** %4
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %14, i64 %16
%18 = load i8*, i8** %17
br label %19
19: ; preds = %13
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %9
22: ; preds = %9
br label %23
23: ; preds = %22, %2
%24 = load i8**, i8*** %4
%25 = bitcast i8** %24 to i8*
ret void
}

LLVM IR (-O2):
define void @free_argv(i32 %0, i8** %1) {
%3 = icmp ne i8** %1, null
%4 = icmp sgt i32 %0, 0
%5 = and i1 %3, %4
br i1 %5, label %6, label %14
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %12, %8 ]
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
tail call void @free(i8* %11)
%12 = add nuw nsw i64 %9, 1
%13 = icmp eq i64 %12, %7
br i1 %13, label %14, label %8
14: ; preds = %8, %2
%15 = bitcast i8** %1 to i8*
tail call void @free(i8* %15)
ret void
}
/* Type definitions */
struct variable {
  int dummy;
};
struct pool {
  int dummy;
};
struct lexer {
  int dummy;
};
struct dictionary {
  int dummy;
};

/* Variables and functions */
int parse_variables_pool(struct lexer *, struct pool *,
                         struct dictionary const *, struct variable ***,
                         size_t *, int);
bool parse_variables_const_pool(struct lexer *l, struct pool *p,
                                const struct dictionary *d,
                                const struct variable ***v, size_t *s,
                                int opts) {
  return parse_variables_pool(l, p, d, (struct variable ***)v, s, opts);
}


x86 assembly (clang, -O0):
<parse_variables_const_pool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x2c(%rbp),%r9d
call   1030 <parse_variables_pool@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_variables_const_pool>:
jmp    1030 <parse_variables_pool@plt>

LLVM IR (-O0):
%struct.lexer = type { i32 }
%struct.pool = type { i32 }
%struct.dictionary = type { i32 }
%struct.variable = type { i32 }
define i32 @parse_variables_const_pool(%struct.lexer* %0, %struct.pool* %1, %struct.dictionary* %2, %struct.variable*** %3, i64* %4, i32 %5) {
%7 = alloca %struct.lexer*
%8 = alloca %struct.pool*
%9 = alloca %struct.dictionary*
%10 = alloca %struct.variable***
%11 = alloca i64*
%12 = alloca i32
store %struct.lexer* %0, %struct.lexer** %7
store %struct.pool* %1, %struct.pool** %8
store %struct.dictionary* %2, %struct.dictionary** %9
store %struct.variable*** %3, %struct.variable**** %10
store i64* %4, i64** %11
store i32 %5, i32* %12
%13 = load %struct.lexer*, %struct.lexer** %7
%14 = load %struct.pool*, %struct.pool** %8
%15 = load %struct.dictionary*, %struct.dictionary** %9
%16 = load %struct.variable***, %struct.variable**** %10
%17 = load i64*, i64** %11
%18 = load i32, i32* %12
%19 = call i32 @parse_variables_pool(%struct.lexer* %13, %struct.pool* %14, %struct.dictionary* %15, %struct.variable*** %16, i64* %17, i32 %18)
ret i32 %19
}

LLVM IR (-O2):
%struct.lexer = type { i32 }
%struct.pool = type { i32 }
%struct.dictionary = type { i32 }
%struct.variable = type { i32 }
define i32 @parse_variables_const_pool(%struct.lexer* %0, %struct.pool* %1, %struct.dictionary* %2, %struct.variable*** %3, i64* %4, i32 %5) {
%7 = tail call i32 @parse_variables_pool(%struct.lexer* %0, %struct.pool* %1, %struct.dictionary* %2, %struct.variable*** %3, i64* %4, i32 %5)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x2d() {
  Assert_real((isalpha(45) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              230, ("isalpha should be 0 for -"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x2d>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2d,%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xe6,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x2d>:
push   %rax
mov    $0x2d,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xe6,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for -\00"
define void @t_isalpha_0x2d() {
%1 = call i64 @isalpha(i32 45)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 230, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 0 for -\00"
define void @t_isalpha_0x2d() {
%1 = tail call i64 @isalpha(i32 45)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 230, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void mov_memoffs32_eax(unsigned int *memoffs32) {
  put8(0xA3);
  put32((unsigned int)(memoffs32));
}


x86 assembly (clang, -O0):
<mov_memoffs32_eax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xa3,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rax
mov    %eax,%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_memoffs32_eax>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa3,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @mov_memoffs32_eax(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @put8(i32 163)
%4 = load i32*, i32** %2
%5 = ptrtoint i32* %4 to i32
%6 = call i32 @put32(i32 %5)
ret void
}

LLVM IR (-O2):
define void @mov_memoffs32_eax(i32* %0) {
%2 = tail call i32 @put8(i32 163)
%3 = ptrtoint i32* %0 to i64
%4 = trunc i64 %3 to i32
%5 = tail call i32 @put32(i32 %4)
ret void
}
/* Variables and functions */
int my_atoi(char *);
int /*<<< orphan*/ printf(char *, int);
void test_atoi() {
  printf("%d\n", my_atoi("123"));
  printf("%d\n", my_atoi("-123456"));
}


x86 assembly (clang, -O0):
<test_atoi>:
push   %rbp
mov    %rsp,%rbp
lea    0xed9(%rip),%rdi
call   1030 <my_atoi@plt>
mov    %eax,%esi
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
call   1030 <my_atoi@plt>
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_atoi>:
push   %rbx
lea    0xedc(%rip),%rdi
call   1030 <my_atoi@plt>
lea    0xecc(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
call   1030 <my_atoi@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"123\00"
@.str.2 = [8 x i8] c"-123456\00"
define void @test_atoi() {
%1 = call i32 @my_atoi(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @my_atoi(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"123\00"
@.str.2 = [8 x i8] c"-123456\00"
define void @test_atoi() {
%1 = tail call i32 @my_atoi(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @my_atoi(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int mone_to_one();
scalar_t__ unknown_function();
void two_safety_conditions(int n) {
  char a[10];
  int y = mone_to_one();
  if (unknown_function()) {
    a[n] = 0;
  } else {
    a[n + y] = 0;
  }
}


x86 assembly (clang, -O0):
<two_safety_conditions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <mone_to_one@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <unknown_function@plt>
cmp    $0x0,%rax
je     1154 <two_safety_conditions+0x34>
movslq -0x4(%rbp),%rax
movb   $0x0,-0xe(%rbp,%rax,1)
jmp    1161 <two_safety_conditions+0x41>
mov    -0x4(%rbp),%eax
add    -0x14(%rbp),%eax
cltq
movb   $0x0,-0xe(%rbp,%rax,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<two_safety_conditions>:
push   %rax
xor    %eax,%eax
call   1030 <mone_to_one@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <unknown_function@plt>

LLVM IR (-O0):
define void @two_safety_conditions(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8]
%4 = alloca i32
store i32 %0, i32* %2
%5 = call i32 (...) @mone_to_one()
store i32 %5, i32* %4
%6 = call i64 (...) @unknown_function()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 %10
store i8 0, i8* %11
br label %18
12: ; preds = %1
%13 = load i32, i32* %2
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 %16
store i8 0, i8* %17
br label %18
18: ; preds = %12, %8
ret void
}

LLVM IR (-O2):
define void @two_safety_conditions(i32 %0) {
%2 = tail call i32 (...) @mone_to_one()
%3 = tail call i64 (...) @unknown_function()
ret void
}
/* Variables and functions */
char getchar();
char readchar(char letter) {
  letter = getchar();
  while (getchar() != '\n')
    ;
  return letter;
}


x86 assembly (clang, -O0):
<readchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1140 <readchar+0x30>
jmp    1128 <readchar+0x18>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readchar>:
push   %rbx
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%al
jne    1120 <readchar+0x10>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @readchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %2
br label %4
4: ; preds = %8, %1
%5 = call signext i8 (...) @getchar()
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 10
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
%10 = load i8, i8* %2
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @readchar(i8 signext %0) {
%2 = tail call signext i8 (...) @getchar()
br label %3
3: ; preds = %3, %1
%4 = tail call signext i8 (...) @getchar()
%5 = icmp eq i8 %4, 10
br i1 %5, label %6, label %3
6: ; preds = %3
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ ti2s(long);
void test_utils() {
  ti2s(0);
  ti2s(99999);
  ti2s(4294967295L);
}


x86 assembly (clang, -O0):
<test_utils>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <ti2s@plt>
mov    $0x1869f,%edi
call   1030 <ti2s@plt>
mov    $0xffffffff,%edi
call   1030 <ti2s@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_utils>:
push   %rax
xor    %edi,%edi
call   1030 <ti2s@plt>
mov    $0x1869f,%edi
call   1030 <ti2s@plt>
mov    $0xffffffff,%edi
pop    %rax
jmp    1030 <ti2s@plt>

LLVM IR (-O0):
define void @test_utils() {
%1 = call i32 @ti2s(i64 0)
%2 = call i32 @ti2s(i64 99999)
%3 = call i32 @ti2s(i64 4294967295)
ret void
}

LLVM IR (-O2):
define void @test_utils() {
%1 = tail call i32 @ti2s(i64 0)
%2 = tail call i32 @ti2s(i64 99999)
%3 = tail call i32 @ti2s(i64 4294967295)
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR87_set(void) { return U_WMRCORENONE_set("U_WMR87"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR87\00"
define i8* @U_WMR87_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_WMR87\00"
define i8* @U_WMR87_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
}
/* Type definitions */
typedef int /*<<< orphan*/ d;

/* Variables and functions */
int /*<<< orphan*/ oled_SendCommand(unsigned char *, int);
void SetContrastControlRegister(char a) {
  unsigned char d[] = {0x81, a};
  oled_SendCommand(d, sizeof(d));
}


x86 assembly (clang, -O0):
<SetContrastControlRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x81,-0x3(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x2(%rbp)
lea    -0x3(%rbp),%rdi
mov    $0x2,%esi
call   1030 <oled_SendCommand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetContrastControlRegister>:
push   %rax
movb   $0x81,0x6(%rsp)
mov    %dil,0x7(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
call   1030 <oled_SendCommand@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @SetContrastControlRegister(i8 signext %0) {
%2 = alloca i8
%3 = alloca [2 x i8]
store i8 %0, i8* %2
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 -127, i8* %4
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %2
store i8 %6, i8* %5
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%8 = call i32 @oled_SendCommand(i8* %7, i32 2)
ret void
}

LLVM IR (-O2):
define void @SetContrastControlRegister(i8 signext %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
store i8 -127, i8* %3
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
store i8 %0, i8* %4
%5 = call i32 @oled_SendCommand(i8* %3, i32 2)
ret void
}
float HMM_ToRadians(float Degrees) {
  ;
  float Result = Degrees * (3.14159265359f / 180.0f);
  return (Result);
}


x86 assembly (clang, -O0):
<HMM_ToRadians>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMM_ToRadians>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @HMM_ToRadians(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fmul float %4, 0x3F91DF46A0000000
store float %5, float* %3
%6 = load float, float* %3
ret float %6
}

LLVM IR (-O2):
define float @HMM_ToRadians(float %0) {
%2 = fmul float %0, 0x3F91DF46A0000000
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void DieWithError(char *errorMessage) {
  fprintf(stderr, "%s\n", errorMessage);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<DieWithError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<DieWithError>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @DieWithError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @DieWithError(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
unsigned char get_lower_bits(unsigned char c, int hb) {
  c <<= hb;
  c >>= hb;
  return c;
}


x86 assembly (clang, -O0):
<get_lower_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
movzbl -0x1(%rbp),%eax
shl    %cl,%eax
mov    %al,-0x1(%rbp)
mov    -0x8(%rbp),%ecx
movzbl -0x1(%rbp),%eax
sar    %cl,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_lower_bits>:
mov    %esi,%ecx
shl    %cl,%edi
movzbl %dil,%eax
shr    %cl,%eax
ret

LLVM IR (-O0):
define zeroext i8 @get_lower_bits(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8, i8* %3
%7 = zext i8 %6 to i32
%8 = shl i32 %7, %5
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i32, i32* %4
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = ashr i32 %12, %10
%14 = trunc i32 %13 to i8
store i8 %14, i8* %3
%15 = load i8, i8* %3
ret i8 %15
}

LLVM IR (-O2):
define zeroext i8 @get_lower_bits(i8 zeroext %0, i32 %1) {
%3 = zext i8 %0 to i32
%4 = shl i32 %3, %1
%5 = and i32 %4, 255
%6 = lshr i32 %5, %1
%7 = trunc i32 %6 to i8
ret i8 %7
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(char);
void ES_teclado_1() {
  char c;
  printf("Enter a value: ");
  c = getchar();
  printf("\n");
  printf("You entered: ");
  putchar(c);
  printf("\n");
  return;
}


x86 assembly (clang, -O0):
<ES_teclado_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ES_teclado_1>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
movsbl %bl,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Enter a value: \00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [14 x i8] c"You entered: \00"
define void @ES_teclado_1() {
%1 = alloca i8
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call signext i8 (...) @getchar()
store i8 %3, i8* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%6 = load i8, i8* %1
%7 = call i32 @putchar(i8 signext %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Enter a value: \00"
@.str.2 = [14 x i8] c"You entered: \00"
define void @ES_teclado_1() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call signext i8 (...) @getchar()
%3 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @putchar(i8 signext %2)
%6 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
ret void
}
__attribute__((aligned(1))) void f1(void) {}


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

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

LLVM IR (-O0):
define void @f1() align 1 {
ret void
}

LLVM IR (-O2):
define void @f1() align 1 {
ret void
}
/* Variables and functions */
scalar_t__ Random_Range(int);
float Random_Range_Float(float Max) {
  float Rand;
  Rand = (float)Random_Range(32767);
  Rand /= 32767.0F;
  return (Max * Rand);
}


x86 assembly (clang, -O0):
<Random_Range_Float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x7fff,%edi
call   1030 <Random_Range@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xec2(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Random_Range_Float>:
push   %rax
movss  %xmm0,0x4(%rsp)
mov    $0x7fff,%edi
call   1030 <Random_Range@plt>
cvtsi2ss %rax,%xmm1
divss  0xed2(%rip),%xmm1
movss  0x4(%rsp),%xmm0
mulss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @Random_Range_Float(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = call i64 @Random_Range(i32 32767)
%5 = sitofp i64 %4 to float
store float %5, float* %3
%6 = load float, float* %3
%7 = fdiv float %6, 3.276700e+04
store float %7, float* %3
%8 = load float, float* %2
%9 = load float, float* %3
%10 = fmul float %8, %9
ret float %10
}

LLVM IR (-O2):
define float @Random_Range_Float(float %0) {
%2 = tail call i64 @Random_Range(i32 32767)
%3 = sitofp i64 %2 to float
%4 = fdiv float %3, 3.276700e+04
%5 = fmul float %4, %0
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ FadeExt(int /*<<< orphan*/, int, int);
void FadeSkipNextFadeIn() { FadeExt(0, ((1 << 5) | (1 << 0)), (1 << 5)); }


x86 assembly (clang, -O0):
<FadeSkipNextFadeIn>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x21,%esi
mov    $0x20,%edx
call   1030 <FadeExt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FadeSkipNextFadeIn>:
xor    %edi,%edi
mov    $0x21,%esi
mov    $0x20,%edx
jmp    1030 <FadeExt@plt>

LLVM IR (-O0):
define void @FadeSkipNextFadeIn() {
%1 = call i32 @FadeExt(i32 0, i32 33, i32 32)
ret void
}

LLVM IR (-O2):
define void @FadeSkipNextFadeIn() {
%1 = tail call i32 @FadeExt(i32 0, i32 33, i32 32)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ __cpu_to_be16(int /*<<< orphan*/);
void set16_be(uint16_t *p, uint16_t n) { *p = __cpu_to_be16(n); }


x86 assembly (clang, -O0):
<set16_be>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <__cpu_to_be16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set16_be>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <__cpu_to_be16@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @set16_be(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @__cpu_to_be16(i32 %1)
store i32 %3, i32* %0
ret void
}
unsigned int isSpace(int s) {
  if ((((s == 0x20 || s == 0xa) || s == 0) || s == 0x9) || s == 0xd) {
    return (1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<isSpace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
je     1139 <isSpace+0x39>
cmpl   $0xa,-0x8(%rbp)
je     1139 <isSpace+0x39>
cmpl   $0x0,-0x8(%rbp)
je     1139 <isSpace+0x39>
cmpl   $0x9,-0x8(%rbp)
je     1139 <isSpace+0x39>
cmpl   $0xd,-0x8(%rbp)
jne    1145 <isSpace+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <isSpace+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSpace>:
cmp    $0x20,%edi
ja     111d <isSpace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100002601,%rdx
bt     %rcx,%rdx
jae    111d <isSpace+0x1d>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @isSpace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %3
i32 13, label %3
i32 10, label %3
i32 9, label %3
i32 0, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
int numa_max_node();
int getNumaCount() { return numa_max_node() + 1; }


x86 assembly (clang, -O0):
<getNumaCount>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <numa_max_node@plt>
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNumaCount>:
push   %rax
xor    %eax,%eax
call   1030 <numa_max_node@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getNumaCount() {
%1 = call i32 (...) @numa_max_node()
%2 = add nsw i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @getNumaCount() {
%1 = tail call i32 (...) @numa_max_node()
%2 = add nsw i32 %1, 1
ret i32 %2
}