xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EKFConfigurationHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void EKFConfigurationUpdated() { UAVObjUpdated(EKFConfigurationHandle()); }


x86 assembly (clang, -O0):
<EKFConfigurationUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <EKFConfigurationHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<EKFConfigurationUpdated>:
push   %rax
xor    %eax,%eax
call   1040 <EKFConfigurationHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @EKFConfigurationUpdated() {
%1 = call i32 (...) @EKFConfigurationHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @EKFConfigurationUpdated() {
%1 = tail call i32 (...) @EKFConfigurationHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ readData4(int, float *);
int /*<<< orphan*/ writeData4(int, int *);
void do_fitness(int socketfd, int id, int type) {
  writeData4(socketfd, &id);
  writeData4(socketfd, &type);
  float fitness;
  readData4(socketfd, &fitness);
  printf("Fitness result: %f\n", fitness);
}


x86 assembly (clang, -O0):
<do_fitness>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1040 <writeData4@plt>
mov    -0x4(%rbp),%edi
lea    -0xc(%rbp),%rsi
call   1040 <writeData4@plt>
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
call   1050 <readData4@plt>
movss  -0x10(%rbp),%xmm0
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_fitness>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %esi,0xc(%rsp)
mov    %edx,0x8(%rsp)
lea    0xc(%rsp),%rsi
call   1040 <writeData4@plt>
lea    0x8(%rsp),%rsi
mov    %ebx,%edi
call   1040 <writeData4@plt>
lea    0x4(%rsp),%rsi
mov    %ebx,%edi
call   1050 <readData4@plt>
movss  0x4(%rsp),%xmm0
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Fitness result: %f\0A\00"
define void @do_fitness(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = call i32 @writeData4(i32 %8, i32* %5)
%10 = load i32, i32* %4
%11 = call i32 @writeData4(i32 %10, i32* %6)
%12 = load i32, i32* %4
%13 = call i32 @readData4(i32 %12, float* %7)
%14 = load float, float* %7
%15 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), float %14)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Fitness result: %f\0A\00"
define void @do_fitness(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store i32 %1, i32* %4
store i32 %2, i32* %5
%7 = call i32 @writeData4(i32 %0, i32* %4)
%8 = call i32 @writeData4(i32 %0, i32* %5)
%9 = bitcast float* %6 to i8*
%10 = call i32 @readData4(i32 %0, float* %6)
%11 = load float, float* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), float %11)
ret void
}
char GetEncoding8() { return 0x80; }


x86 assembly (clang, -O0):
<GetEncoding8>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetEncoding8>:
mov    $0x80,%al
ret

LLVM IR (-O0):
define signext i8 @GetEncoding8() {
ret i8 -128
}

LLVM IR (-O2):
define signext i8 @GetEncoding8() {
ret i8 -128
}
/* Variables and functions */
int /*<<< orphan*/ cpu_reset();
int /*<<< orphan*/ hw_reset();
int /*<<< orphan*/ lcd_reset();
int /*<<< orphan*/ mbc_reset();
int /*<<< orphan*/ mem_mapbootrom();
int /*<<< orphan*/ sound_reset();
void emu_reset() {
  hw_reset();
  lcd_reset();
  cpu_reset();
  mbc_reset();
  sound_reset();
  mem_mapbootrom();
}


x86 assembly (clang, -O0):
<emu_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <hw_reset@plt>
mov    $0x0,%al
call   1050 <lcd_reset@plt>
mov    $0x0,%al
call   1060 <cpu_reset@plt>
mov    $0x0,%al
call   1040 <mbc_reset@plt>
mov    $0x0,%al
call   1080 <sound_reset@plt>
mov    $0x0,%al
call   1030 <mem_mapbootrom@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<emu_reset>:
push   %rax
xor    %eax,%eax
call   1070 <hw_reset@plt>
xor    %eax,%eax
call   1050 <lcd_reset@plt>
xor    %eax,%eax
call   1060 <cpu_reset@plt>
xor    %eax,%eax
call   1040 <mbc_reset@plt>
xor    %eax,%eax
call   1080 <sound_reset@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <mem_mapbootrom@plt>

LLVM IR (-O0):
define void @emu_reset() {
%1 = call i32 (...) @hw_reset()
%2 = call i32 (...) @lcd_reset()
%3 = call i32 (...) @cpu_reset()
%4 = call i32 (...) @mbc_reset()
%5 = call i32 (...) @sound_reset()
%6 = call i32 (...) @mem_mapbootrom()
ret void
}

LLVM IR (-O2):
define void @emu_reset() {
%1 = tail call i32 (...) @hw_reset()
%2 = tail call i32 (...) @lcd_reset()
%3 = tail call i32 (...) @cpu_reset()
%4 = tail call i32 (...) @mbc_reset()
%5 = tail call i32 (...) @sound_reset()
%6 = tail call i32 (...) @mem_mapbootrom()
ret void
}
int test_imm_EEint64_lowword_mem(long long *val) {
  return ((*val) & (0xEE << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_EEint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 238
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ gzFile;

/* Variables and functions */
int /*<<< orphan*/ openFileGz(char const *, char *, char const *);
int /*<<< orphan*/ snprintf(char *, int, char *, char const *, int);
gzFile openFileGzI(const char *a, const char *b, int i, const char *mode) {
  char ary[5000];
  snprintf(ary, 5000, "%s%d.gz", b, i);
  return openFileGz(a, ary, mode);
}


x86 assembly (clang, -O0):
<openFileGzI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x13b0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x13b0(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x1388,%esi
lea    0xeab(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x13b0(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <openFileGz@plt>
add    $0x13b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openFileGzI>:
push   %r15
push   %r14
push   %rbx
sub    $0x1390,%rsp
mov    %rcx,%r14
mov    %edx,%r8d
mov    %rsi,%rcx
mov    %rdi,%rbx
lea    0xec1(%rip),%rdx
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x1388,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1040 <openFileGz@plt>
add    $0x1390,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%s%d.gz\00"
define i32 @openFileGzI(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca [5000 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%10 = getelementptr inbounds [5000 x i8], [5000 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = call i32 @snprintf(i8* %10, i32 5000, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %12)
%14 = load i8*, i8** %5
%15 = getelementptr inbounds [5000 x i8], [5000 x i8]* %9, i64 0, i64 0
%16 = load i8*, i8** %8
%17 = call i32 @openFileGz(i8* %14, i8* %15, i8* %16)
ret i32 %17
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s%d.gz\00"
define i32 @openFileGzI(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca [5000 x i8]
%6 = getelementptr inbounds [5000 x i8], [5000 x i8]* %5, i64 0, i64 0
%7 = call i32 @snprintf(i8* %6, i32 5000, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
%8 = call i32 @openFileGz(i8* %0, i8* %6, i8* %3)
ret i32 %8
}
void uart_tx_int_disable(void) {
  (*((volatile unsigned long *)0x7F005038)) |= (1 << 2);
}


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

x86 assembly (clang, -O2):
<uart_tx_int_disable>:
orq    $0x4,0x7f005038
7f 04
ret

LLVM IR (-O0):
define void @uart_tx_int_disable() {
%1 = load volatile i64, i64* inttoptr (i64 2130726968 to i64*)
%2 = or i64 %1, 4
store volatile i64 %2, i64* inttoptr (i64 2130726968 to i64*)
ret void
}

LLVM IR (-O2):
define void @uart_tx_int_disable() {
%1 = load volatile i64, i64* inttoptr (i64 2130726968 to i64*)
%2 = or i64 %1, 4
store volatile i64 %2, i64* inttoptr (i64 2130726968 to i64*)
ret void
}
int prepare(char **str, int len, int *is_free) {
  int i = 0;
  char *p = *str;
  while (i < len) {
    p++;
    i++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<prepare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1147 <prepare+0x47>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1121 <prepare+0x21>
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @prepare(i8** nocapture readnone %0, i32 %1, i32* nocapture readnone %2) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *magic = (char *)0x00796177;
  printf("\nmagic = %p\n", magic);
  printf("magic = \"%s\"\n", (char *)(&magic));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x796177,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    -0x10(%rbp),%rsi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movq   $0x796177,(%rsp)
lea    0xee0(%rip),%rdi
mov    $0x796177,%esi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"\0Amagic = %p\0A\00"
@.str.1 = [14 x i8] c"magic = \22%s\22\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* inttoptr (i64 7954807 to i8*), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = bitcast i8** %2 to i8*
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"\0Amagic = %p\0A\00"
@.str.1 = [14 x i8] c"magic = \22%s\22\0A\00"
define i32 @main() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
store i8* inttoptr (i64 7954807 to i8*), i8** %1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* inttoptr (i64 7954807 to i8*))
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
int do_512() { return 512; }


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

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

LLVM IR (-O0):
define i32 @do_512() {
ret i32 512
}

LLVM IR (-O2):
define i32 @do_512() {
ret i32 512
}
int test(int a, int b, int c) {
  if (a == 10 || a == 12 || a == 26)
    return b;
  else
    return c;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0xa,-0x8(%rbp)
je     112b <test+0x2b>
cmpl   $0xc,-0x8(%rbp)
je     112b <test+0x2b>
cmpl   $0x1a,-0x8(%rbp)
jne    1136 <test+0x36>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113c <test+0x3c>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
cmp    $0x1a,%edi
ja     1112 <test+0x12>
mov    %esi,%eax
mov    $0x4001400,%ecx
bt     %edi,%ecx
jae    1112 <test+0x12>
ret
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1, i32 %2) {
switch i32 %0, label %4 [
i32 26, label %5
i32 12, label %5
i32 10, label %5
]
4: ; preds = %3
br label %5
5: ; preds = %3, %3, %3, %4
%6 = phi i32 [ %2, %4 ], [ %1, %3 ], [ %1, %3 ], [ %1, %3 ]
ret i32 %6
}
int test_imm_F4uint8_reg(unsigned char val) {
  return ((val) & (0xF4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F4uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xf4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F4uint8_reg>:
test   $0xf4,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_F4uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -12
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void IncludeInit() {}


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

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

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

LLVM IR (-O2):
define void @IncludeInit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cave_set_feat_aux(int, int, int);
void reapply_chasm_edge(int y, int x, int r) { cave_set_feat_aux(y, x, r); }


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

x86 assembly (clang, -O2):
<reapply_chasm_edge>:
jmp    1030 <cave_set_feat_aux@plt>

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

LLVM IR (-O2):
define void @reapply_chasm_edge(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @cave_set_feat_aux(i32 %0, i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void fmul_preg64_dword(int reg64) {
  put8(0xD8);
  put8(0x08 + reg64);
}


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

x86 assembly (clang, -O2):
<fmul_preg64_dword>:
push   %rbx
mov    %edi,%ebx
mov    $0xd8,%edi
call   1030 <put8@plt>
add    $0x8,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @fmul_preg64_dword(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 216)
%4 = load i32, i32* %2
%5 = add nsw i32 8, %4
%6 = call i32 @put8(i32 %5)
ret void
}

LLVM IR (-O2):
define void @fmul_preg64_dword(i32 %0) {
%2 = tail call i32 @put8(i32 216)
%3 = add nsw i32 %0, 8
%4 = tail call i32 @put8(i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ getegid();
scalar_t__ geteuid();
scalar_t__ getgid();
scalar_t__ getuid();
int /*<<< orphan*/ setegid(scalar_t__);
int /*<<< orphan*/ seteuid(scalar_t__);
void restoreguid() {
  if (getuid() != geteuid())
    seteuid(getuid());
  if (getgid() != getegid())
    setegid(getgid());
}


x86 assembly (clang, -O0):
<restoreguid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <geteuid@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
cmp    %rcx,%rax
je     1199 <restoreguid+0x39>
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %rax,%rdi
call   1080 <seteuid@plt>
mov    $0x0,%al
call   1050 <getgid@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <getegid@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     11ca <restoreguid+0x6a>
mov    $0x0,%al
call   1050 <getgid@plt>
mov    %rax,%rdi
call   1070 <setegid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<restoreguid>:
push   %rbx
xor    %eax,%eax
call   1030 <getuid@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <geteuid@plt>
cmp    %rax,%rbx
je     1186 <restoreguid+0x26>
xor    %eax,%eax
call   1030 <getuid@plt>
mov    %rax,%rdi
call   1080 <seteuid@plt>
xor    %eax,%eax
call   1050 <getgid@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <getegid@plt>
cmp    %rax,%rbx
jne    119e <restoreguid+0x3e>
pop    %rbx
ret
xor    %eax,%eax
call   1050 <getgid@plt>
mov    %rax,%rdi
pop    %rbx
jmp    1070 <setegid@plt>

LLVM IR (-O0):
define void @restoreguid() {
%1 = call i64 (...) @getuid()
%2 = call i64 (...) @geteuid()
%3 = icmp ne i64 %1, %2
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i64 (...) @getuid()
%6 = call i32 @seteuid(i64 %5)
br label %7
7: ; preds = %4, %0
%8 = call i64 (...) @getgid()
%9 = call i64 (...) @getegid()
%10 = icmp ne i64 %8, %9
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = call i64 (...) @getgid()
%13 = call i32 @setegid(i64 %12)
br label %14
14: ; preds = %11, %7
ret void
}

LLVM IR (-O2):
define void @restoreguid() {
%1 = tail call i64 (...) @getuid()
%2 = tail call i64 (...) @geteuid()
%3 = icmp eq i64 %1, %2
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = tail call i64 (...) @getuid()
%6 = tail call i32 @seteuid(i64 %5)
br label %7
7: ; preds = %4, %0
%8 = tail call i64 (...) @getgid()
%9 = tail call i64 (...) @getegid()
%10 = icmp eq i64 %8, %9
br i1 %10, label %14, label %11
11: ; preds = %7
%12 = tail call i64 (...) @getgid()
%13 = tail call i32 @setegid(i64 %12)
br label %14
14: ; preds = %11, %7
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
void current_utc_time(struct timespec *ts) {
  clock_gettime(CLOCK_REALTIME, ts);
}


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

x86 assembly (clang, -O2):
<current_utc_time>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
jmp    1030 <clock_gettime@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define void @current_utc_time(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load i32, i32* @CLOCK_REALTIME
%4 = load %struct.timespec*, %struct.timespec** %2
%5 = call i32 @clock_gettime(i32 %3, %struct.timespec* %4)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define void @current_utc_time(%struct.timespec* %0) {
%2 = load i32, i32* @CLOCK_REALTIME
%3 = tail call i32 @clock_gettime(i32 %2, %struct.timespec* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ minimal();
int /*<<< orphan*/ minimal_failing_r6276();
void main() {
  minimal();
  minimal_failing_r6276();
}


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

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

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @minimal()
%2 = call i32 (...) @minimal_failing_r6276()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @minimal()
%2 = tail call i32 (...) @minimal_failing_r6276()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEC_();
int /*<<< orphan*/ c64_memAbsoluteAddr();
void DEC_abs(void) {
  c64_memAbsoluteAddr();
  DEC_();
}


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

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

LLVM IR (-O0):
define void @DEC_abs() {
%1 = call i32 (...) @c64_memAbsoluteAddr()
%2 = call i32 (...) @DEC_()
ret void
}

LLVM IR (-O2):
define void @DEC_abs() {
%1 = tail call i32 (...) @c64_memAbsoluteAddr()
%2 = tail call i32 (...) @DEC_()
ret void
}
/* Type definitions */
struct Stack {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ *Stack_pop(struct Stack *);
int /*<<< orphan*/ free(struct Stack *);
void Stack_delete(struct Stack *stack) {
  while (Stack_pop(stack) != NULL) {
  }
  free(stack);
}


x86 assembly (clang, -O0):
<Stack_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <Stack_pop@plt>
cmp    $0x0,%rax
je     1144 <Stack_delete+0x24>
jmp    112c <Stack_delete+0xc>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Stack_delete>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <Stack_pop@plt>
test   %rax,%rax
jne    1130 <Stack_delete+0x10>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.Stack = type { i32 }
define void @Stack_delete(%struct.Stack* %0) {
%2 = alloca %struct.Stack*
store %struct.Stack* %0, %struct.Stack** %2
br label %3
3: ; preds = %7, %1
%4 = load %struct.Stack*, %struct.Stack** %2
%5 = call i32* @Stack_pop(%struct.Stack* %4)
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load %struct.Stack*, %struct.Stack** %2
%10 = call i32 @free(%struct.Stack* %9)
ret void
}

LLVM IR (-O2):
%struct.Stack = type { i32 }
define void @Stack_delete(%struct.Stack* %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32* @Stack_pop(%struct.Stack* %0)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %2
5: ; preds = %2
%6 = tail call i32 @free(%struct.Stack* %0)
ret void
}
/* Variables and functions */
unsigned long proc_get_transition_latency(unsigned int);
unsigned long sysfs_get_transition_latency(unsigned int);
unsigned long cpufreq_get_transition_latency(unsigned int cpu) {
  unsigned long ret = sysfs_get_transition_latency(cpu);
  if (!ret)
    ret = proc_get_transition_latency(cpu);
  return (ret);
}


x86 assembly (clang, -O0):
<cpufreq_get_transition_latency>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <sysfs_get_transition_latency@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114e <cpufreq_get_transition_latency+0x2e>
mov    -0x4(%rbp),%edi
call   1030 <proc_get_transition_latency@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpufreq_get_transition_latency>:
push   %rbx
mov    %edi,%ebx
call   1040 <sysfs_get_transition_latency@plt>
test   %rax,%rax
je     112f <cpufreq_get_transition_latency+0xf>
pop    %rbx
ret
mov    %ebx,%edi
pop    %rbx
jmp    1030 <proc_get_transition_latency@plt>

LLVM IR (-O0):
define i64 @cpufreq_get_transition_latency(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @sysfs_get_transition_latency(i32 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = icmp ne i64 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i64 @proc_get_transition_latency(i32 %9)
store i64 %10, i64* %3
br label %11
11: ; preds = %8, %1
%12 = load i64, i64* %3
ret i64 %12
}

LLVM IR (-O2):
define i64 @cpufreq_get_transition_latency(i32 %0) {
%2 = tail call i64 @sysfs_get_transition_latency(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i64 @proc_get_transition_latency(i32 %0)
br label %6
6: ; preds = %4, %1
%7 = phi i64 [ %2, %1 ], [ %5, %4 ]
ret i64 %7
}
__attribute__((visibility("default"))) void sd_bus_close(void *bus) {}


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

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

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

LLVM IR (-O2):
define void @sd_bus_close(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x84() {
  Assert_real((isprint(132) == 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_isprint.c",
              665, ("isprint should be 0 for 0x84"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x84>:
push   %rax
mov    $0x84,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x299,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x84\00"
define void @t_isprint_0x84() {
%1 = call i64 @isprint(i32 132)
%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 665, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x84\00"
define void @t_isprint_0x84() {
%1 = tail call i64 @isprint(i32 132)
%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 665, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void doSimulationNonDeadLock() {}


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

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

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

LLVM IR (-O2):
define void @doSimulationNonDeadLock() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool SysCtlPeripheralReady(uint32_t ui32Peripheral) {
  ;
  return (
      (*((volatile uint32_t
              *)(((uint32_t)(0x400fea00 + ((ui32Peripheral & 0xff00) >> 8)) &
                  0xF0000000) |
                 0x02000000 |
                 (((uint32_t)(0x400fea00 + ((ui32Peripheral & 0xff00) >> 8)) &
                   0x000FFFFF)
                  << 5) |
                 ((ui32Peripheral & 0xff) << 2)))));
}


x86 assembly (clang, -O0):
<SysCtlPeripheralReady>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
add    $0x400fea00,%eax
and    $0xf0000000,%eax
or     $0x2000000,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
add    $0x400fea00,%ecx
and    $0xfffff,%ecx
shl    $0x5,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,%eax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlPeripheralReady>:
movzbl %dil,%eax
shr    $0x3,%edi
and    $0x1fe0,%edi
shl    $0x2,%eax
or     %edi,%eax
mov    0x43fd4000(%rax),%eax
ret

LLVM IR (-O0):
define i32 @SysCtlPeripheralReady(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = ashr i32 %4, 8
%6 = add nsw i32 1074784768, %5
%7 = and i32 %6, -268435456
%8 = or i32 %7, 33554432
%9 = load i32, i32* %2
%10 = and i32 %9, 65280
%11 = ashr i32 %10, 8
%12 = add nsw i32 1074784768, %11
%13 = and i32 %12, 1048575
%14 = shl i32 %13, 5
%15 = or i32 %8, %14
%16 = load i32, i32* %2
%17 = and i32 %16, 255
%18 = shl i32 %17, 2
%19 = or i32 %15, %18
%20 = zext i32 %19 to i64
%21 = inttoptr i64 %20 to i32*
%22 = load volatile i32, i32* %21
ret i32 %22
}

LLVM IR (-O2):
define i32 @SysCtlPeripheralReady(i32 %0) {
%2 = lshr i32 %0, 3
%3 = and i32 %2, 8160
%4 = shl i32 %0, 2
%5 = and i32 %4, 1020
%6 = or i32 %5, %3
%7 = or i32 %6, 1140670464
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
ret i32 %10
}
/* Variables and functions */
scalar_t__ ft_strcmp(char const *, char const *);
int ft_strequ(char const *s1, char const *s2) {
  int eq;
  eq = (ft_strcmp(s1, s2) == 0 ? 1 : 0);
  return (eq);
}


x86 assembly (clang, -O0):
<ft_strequ>:
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   1030 <ft_strcmp@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strequ>:
push   %rax
call   1030 <ft_strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ft_strequ(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 i64 @ft_strcmp(i8* %6, i8* %7)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @ft_strequ(i8* %0, i8* %1) {
%3 = tail call i64 @ft_strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
scalar_t__ wcstold(int /*<<< orphan*/ const *, int /*<<< orphan*/ **);
double wcstod(const wchar_t *str, wchar_t **endptr) {
  return (double)wcstold(str, endptr);
}


x86 assembly (clang, -O0):
<wcstod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <wcstold@plt>
cvtsi2sd %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcstod>:
push   %rax
call   1030 <wcstold@plt>
cvtsi2sd %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @wcstod(i32* %0, i32** %1) {
%3 = alloca i32*
%4 = alloca i32**
store i32* %0, i32** %3
store i32** %1, i32*** %4
%5 = load i32*, i32** %3
%6 = load i32**, i32*** %4
%7 = call i64 @wcstold(i32* %5, i32** %6)
%8 = sitofp i64 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @wcstod(i32* %0, i32** %1) {
%3 = tail call i64 @wcstold(i32* %0, i32** %1)
%4 = sitofp i64 %3 to double
ret double %4
}
/* Type definitions */
struct confctl_var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ *confctl_var_uptr(struct confctl_var *);
bool cv_marked(struct confctl_var *cv) {
  if (confctl_var_uptr(cv) != NULL)
    return (true);
  return (false);
}


x86 assembly (clang, -O0):
<cv_marked>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <confctl_var_uptr@plt>
cmp    $0x0,%rax
je     113b <cv_marked+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <cv_marked+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cv_marked>:
push   %rax
call   1030 <confctl_var_uptr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.confctl_var = type { i32 }
define i32 @cv_marked(%struct.confctl_var* %0) {
%2 = alloca i32
%3 = alloca %struct.confctl_var*
store %struct.confctl_var* %0, %struct.confctl_var** %3
%4 = load %struct.confctl_var*, %struct.confctl_var** %3
%5 = call i32* @confctl_var_uptr(%struct.confctl_var* %4)
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
%struct.confctl_var = type { i32 }
define i32 @cv_marked(%struct.confctl_var* %0) {
%2 = tail call i32* @confctl_var_uptr(%struct.confctl_var* %0)
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ csolve_assert(int /*<<< orphan*/);
int /*<<< orphan*/ foo(int, int *);
void main() {
  int z;
  for (int i = 0; i < 100; i++) {
    int z;
    foo(i, &z);
    csolve_assert(0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    115a <main+0x3a>
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <csolve_assert@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0x4(%rsp),%r14
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %r14,%rsi
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <csolve_assert@plt>
add    $0x1,%ebx
cmp    $0x64,%ebx
jne    1130 <main+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %4
3: ; preds = %4
ret void
4: ; preds = %0, %4
%5 = phi i32 [ 0, %0 ], [ %8, %4 ]
%6 = call i32 @foo(i32 %5, i32* %1)
%7 = call i32 @csolve_assert(i32 0)
%8 = add nuw nsw i32 %5, 1
%9 = icmp eq i32 %8, 100
br i1 %9, label %3, label %4
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
bool SHAREMIND_SET_KEY_EQUALS_uint32_t(uint32_t const k1, uint32_t const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_EQUALS_uint32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_EQUALS_uint32_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_EQUALS_uint32_t(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_EQUALS_uint32_t(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct vec3 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec3_round(float *, float *);
__attribute__((always_)) struct vec3 *psvec3_round(struct vec3 *result,
                                                   struct vec3 *a) {
  vec3_round((float *)result, (float *)a);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec3_round>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3_round@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_round(%struct.vec3* %0, %struct.vec3* %1) {
%3 = alloca %struct.vec3*
%4 = alloca %struct.vec3*
store %struct.vec3* %0, %struct.vec3** %3
store %struct.vec3* %1, %struct.vec3** %4
%5 = load %struct.vec3*, %struct.vec3** %3
%6 = bitcast %struct.vec3* %5 to float*
%7 = load %struct.vec3*, %struct.vec3** %4
%8 = bitcast %struct.vec3* %7 to float*
%9 = call i32 @vec3_round(float* %6, float* %8)
%10 = load %struct.vec3*, %struct.vec3** %3
ret %struct.vec3* %10
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_round(%struct.vec3* returned %0, %struct.vec3* %1) {
%3 = bitcast %struct.vec3* %0 to float*
%4 = bitcast %struct.vec3* %1 to float*
%5 = tail call i32 @vec3_round(float* %3, float* %4)
ret %struct.vec3* %0
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int);
void atexit_parent(void) { printf("parent: %d: finished\n", getpid()); }


x86 assembly (clang, -O0):
<atexit_parent>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<atexit_parent>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"parent: %d: finished\0A\00"
define void @atexit_parent() {
%1 = call i32 (...) @getpid()
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"parent: %d: finished\0A\00"
define void @atexit_parent() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void clear_vector_double(double *a, int n) {
  int i = 0;
  for (i = 1; i <= n; i++) {
    a[i] = 0.0;
  }
}


x86 assembly (clang, -O0):
<clear_vector_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1143 <clear_vector_double+0x43>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1119 <clear_vector_double+0x19>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_vector_double>:
test   %esi,%esi
jle    112a <clear_vector_double+0x1a>
push   %rax
add    $0x8,%rdi
mov    %esi,%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @clear_vector_double(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
%5 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 1, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load double*, double** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %11, i64 %13
store double 0.000000e+00, double* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @clear_vector_double(double* nocapture writeonly %0, i32 %1) {
%3 = icmp slt i32 %1, 1
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = getelementptr double, double* %0, i64 1
%6 = bitcast double* %5 to i8*
%7 = zext i32 %1 to i64
%8 = shl nuw nsw i64 %7, 3
br label %9
9: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ decoupure(int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("\nDécoupure 1250\n");
  decoupure(1250);
  printf("\nDécoupure 666\n");
  decoupure(666);
  printf("\nDécoupure 389\n");
  decoupure(389);
  printf("\n");
  return 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>
mov    $0x4e2,%edi
call   1040 <decoupure@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x29a,%edi
call   1040 <decoupure@plt>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x185,%edi
call   1040 <decoupure@plt>
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x4e2,%edi
call   1050 <decoupure@plt>
lea    0xec3(%rip),%rdi
call   1040 <puts@plt>
mov    $0x29a,%edi
call   1050 <decoupure@plt>
lea    0xebd(%rip),%rdi
call   1040 <puts@plt>
mov    $0x185,%edi
call   1050 <decoupure@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"\0AD\C3\A9coupure 1250\0A\00"
@.str.1 = [17 x i8] c"\0AD\C3\A9coupure 666\0A\00"
@.str.2 = [17 x i8] c"\0AD\C3\A9coupure 389\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @decoupure(i32 1250)
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @decoupure(i32 666)
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @decoupure(i32 389)
%8 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [17 x i8] c"\0AD\C3\A9coupure 1250\00"
@str.4 = [16 x i8] c"\0AD\C3\A9coupure 666\00"
@str.5 = [16 x i8] c"\0AD\C3\A9coupure 389\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @decoupure(i32 1250)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @decoupure(i32 666)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @decoupure(i32 389)
%7 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scnaf(char *, int *);
void main() {
  int a;
  scnaf("%d", &a);
  if (a > 0)
    printf("positive\n");
  else if (a < 0)
    printf("negative\n");
  else
    printf("zero\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scnaf@plt>
cmpl   $0x0,-0x4(%rbp)
jle    1153 <main+0x33>
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
jmp    117f <main+0x5f>
cmpl   $0x0,-0x4(%rbp)
jge    116e <main+0x4e>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    117a <main+0x5a>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
jmp    117f <main+0x5f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scnaf@plt>
cmpl   $0x0,0x4(%rsp)
lea    0xeca(%rip),%rax
lea    0xebe(%rip),%rcx
cmovs  %rax,%rcx
lea    0xec1(%rip),%rdi
cmovle %rcx,%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [10 x i8] c"positive\0A\00"
@.str.2 = [10 x i8] c"negative\0A\00"
@.str.3 = [6 x i8] c"zero\0A\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @scnaf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %15
7: ; preds = %0
%8 = load i32, i32* %1
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %14
12: ; preds = %7
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
br label %15
15: ; preds = %14, %5
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [5 x i8] c"zero\00"
@str.4 = [9 x i8] c"negative\00"
@str.5 = [9 x i8] c"positive\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scnaf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sgt i32 %4, 0
%6 = icmp slt i32 %4, 0
%7 = select i1 %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0)
%8 = select i1 %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.5, i64 0, i64 0), i8* %7
%9 = call i32 @puts(i8* dereferenceable(1) %8)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_load1_ps(float *);
__attribute__((no)) void bar() {
  float x = 1.2345f;
  __m128 v = _mm_load1_ps(&x);
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xee0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <_mm_load1_ps@plt>
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
movl   $0x3f9e0419,0x4(%rsp)
3f
lea    0x4(%rsp),%rdi
call   1030 <_mm_load1_ps@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @bar() {
%1 = alloca float
%2 = alloca i32
store float 0x3FF3C08320000000, float* %1
%3 = call i32 @_mm_load1_ps(float* %1)
store i32 %3, i32* %2
ret void
}

LLVM IR (-O2):
define void @bar() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
store float 0x3FF3C08320000000, float* %1
%3 = call i32 @_mm_load1_ps(float* %1)
ret void
}