xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xb1() {
  Assert_real((iscntrl(177) == 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_iscntrl.c",
              890, ("iscntrl should be 0 for 0xb1"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xb1>:
push   %rax
mov    $0xb1,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x37a,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xb1\00"
define void @t_iscntrl_0xb1() {
%1 = call i64 @iscntrl(i32 177)
%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 890, i8* getelementptr inbounds ([29 x i8], [29 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xb1\00"
define void @t_iscntrl_0xb1() {
%1 = tail call i64 @iscntrl(i32 177)
%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 890, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void writel(unsigned int val, volatile void *addr) {
  asm volatile("mov"
               "l"
               " %0,%1"
               :
               : "r"(val), "m"(*(volatile unsigned int *)addr)
               : "memory");
}


x86 assembly (clang, -O0):
<writel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %eax,(%rcx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<writel>:
mov    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define void @writel(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i32*
tail call void asm sideeffect "movl $0,$1", "r,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i32 %0, i32* elementtype(i32) %3)
ret void
}
void wifi_rsp_flash_ps_defrag(
    const struct wifi_msg_flash_ps_defrag_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_flash_ps_defrag_rsp_t = type opaque
define void @wifi_rsp_flash_ps_defrag(%struct.wifi_msg_flash_ps_defrag_rsp_t* nocapture %0) {
ret void
}
int test_imm_A1int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xA1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A1int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xa1,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A1int64_highword_mem>:
testb  $0xa1,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A1int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 161
%7 = icmp ne i64 %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_A1int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 691489734656
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help(void) { printf("    There are no options for i2s audio.\n"); }


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

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

LLVM IR (-O0):
@.str = [41 x i8] c" There are no options for i2s audio.\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [40 x i8] c" There are no options for i2s audio.\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ indirect();
void indirect1(void) { indirect(); }


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

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

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

LLVM IR (-O2):
define void @indirect1() {
%1 = tail call i32 (...) @indirect()
ret void
}
void circle(unsigned n, double t, double *Y, double *p, double *f) {
  f[0] = -Y[1];
  f[1] = Y[0];
}


x86 assembly (clang, -O0):
<circle>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<circle>:
movsd  0x8(%rsi),%xmm0
xorps  0xef4(%rip),%xmm0
movlps %xmm0,(%rcx)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x8(%rcx)
ret

LLVM IR (-O0):
define void @circle(i32 %0, double %1, double* %2, double* %3, double* %4) {
%6 = alloca i32
%7 = alloca double
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
store i32 %0, i32* %6
store double %1, double* %7
store double* %2, double** %8
store double* %3, double** %9
store double* %4, double** %10
%11 = load double*, double** %8
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = fneg double %13
%15 = load double*, double** %10
%16 = getelementptr inbounds double, double* %15, i64 0
store double %14, double* %16
%17 = load double*, double** %8
%18 = getelementptr inbounds double, double* %17, i64 0
%19 = load double, double* %18
%20 = load double*, double** %10
%21 = getelementptr inbounds double, double* %20, i64 1
store double %19, double* %21
ret void
}

LLVM IR (-O2):
define void @circle(i32 %0, double %1, double* nocapture %2, double* nocapture readnone %3, double* nocapture writeonly %4) {
%6 = getelementptr inbounds double, double* %2, i64 1
%7 = load double, double* %6
%8 = fneg double %7
store double %8, double* %4
%9 = load double, double* %2
%10 = getelementptr inbounds double, double* %4, i64 1
store double %9, double* %10
ret void
}
/* Type definitions */
struct usb_endpoint_descriptor {
  int dummy;
};

/* Variables and functions */
scalar_t__ usb_endpoint_dir_out(struct usb_endpoint_descriptor const *);
scalar_t__ usb_endpoint_xfer_bulk(struct usb_endpoint_descriptor const *);
int usb_endpoint_is_bulk_out(const struct usb_endpoint_descriptor *epd) {
  return (usb_endpoint_xfer_bulk(epd) && usb_endpoint_dir_out(epd));
}


x86 assembly (clang, -O0):
<usb_endpoint_is_bulk_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <usb_endpoint_xfer_bulk@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     115a <usb_endpoint_is_bulk_out+0x3a>
mov    -0x8(%rbp),%rdi
call   1030 <usb_endpoint_dir_out@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usb_endpoint_is_bulk_out>:
push   %rbx
mov    %rdi,%rbx
call   1040 <usb_endpoint_xfer_bulk@plt>
test   %rax,%rax
je     1143 <usb_endpoint_is_bulk_out+0x23>
mov    %rbx,%rdi
call   1030 <usb_endpoint_dir_out@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.usb_endpoint_descriptor = type { i32 }
define i32 @usb_endpoint_is_bulk_out(%struct.usb_endpoint_descriptor* %0) {
%2 = alloca %struct.usb_endpoint_descriptor*
store %struct.usb_endpoint_descriptor* %0, %struct.usb_endpoint_descriptor** %2
%3 = load %struct.usb_endpoint_descriptor*, %struct.usb_endpoint_descriptor** %2
%4 = call i64 @usb_endpoint_xfer_bulk(%struct.usb_endpoint_descriptor* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load %struct.usb_endpoint_descriptor*, %struct.usb_endpoint_descriptor** %2
%8 = call i64 @usb_endpoint_dir_out(%struct.usb_endpoint_descriptor* %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct.usb_endpoint_descriptor = type { i32 }
define i32 @usb_endpoint_is_bulk_out(%struct.usb_endpoint_descriptor* %0) {
%2 = tail call i64 @usb_endpoint_xfer_bulk(%struct.usb_endpoint_descriptor* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @usb_endpoint_dir_out(%struct.usb_endpoint_descriptor* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int perl_init();
int module_perl_init(void) { return perl_init(); }


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

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

LLVM IR (-O0):
define i32 @module_perl_init() {
%1 = call i32 (...) @perl_init()
ret i32 %1
}

LLVM IR (-O2):
define i32 @module_perl_init() {
%1 = tail call i32 (...) @perl_init()
ret i32 %1
}
void test_abort(void) {
  subtest_start_specific(__FUNCTION__);
  subtest_finish_specific(__FUNCTION__);
}


x86 assembly (clang, -O0):
<test_abort>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <subtest_start_specific@plt>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1040 <subtest_finish_specific@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_abort>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <subtest_start_specific@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <subtest_finish_specific@plt>

LLVM IR (-O0):
@__FUNCTION__.test_abort = [11 x i8] c"test_abort\00"
define void @test_abort() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @subtest_start_specific to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.test_abort, i64 0, i64 0))
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @subtest_finish_specific to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.test_abort, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.test_abort = [11 x i8] c"test_abort\00"
define void @test_abort() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @subtest_start_specific to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.test_abort, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @subtest_finish_specific to i32 (i8*, ...)*)(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__FUNCTION__.test_abort, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ two(int);
void one(int i) {
  int k, j;
  two(i);
  switch (i) {
  case 1:
    k = 10;
    break;
  case 2:
    k = 44;
    break;
  case 3:
    k = 55;
    break;
  default:
    k = 10;
  }
  j = 1;
  j = 2;
  j = 3;
}


x86 assembly (clang, -O0):
<one>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <two@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     1159 <one+0x49>
jmp    1137 <one+0x27>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     1165 <one+0x55>
jmp    1148 <one+0x38>
mov    -0x10(%rbp),%eax
sub    $0x3,%eax
je     1171 <one+0x61>
jmp    117d <one+0x6d>
movl   $0xa,-0x8(%rbp)
jmp    1184 <one+0x74>
movl   $0x2c,-0x8(%rbp)
jmp    1184 <one+0x74>
movl   $0x37,-0x8(%rbp)
jmp    1184 <one+0x74>
movl   $0xa,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0xc(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<one>:
jmp    1030 <two@plt>

LLVM IR (-O0):
define void @one(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @two(i32 %5)
%7 = load i32, i32* %2
switch i32 %7, label %11 [
i32 1, label %8
i32 2, label %9
i32 3, label %10
]
8: ; preds = %1
store i32 10, i32* %3
br label %12
9: ; preds = %1
store i32 44, i32* %3
br label %12
10: ; preds = %1
store i32 55, i32* %3
br label %12
11: ; preds = %1
store i32 10, i32* %3
br label %12
12: ; preds = %11, %10, %9, %8
store i32 1, i32* %4
store i32 2, i32* %4
store i32 3, i32* %4
ret void
}

LLVM IR (-O2):
define void @one(i32 %0) {
%2 = tail call i32 @two(i32 %0)
ret void
}
/* Type definitions */
struct RecordList {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct RecordList *);
void RecordList_free(struct RecordList **ppRecords) {
  struct RecordList *pRecords;
  if (ppRecords == NULL) {
    return;
  }
  pRecords = *ppRecords;
  if (pRecords == NULL) {
    return;
  }
  free(pRecords);
  *ppRecords = NULL;
}


x86 assembly (clang, -O0):
<RecordList_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <RecordList_free+0x1c>
jmp    115b <RecordList_free+0x4b>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1147 <RecordList_free+0x37>
jmp    115b <RecordList_free+0x4b>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RecordList_free>:
push   %rbx
test   %rdi,%rdi
je     112d <RecordList_free+0x1d>
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     112d <RecordList_free+0x1d>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
%struct.RecordList = type { i32 }
define void @RecordList_free(%struct.RecordList** %0) {
%2 = alloca %struct.RecordList**
%3 = alloca %struct.RecordList*
store %struct.RecordList** %0, %struct.RecordList*** %2
%4 = load %struct.RecordList**, %struct.RecordList*** %2
%5 = icmp eq %struct.RecordList** %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
br label %17
7: ; preds = %1
%8 = load %struct.RecordList**, %struct.RecordList*** %2
%9 = load %struct.RecordList*, %struct.RecordList** %8
store %struct.RecordList* %9, %struct.RecordList** %3
%10 = load %struct.RecordList*, %struct.RecordList** %3
%11 = icmp eq %struct.RecordList* %10, null
br i1 %11, label %12, label %13
12: ; preds = %7
br label %17
13: ; preds = %7
%14 = load %struct.RecordList*, %struct.RecordList** %3
%15 = call i32 @free(%struct.RecordList* %14)
%16 = load %struct.RecordList**, %struct.RecordList*** %2
store %struct.RecordList* null, %struct.RecordList** %16
br label %17
17: ; preds = %13, %12, %6
ret void
}

LLVM IR (-O2):
%struct.RecordList = type { i32 }
define void @RecordList_free(%struct.RecordList** %0) {
%2 = icmp eq %struct.RecordList** %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load %struct.RecordList*, %struct.RecordList** %0
%5 = icmp eq %struct.RecordList* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @free(%struct.RecordList* %4)
store %struct.RecordList* null, %struct.RecordList** %0
br label %8
8: ; preds = %3, %1, %6
ret void
}
void setupLdrSystem() {}


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

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

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

LLVM IR (-O2):
define void @setupLdrSystem() {
ret void
}
/* Variables and functions */
long double atanl(long double);
long double libm_atanl(long double x) { return atanl(x); }


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

x86 assembly (clang, -O2):
<libm_atanl>:
jmp    1030 <atanl@plt>

LLVM IR (-O0):
define x86_fp80 @libm_atanl(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 @atanl(x86_fp80 %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @libm_atanl(x86_fp80 %0) {
%2 = tail call x86_fp80 @atanl(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int strv_push_prepend(char ***, char *);
int strv_consume_prepend(char ***l, char *value) {
  int r;
  r = strv_push_prepend(l, value);
  if (r < 0)
    free(value);
  return r;
}


x86 assembly (clang, -O0):
<strv_consume_prepend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strv_push_prepend@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1153 <strv_consume_prepend+0x33>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strv_consume_prepend>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <strv_push_prepend@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    1139 <strv_consume_prepend+0x19>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @strv_consume_prepend(i8*** %0, i8* %1) {
%3 = tail call i32 @strv_push_prepend(i8*** %0, i8* %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @free(i8* %1)
br label %7
7: ; preds = %5, %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ chtype;
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int ERR;
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/ *, int, int);
int /*<<< orphan*/ getyx(int /*<<< orphan*/ *, int, int);
int waddch(int /*<<< orphan*/ *, int /*<<< orphan*/ const);
int waddch_nowrap(WINDOW *win, const chtype ch) {
  int y, x, maxy, maxx;
  getmaxyx(win, maxy, maxx);
  getyx(win, y, x);
  if (x >= (maxx - 1))
    return ERR;
  return waddch(win, ch);
}


x86 assembly (clang, -O0):
<waddch_nowrap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
call   1050 <getmaxyx@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1040 <getyx@plt>
mov    -0x1c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jl     117f <waddch_nowrap+0x4f>
mov    0x2e73(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    118e <waddch_nowrap+0x5e>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <waddch@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waddch_nowrap>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1050 <getmaxyx@plt>
mov    %rbx,%rdi
call   1040 <getyx@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <waddch@plt>

LLVM IR (-O0):
@ERR = global i32 0
define i32 @waddch_nowrap(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%10 = load i32*, i32** %4
%11 = load i32, i32* %8
%12 = load i32, i32* %9
%13 = call i32 @getmaxyx(i32* %10, i32 %11, i32 %12)
%14 = load i32*, i32** %4
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = call i32 @getyx(i32* %14, i32 %15, i32 %16)
%18 = load i32, i32* %7
%19 = load i32, i32* %9
%20 = sub nsw i32 %19, 1
%21 = icmp sge i32 %18, %20
br i1 %21, label %22, label %24
22: ; preds = %2
%23 = load i32, i32* @ERR
store i32 %23, i32* %3
br label %28
24: ; preds = %2
%25 = load i32*, i32** %4
%26 = load i32, i32* %5
%27 = call i32 @waddch(i32* %25, i32 %26)
store i32 %27, i32* %3
br label %28
28: ; preds = %24, %22
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
@ERR = global i32 0
define i32 @waddch_nowrap(i32* %0, i32 %1) {
%3 = tail call i32 @getmaxyx(i32* %0, i32 undef, i32 undef)
%4 = tail call i32 @getyx(i32* %0, i32 undef, i32 undef)
%5 = tail call i32 @waddch(i32* %0, i32 %1)
ret i32 %5
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int rotate_r(int, int);
uint64_t s1(uint64_t b) { return rotate_r(b, 19) ^ rotate_r(b, 61) ^ b >> 6; }


x86 assembly (clang, -O0):
<s1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x13,%esi
call   1030 <rotate_r@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x3d,%esi
call   1030 <rotate_r@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x6,%ecx
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s1>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x13,%esi
call   1030 <rotate_r@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x3d,%esi
call   1030 <rotate_r@plt>
sar    $0x6,%ebx
xor    %ebp,%ebx
xor    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @s1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rotate_r(i32 %3, i32 19)
%5 = load i32, i32* %2
%6 = call i32 @rotate_r(i32 %5, i32 61)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 6
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @s1(i32 %0) {
%2 = tail call i32 @rotate_r(i32 %0, i32 19)
%3 = tail call i32 @rotate_r(i32 %0, i32 61)
%4 = ashr i32 %0, 6
%5 = xor i32 %2, %4
%6 = xor i32 %5, %3
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ ulong;

/* Variables and functions */
void movePtrBySize(ulong **pnew, ulong size) {
  char *tmp = (char *)*pnew;
  tmp += size;
  *pnew = (ulong *)tmp;
}


x86 assembly (clang, -O0):
<movePtrBySize>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<movePtrBySize>:
movslq %esi,%rax
add    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @movePtrBySize(i32** %0, i32 %1) {
%3 = alloca i32**
%4 = alloca i32
%5 = alloca i8*
store i32** %0, i32*** %3
store i32 %1, i32* %4
%6 = load i32**, i32*** %3
%7 = load i32*, i32** %6
%8 = bitcast i32* %7 to i8*
store i8* %8, i8** %5
%9 = load i32, i32* %4
%10 = load i8*, i8** %5
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds i8, i8* %10, i64 %11
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = bitcast i8* %13 to i32*
%15 = load i32**, i32*** %3
store i32* %14, i32** %15
ret void
}

LLVM IR (-O2):
define void @movePtrBySize(i32** nocapture %0, i32 %1) {
%3 = bitcast i32** %0 to i8**
%4 = load i8*, i8** %3
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i8, i8* %4, i64 %5
store i8* %6, i8** %3
ret void
}
double floor(double num) { return (double)(int)(num); }


x86 assembly (clang, -O0):
<floor>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floor>:
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @floor(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fptosi double %3 to i32
%5 = sitofp i32 %4 to double
ret double %5
}

LLVM IR (-O2):
define double @floor(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
ret double %3
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int /*<<< orphan*/ S_ISDIR(int /*<<< orphan*/);
int errno;
int stat(char const *, struct stat *);
int path_is_dir(const char *path) {
  struct stat st;
  int ret;
  ret = stat(path, &st);
  if (ret < 0)
    return -errno;
  return !!S_ISDIR(st.st_mode);
}


x86 assembly (clang, -O0):
<path_is_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1159 <path_is_dir+0x39>
xor    %eax,%eax
mov    0x2e91(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1173 <path_is_dir+0x53>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_is_dir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
test   %eax,%eax
js     1140 <path_is_dir+0x20>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
pop    %rcx
ret
mov    0x2e99(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@errno = global i32 0
define i32 @path_is_dir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @stat(i8* %6, %struct.stat* %4)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i32, i32* @errno
%12 = sub nsw i32 0, %11
store i32 %12, i32* %2
br label %21
13: ; preds = %1
%14 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%15 = load i32, i32* %14
%16 = call i32 @S_ISDIR(i32 %15)
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = xor i1 %18, true
%20 = zext i1 %19 to i32
store i32 %20, i32* %2
br label %21
21: ; preds = %13, %10
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@errno = global i32 0
define i32 @path_is_dir(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @errno
%8 = sub nsw i32 0, %7
br label %15
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%11 = load i32, i32* %10
%12 = tail call i32 @S_ISDIR(i32 %11)
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %9, %6
%16 = phi i32 [ %8, %6 ], [ %14, %9 ]
ret i32 %16
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ bswap_32(int /*<<< orphan*/);
uint32_t big32(uint32_t n) { return bswap_32(n); }


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

x86 assembly (clang, -O2):
<big32>:
jmp    1030 <bswap_32@plt>

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

LLVM IR (-O2):
define i32 @big32(i32 %0) {
%2 = tail call i32 @bswap_32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int japi_menu(int, char *);
int j_menu(int arg0, char *arg1) { return (japi_menu(arg0, arg1)); }


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

x86 assembly (clang, -O2):
<j_menu>:
jmp    1030 <japi_menu@plt>

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

LLVM IR (-O2):
define i32 @j_menu(i32 %0, i8* %1) {
%3 = tail call i32 @japi_menu(i32 %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
main() {
  printf("unknown\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"unknown\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [8 x i8] c"unknown\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int of_device_is_available(const struct device_node *device) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.device_node = type opaque
define i32 @of_device_is_available(%struct.device_node* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, unsigned int);
void f3(int size) {
  char src[12] = "helloworld";
  char dest[12];
  if (size < 0)
    memmove(dest, src, (unsigned)size);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1149 <f3+0x39>
lea    -0x1c(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
call   1030 <memmove@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
sub    $0x18,%rsp
movabs $0x726f776f6c6c6568,%rax
77 6f 72
mov    %rax,(%rsp)
movl   $0x646c,0x8(%rsp)
test   %edi,%edi
js     1133 <f3+0x23>
add    $0x18,%rsp
ret
mov    %edi,%edx
lea    0xc(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <memmove@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.f3.src = [12 x i8] c"helloworld\00\00"
define void @f3(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i8]
%4 = alloca [12 x i8]
store i32 %0, i32* %2
%5 = bitcast [12 x i8]* %3 to i8*
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%11 = load i32, i32* %2
%12 = call i32 @memmove(i8* %9, i8* %10, i32 %11)
br label %13
13: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@__const.f3.src = [12 x i8] c"helloworld\00\00"
define void @f3(i32 %0) {
%2 = alloca [12 x i8]
%3 = alloca [12 x i8]
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%6 = icmp slt i32 %0, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @memmove(i8* %5, i8* %4, i32 %0)
br label %9
9: ; preds = %7, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ double64_le_write(double, unsigned char *);
void bd2d_write(double *buffer, int count) {
  while (--count >= 0) {
    double64_le_write(buffer[count], (unsigned char *)(buffer + count));
  };
}


x86 assembly (clang, -O0):
<bd2d_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jl     1157 <bd2d_write+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <double64_le_write@plt>
jmp    111f <bd2d_write+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bd2d_write>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    114c <bd2d_write+0x3c>
mov    %rdi,%r14
mov    %esi,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x2(%rbx),%eax
lea    (%r14,%rax,8),%rdi
movsd  (%r14,%rax,8),%xmm0
call   1030 <double64_le_write@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1130 <bd2d_write+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @bd2d_write(double* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = and i64 %8, 4294967295
%10 = getelementptr inbounds double, double* %0, i64 %9
%11 = load double, double* %10
%12 = bitcast double* %10 to i8*
%13 = tail call i32 @double64_le_write(double %11, i8* %12)
%14 = icmp ugt i64 %7, 1
br i1 %14, label %6, label %15
15: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse_domain(char *);
int main() {
  char a[] = "www.mi.com";
  reverse_domain(a);
  printf("%s", a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xb(%rbp)
mov    0xece(%rip),%ax
mov    %ax,-0x3(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0xb(%rbp),%rdi
call   1040 <reverse_domain@plt>
lea    -0xb(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x632e696d2e777777,%rax
69 2e 63
mov    %rax,(%rsp)
movl   $0x6d6f63,0x7(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <reverse_domain@plt>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [11 x i8] c"www.mi.com\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = bitcast [11 x i8]* %1 to i8*
%3 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%4 = call i32 @reverse_domain(i8* %3)
%5 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [11 x i8] c"www.mi.com\00"
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%3 = call i32 @reverse_domain(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ xtrace_setup_bsd();
int /*<<< orphan*/ xtrace_setup_mach();
__attribute__((constructor)) void xtrace_setup() {
  xtrace_setup_mach();
  xtrace_setup_bsd();
}


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @xtrace_setup, i8* null }]
define void @xtrace_setup() {
%1 = call i32 (...) @xtrace_setup_mach()
%2 = call i32 (...) @xtrace_setup_bsd()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @xtrace_setup, i8* null }]
define void @xtrace_setup() {
%1 = tail call i32 (...) @xtrace_setup_mach()
%2 = tail call i32 (...) @xtrace_setup_bsd()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ fwriteStr(int /*<<< orphan*/, char const *);
void writeStr(const char *s) { fwriteStr(STDOUT_FILENO, s); }


x86 assembly (clang, -O0):
<writeStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <fwriteStr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeStr>:
mov    %rdi,%rsi
mov    0x2ed6(%rip),%rax
mov    (%rax),%edi
jmp    1030 <fwriteStr@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define void @writeStr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @STDOUT_FILENO
%4 = load i8*, i8** %2
%5 = call i32 @fwriteStr(i32 %3, i8* %4)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define void @writeStr(i8* %0) {
%2 = load i32, i32* @STDOUT_FILENO
%3 = tail call i32 @fwriteStr(i32 %2, i8* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t hidpp_get_unaligned_be_u16(uint8_t *buf) {
  return (buf[0] << 8) | buf[1];
}


x86 assembly (clang, -O0):
<hidpp_get_unaligned_be_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x4(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hidpp_get_unaligned_be_u16>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @hidpp_get_unaligned_be_u16(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @hidpp_get_unaligned_be_u16(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ flatuicolorsdataToTakeawaycolors();
int main(void) {
  flatuicolorsdataToTakeawaycolors();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <flatuicolorsdataToTakeawaycolors@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <flatuicolorsdataToTakeawaycolors@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @flatuicolorsdataToTakeawaycolors()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @flatuicolorsdataToTakeawaycolors()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int count;
  puts("Please enter a number: ");
  scanf("%d", &count);
  printf("The number is %d \n", count);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%esi
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Please enter a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"The number is %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Please enter a number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"The number is %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
int do_342() { return 342; }


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

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

LLVM IR (-O0):
define i32 @do_342() {
ret i32 342
}

LLVM IR (-O2):
define i32 @do_342() {
ret i32 342
}
/* Variables and functions */
int /*<<< orphan*/ left_motor(int);
int /*<<< orphan*/ right_motor(int);
void turn_forward(int speed) {
  left_motor(speed);
  right_motor(speed);
}


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

x86 assembly (clang, -O2):
<turn_forward>:
push   %rbx
mov    %edi,%ebx
call   1030 <left_motor@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <right_motor@plt>

LLVM IR (-O0):
define void @turn_forward(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @left_motor(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @right_motor(i32 %5)
ret void
}

LLVM IR (-O2):
define void @turn_forward(i32 %0) {
%2 = tail call i32 @left_motor(i32 %0)
%3 = tail call i32 @right_motor(i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ rollDie(int, int);
int damageRoll(int dmg_cnt, int dmg_rnd) {
  int i;
  int sum;
  sum = 0;
  for (i = 0; i < dmg_cnt; i++) {
    sum += rollDie(1, dmg_rnd);
  }
  return sum;
}


x86 assembly (clang, -O0):
<damageRoll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1160 <damageRoll+0x50>
mov    -0x8(%rbp),%esi
mov    $0x1,%edi
call   1030 <rollDie@plt>
mov    %rax,%rcx
movslq -0x10(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112c <damageRoll+0x1c>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<damageRoll>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    1136 <damageRoll+0x26>
mov    %esi,%r14d
mov    %edi,%ebx
xor    %ebp,%ebp
nop
mov    $0x1,%edi
mov    %r14d,%esi
call   1030 <rollDie@plt>
add    %eax,%ebp
add    $0xffffffff,%ebx
jne    1120 <damageRoll+0x10>
jmp    1138 <damageRoll+0x28>
xor    %ebp,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @damageRoll(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
store i32 0, i32* %6
store i32 0, i32* %5
br label %7
7: ; preds = %18, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i32, i32* %4
%13 = call i64 @rollDie(i32 1, i32 %12)
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = add nsw i64 %15, %13
%17 = trunc i64 %16 to i32
store i32 %17, i32* %6
br label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %7
21: ; preds = %7
%22 = load i32, i32* %6
ret i32 %22
}

LLVM IR (-O2):
define i32 @damageRoll(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i32 [ %9, %4 ], [ 0, %2 ]
%6 = phi i32 [ %10, %4 ], [ 0, %2 ]
%7 = tail call i64 @rollDie(i32 1, i32 %1)
%8 = trunc i64 %7 to i32
%9 = add i32 %5, %8
%10 = add nuw nsw i32 %6, 1
%11 = icmp eq i32 %10, %0
br i1 %11, label %12, label %4
12: ; preds = %4, %2
%13 = phi i32 [ 0, %2 ], [ %9, %4 ]
ret i32 %13
}