xunge/DecIR huggingface dataset:
float *mat3_identity(float *result) {
  result[0] = 1.0f;
  result[1] = 0.0f;
  result[2] = 0.0f;
  result[3] = 0.0f;
  result[4] = 1.0f;
  result[5] = 0.0f;
  result[6] = 0.0f;
  result[7] = 0.0f;
  result[8] = 8.0f;
  return result;
}


x86 assembly (clang, -O0):
<mat3_identity>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xef0(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x8(%rbp),%rax
movss  0xebc(%rip),%xmm0
movss  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x14(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rax)
mov    -0x8(%rbp),%rax
movss  0xe83(%rip),%xmm0
movss  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat3_identity>:
mov    %rdi,%rax
movss  0xef5(%rip),%xmm0
movups %xmm0,(%rdi)
movups %xmm0,0x10(%rdi)
movl   $0x41000000,0x20(%rdi)
ret

LLVM IR (-O0):
define float* @mat3_identity(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
store float 1.000000e+00, float* %4
%5 = load float*, float** %2
%6 = getelementptr inbounds float, float* %5, i64 1
store float 0.000000e+00, float* %6
%7 = load float*, float** %2
%8 = getelementptr inbounds float, float* %7, i64 2
store float 0.000000e+00, float* %8
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 3
store float 0.000000e+00, float* %10
%11 = load float*, float** %2
%12 = getelementptr inbounds float, float* %11, i64 4
store float 1.000000e+00, float* %12
%13 = load float*, float** %2
%14 = getelementptr inbounds float, float* %13, i64 5
store float 0.000000e+00, float* %14
%15 = load float*, float** %2
%16 = getelementptr inbounds float, float* %15, i64 6
store float 0.000000e+00, float* %16
%17 = load float*, float** %2
%18 = getelementptr inbounds float, float* %17, i64 7
store float 0.000000e+00, float* %18
%19 = load float*, float** %2
%20 = getelementptr inbounds float, float* %19, i64 8
store float 8.000000e+00, float* %20
%21 = load float*, float** %2
ret float* %21
}

LLVM IR (-O2):
define float* @mat3_identity(float* returned writeonly %0) {
%2 = bitcast float* %0 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, <4 x float>* %2
%3 = getelementptr inbounds float, float* %0, i64 4
%4 = bitcast float* %3 to <4 x float>*
store <4 x float> <float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00>, <4 x float>* %4
%5 = getelementptr inbounds float, float* %0, i64 8
store float 8.000000e+00, float* %5
ret float* %0
}
/* Type definitions */
struct lframe {
  int dummy;
};
struct lemon {
  int dummy;
};

/* Variables and functions */
struct lframe *machine_pop_frame(struct lemon *);
struct lframe *lemon_machine_pop_frame(struct lemon *lemon) {
  return machine_pop_frame(lemon);
}


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

x86 assembly (clang, -O2):
<lemon_machine_pop_frame>:
jmp    1030 <machine_pop_frame@plt>

LLVM IR (-O0):
%struct.lframe = type { i32 }
%struct.lemon = type { i32 }
define %struct.lframe* @lemon_machine_pop_frame(%struct.lemon* %0) {
%2 = alloca %struct.lemon*
store %struct.lemon* %0, %struct.lemon** %2
%3 = load %struct.lemon*, %struct.lemon** %2
%4 = call %struct.lframe* @machine_pop_frame(%struct.lemon* %3)
ret %struct.lframe* %4
}

LLVM IR (-O2):
%struct.lframe = type { i32 }
%struct.lemon = type { i32 }
define %struct.lframe* @lemon_machine_pop_frame(%struct.lemon* %0) {
%2 = tail call %struct.lframe* @machine_pop_frame(%struct.lemon* %0)
ret %struct.lframe* %2
}
/* Variables and functions */
void usb_ep0_stall();
void usb_ep0_vendor_device_tx() { return usb_ep0_stall(); }


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

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

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

LLVM IR (-O2):
define void @usb_ep0_vendor_device_tx() {
tail call void (...) @usb_ep0_stall()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ critbit_node_size();
void *malloc(int /*<<< orphan*/);
void *alloc_critbit_node(void *const ctx) {
  assert(ctx == NULL);
  return malloc(critbit_node_size());
}


x86 assembly (clang, -O0):
<alloc_critbit_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x0,%al
call   1050 <critbit_node_size@plt>
mov    %eax,%edi
call   1040 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_critbit_node>:
push   %rax
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
mov    %eax,%edi
call   1030 <assert@plt>
xor    %eax,%eax
call   1050 <critbit_node_size@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <malloc@plt>

LLVM IR (-O0):
define i8* @alloc_critbit_node(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = call i32 (...) @critbit_node_size()
%8 = call i8* @malloc(i32 %7)
ret i8* %8
}

LLVM IR (-O2):
define noalias i8* @alloc_critbit_node(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 (...) @critbit_node_size()
%6 = tail call i8* @malloc(i32 %5)
ret i8* %6
}
/* Variables and functions */
unsigned short dxl_read_word(unsigned char, int);
unsigned short getPresentLoad(unsigned char id) {
  return dxl_read_word(id, (40));
}


x86 assembly (clang, -O0):
<getPresentLoad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x28,%esi
movzbl -0x1(%rbp),%edi
call   1030 <dxl_read_word@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPresentLoad>:
mov    $0x28,%esi
jmp    1030 <dxl_read_word@plt>

LLVM IR (-O0):
define zeroext i16 @getPresentLoad(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call zeroext i16 @dxl_read_word(i8 zeroext %3, i32 40)
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @getPresentLoad(i8 zeroext %0) {
%2 = tail call zeroext i16 @dxl_read_word(i8 zeroext %0, i32 40)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ TCIOFLUSH;
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ tcflush(int, int /*<<< orphan*/);
void serialport_flush(int fd) {
  sleep(1);
  tcflush(fd, TCIOFLUSH);
}


x86 assembly (clang, -O0):
<serialport_flush>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    -0x4(%rbp),%edi
mov    0x2ea1(%rip),%rax
mov    (%rax),%esi
call   1030 <tcflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialport_flush>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
pop    %rbx
jmp    1030 <tcflush@plt>

LLVM IR (-O0):
@TCIOFLUSH = global i32 0
define void @serialport_flush(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @sleep(i32 1)
%4 = load i32, i32* %2
%5 = load i32, i32* @TCIOFLUSH
%6 = call i32 @tcflush(i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
@TCIOFLUSH = global i32 0
define void @serialport_flush(i32 %0) {
%2 = tail call i32 @sleep(i32 1)
%3 = load i32, i32* @TCIOFLUSH
%4 = tail call i32 @tcflush(i32 %0, i32 %3)
ret void
}
/* Variables and functions */
int yaffs_remount_common(int /*<<< orphan*/, char const *, int, int);
int yaffs_remount(const char *path, int force, int read_only) {
  return yaffs_remount_common((0), path, force, read_only);
}


x86 assembly (clang, -O0):
<yaffs_remount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
xor    %edi,%edi
call   1030 <yaffs_remount_common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yaffs_remount>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <yaffs_remount_common@plt>

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

LLVM IR (-O2):
define i32 @yaffs_remount(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @yaffs_remount_common(i32 0, i8* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ saveState();
void afs_destroy(void *v) { saveState(); }


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

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

LLVM IR (-O0):
define void @afs_destroy(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @saveState()
ret void
}

LLVM IR (-O2):
define void @afs_destroy(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @saveState()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void picsendeoi(int irq) {
  if (irq == 7)
    return;
  if (irq <= 7) {
    outb(0x20, 0x60 + irq);
  } else {
    if (irq != 31)
      outb(0xA0, 0x60 + irq - 8);
    outb(0x20, 0x60 + 2);
  }
}


x86 assembly (clang, -O0):
<picsendeoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x7,-0x4(%rbp)
jne    112a <picsendeoi+0x1a>
jmp    1175 <picsendeoi+0x65>
cmpl   $0x7,-0x4(%rbp)
jg     1149 <picsendeoi+0x39>
mov    -0x4(%rbp),%esi
add    $0x60,%esi
mov    $0x20,%edi
call   1030 <outb@plt>
jmp    1175 <picsendeoi+0x65>
cmpl   $0x1f,-0x4(%rbp)
je     1166 <picsendeoi+0x56>
mov    -0x4(%rbp),%esi
add    $0x60,%esi
sub    $0x8,%esi
mov    $0xa0,%edi
call   1030 <outb@plt>
mov    $0x20,%edi
mov    $0x62,%esi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<picsendeoi>:
cmp    $0x7,%edi
jne    1116 <picsendeoi+0x6>
ret
push   %rbx
mov    %edi,%esi
jg     1122 <picsendeoi+0x12>
add    $0x60,%esi
mov    %esi,%ebx
jmp    1139 <picsendeoi+0x29>
mov    $0x62,%ebx
cmp    $0x1f,%esi
je     1139 <picsendeoi+0x29>
add    $0x58,%esi
mov    $0xa0,%edi
call   1030 <outb@plt>
mov    $0x20,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @picsendeoi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 7
br i1 %4, label %5, label %6
5: ; preds = %1
br label %23
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 7
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 96, %10
%12 = call i32 @outb(i32 32, i32 %11)
br label %23
13: ; preds = %6
%14 = load i32, i32* %2
%15 = icmp ne i32 %14, 31
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = load i32, i32* %2
%18 = add nsw i32 96, %17
%19 = sub nsw i32 %18, 8
%20 = call i32 @outb(i32 160, i32 %19)
br label %21
21: ; preds = %16, %13
%22 = call i32 @outb(i32 32, i32 98)
br label %23
23: ; preds = %5, %21, %9
ret void
}

LLVM IR (-O2):
define void @picsendeoi(i32 %0) {
%2 = icmp eq i32 %0, 7
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = icmp slt i32 %0, 8
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = add nsw i32 %0, 96
br label %12
7: ; preds = %3
%8 = icmp eq i32 %0, 31
br i1 %8, label %12, label %9
9: ; preds = %7
%10 = add nuw nsw i32 %0, 88
%11 = tail call i32 @outb(i32 160, i32 %10)
br label %12
12: ; preds = %7, %9, %5
%13 = phi i32 [ %6, %5 ], [ 98, %9 ], [ 98, %7 ]
%14 = tail call i32 @outb(i32 32, i32 %13)
br label %15
15: ; preds = %12, %1
ret void
}
/* Type definitions */
struct utsname {
  char *sysname;
  char *release;
  char *version;
  char *machine;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *);
int /*<<< orphan*/ uname(struct utsname *);
int main() {
  struct utsname u;
  uname(&u);
  printf("%s release %s (version %s) on %s \n", u.sysname, u.release, u.version,
         u.machine);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x28(%rbp),%rdi
call   1040 <uname@plt>
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0x8(%rsp),%rdi
call   1040 <uname@plt>
mov    0x8(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    0x20(%rsp),%r8
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.utsname = type { i8*, i8*, i8*, i8* }
@.str = [35 x i8] c"%s release %s (version %s) on %s \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.utsname
store i32 0, i32* %1
%3 = call i32 @uname(%struct.utsname* %2)
%4 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 0
%5 = load i8*, i8** %4
%6 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 1
%7 = load i8*, i8** %6
%8 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 2
%9 = load i8*, i8** %8
%10 = getelementptr inbounds %struct.utsname, %struct.utsname* %2, i32 0, i32 3
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %7, i8* %9, i8* %11)
ret i32 0
}

LLVM IR (-O2):
%struct.utsname = type { i8*, i8*, i8*, i8* }
@.str = [35 x i8] c"%s release %s (version %s) on %s \0A\00"
define i32 @main() {
%1 = alloca %struct.utsname
%2 = bitcast %struct.utsname* %1 to i8*
%3 = call i32 @uname(%struct.utsname* %1)
%4 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i64 0, i32 0
%5 = load i8*, i8** %4
%6 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i64 0, i32 1
%7 = load i8*, i8** %6
%8 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i64 0, i32 2
%9 = load i8*, i8** %8
%10 = getelementptr inbounds %struct.utsname, %struct.utsname* %1, i64 0, i32 3
%11 = load i8*, i8** %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %7, i8* %9, i8* %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(int);
void add_m32_imm32(void *_m32, unsigned long imm32) {
  unsigned long *m32 = (unsigned long *)_m32;
  put8(0x81);
  put8(0x05);
  put32((unsigned long)(m32));
  put32(imm32);
}


x86 assembly (clang, -O0):
<add_m32_imm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x81,%edi
call   1030 <put8@plt>
mov    $0x5,%edi
call   1030 <put8@plt>
mov    -0x18(%rbp),%rdi
call   1040 <put32@plt>
mov    -0x10(%rbp),%rdi
call   1040 <put32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_m32_imm32>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x81,%edi
call   1030 <put8@plt>
mov    $0x5,%edi
call   1030 <put8@plt>
mov    %rbx,%rdi
call   1040 <put32@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @add_m32_imm32(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i64*
store i64* %7, i64** %5
%8 = call i32 @put8(i32 129)
%9 = call i32 @put8(i32 5)
%10 = load i64*, i64** %5
%11 = ptrtoint i64* %10 to i64
%12 = call i32 @put32(i64 %11)
%13 = load i64, i64* %4
%14 = call i32 @put32(i64 %13)
ret void
}

LLVM IR (-O2):
define void @add_m32_imm32(i8* %0, i64 %1) {
%3 = tail call i32 @put8(i32 129)
%4 = tail call i32 @put8(i32 5)
%5 = ptrtoint i8* %0 to i64
%6 = tail call i32 @put32(i64 %5)
%7 = tail call i32 @put32(i64 %1)
ret void
}
void SV_Frame(int time) {}


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

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

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

LLVM IR (-O2):
define void @SV_Frame(i32 %0) {
ret void
}
void handler_chain_destroy(void) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @handler_chain_destroy() {
ret void
}
/* Variables and functions */
void debug_cells(size_t total) { (void)total; }


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

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

LLVM IR (-O0):
define void @debug_cells(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret void
}

LLVM IR (-O2):
define void @debug_cells(i64 %0) {
ret void
}
void gtk_accel_map_add_entry() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_map_add_entry() {
ret void
}
int test_imm_40uint32_mem(unsigned int *val) {
  return ((*val) & (0x40 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_40uint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 64
%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_40uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 64
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int f(char t[]) { return t[1] - t[0]; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movsbl 0x1(%rdi),%eax
movsbl (%rdi),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %6, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @f(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = load i8, i8* %0
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
ret i32 %7
}
void bar_char(char *x) { *x = __real foo_char(5); }


x86 assembly (clang, -O0):
<bar_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x5,%edi
mov    $0x0,%al
call   1030 <foo_char@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar_char>:
push   %rbx
mov    %rdi,%rbx
mov    $0x5,%edi
xor    %eax,%eax
call   1030 <foo_char@plt>
mov    %al,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @bar_char(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @foo_char to i32 (i32, ...)*)(i32 5)
%4 = trunc i32 %3 to i8
%5 = load i8*, i8** %2
store i8 %4, i8* %5
ret void
}

LLVM IR (-O2):
define void @bar_char(i8* nocapture writeonly %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @foo_char to i32 (i32, ...)*)(i32 5)
%3 = trunc i32 %2 to i8
store i8 %3, i8* %0
ret void
}
int test_imm_83uint16_reg(unsigned short val) {
  return ((val) & (0x83 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_83uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x83,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_83uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 131
%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_83uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 131
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void Reply_free_final() {}


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

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

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

LLVM IR (-O2):
define void @Reply_free_final() {
ret void
}
void oscheck(void) {}


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

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

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

LLVM IR (-O2):
define void @oscheck() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char const *);
void appuyezEntree(const char *texte) {
  printf("%s\n", texte);
  getchar();
}


x86 assembly (clang, -O0):
<appuyezEntree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appuyezEntree>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @appuyezEntree(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @getchar()
ret void
}
/* Type definitions */
struct __sk_buff {
  int dummy;
};
typedef int /*<<< orphan*/ __u8;
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
void cilium_dbg3(struct __sk_buff *skb, __u8 type, __u32 arg1, __u32 arg2,
                 __u32 arg3) {}


x86 assembly (clang, -O0):
<cilium_dbg3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.__sk_buff = type { i32 }
define void @cilium_dbg3(%struct.__sk_buff* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.__sk_buff*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.__sk_buff* %0, %struct.__sk_buff** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret void
}

LLVM IR (-O2):
%struct.__sk_buff = type { i32 }
define void @cilium_dbg3(%struct.__sk_buff* nocapture %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret void
}
int do_158() { return 158; }


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

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

LLVM IR (-O0):
define i32 @do_158() {
ret i32 158
}

LLVM IR (-O2):
define i32 @do_158() {
ret i32 158
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int last(int arr[], int lb, int ub) {
  assert(arr != NULL && lb <= ub);
  return lb < ub ? ub - 1 : -1;
}


x86 assembly (clang, -O0):
<last>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     113e <last+0x2e>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
setle  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1165 <last+0x55>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1172 <last+0x62>
mov    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1172 <last+0x62>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<last>:
push   %rbx
test   %rdi,%rdi
setne  %al
lea    -0x1(%rdx),%ecx
cmp    %edx,%esi
setle  %dl
mov    $0xffffffff,%ebx
cmovl  %ecx,%ebx
and    %al,%dl
movzbl %dl,%edi
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @last(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 = icmp ne i32* %7, null
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = icmp sle i32 %10, %11
br label %13
13: ; preds = %9, %3
%14 = phi i1 [ false, %3 ], [ %12, %9 ]
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %23
20: ; preds = %13
%21 = load i32, i32* %6
%22 = sub nsw i32 %21, 1
br label %24
23: ; preds = %13
br label %24
24: ; preds = %23, %20
%25 = phi i32 [ %22, %20 ], [ -1, %23 ]
ret i32 %25
}

LLVM IR (-O2):
define i32 @last(i32* readnone %0, i32 %1, i32 %2) {
%4 = icmp ne i32* %0, null
%5 = icmp sle i32 %1, %2
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = icmp slt i32 %1, %2
%10 = add nsw i32 %2, -1
%11 = select i1 %9, i32 %10, i32 -1
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xe5() {
  Assert_real((isgraph(229) == 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_isgraph.c",
              1150, ("isgraph should be 0 for 0xe5"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xe5>:
push   %rax
mov    $0xe5,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x47e,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xe5\00"
define void @t_isgraph_0xe5() {
%1 = call i64 @isgraph(i32 229)
%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 1150, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xe5\00"
define void @t_isgraph_0xe5() {
%1 = tail call i64 @isgraph(i32 229)
%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 1150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
newline() { puts("\r\n"); }


x86 assembly (clang, -O0):
<newline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"\0D\0A\00"
define i32 @newline() {
%1 = alloca i32
%2 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
define i32 @newline() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
int main() {
  int data1 = 10;
  int data2 = 20;
  int result;
  asm("imull %%edx, %%ecx\n\t"
      "movl %%ecx, %%eax"
      : "=a"(result)
      : "d"(data1), "c"(data2));
  printf("The result is %d\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
imul   %edx,%ecx
mov    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edx
mov    $0x14,%ecx
imul   %edx,%ecx
mov    %ecx,%eax
lea    0xed9(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"The result is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 20, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 asm "imull %edx, %ecx\0A\09movl %ecx, %eax", "={ax},{dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"The result is %d\0A\00"
define i32 @main() {
%1 = tail call i32 asm "imull %edx, %ecx\0A\09movl %ecx, %eax", "={ax},{dx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 10, i32 20)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
void fswap(int *a, int *b) {
  *a = *a + *b;
  *b = *a - *b;
  *a = *a - *b;
}


x86 assembly (clang, -O0):
<fswap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
sub    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
sub    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fswap>:
mov    (%rsi),%eax
add    (%rdi),%eax
mov    %eax,(%rdi)
sub    (%rsi),%eax
mov    %eax,(%rsi)
sub    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @fswap(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* %5
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = add nsw i32 %6, %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
%16 = load i32*, i32** %4
store i32 %15, i32* %16
%17 = load i32*, i32** %3
%18 = load i32, i32* %17
%19 = load i32*, i32** %4
%20 = load i32, i32* %19
%21 = sub nsw i32 %18, %20
%22 = load i32*, i32** %3
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @fswap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = add nsw i32 %4, %3
store i32 %5, i32* %0
%6 = load i32, i32* %1
%7 = sub nsw i32 %5, %6
store i32 %7, i32* %1
%8 = load i32, i32* %0
%9 = sub nsw i32 %8, %7
store i32 %9, i32* %0
ret void
}
void read_forward_arrays_undoatt_adios_(void) {}


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

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

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

LLVM IR (-O2):
define void @read_forward_arrays_undoatt_adios_() {
ret void
}
int func2() { return -5; }


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

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

LLVM IR (-O0):
define i32 @func2() {
ret i32 -5
}

LLVM IR (-O2):
define i32 @func2() {
ret i32 -5
}
int lib2_bar(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @lib2_bar() {
ret i32 0
}
/* Variables and functions */
scalar_t__ fcitx_utils_calloc(size_t, int);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int strlen(char const *);
__attribute__((visibility("default"))) char *
fcitx_utils_strdup(const char *str) {
  char *new_str = NULL;
  size_t length;
  if (str) {
    length = strlen(str) + 1;
    new_str = ((char *)fcitx_utils_calloc(length, sizeof(char)));
    memcpy(new_str, str, length);
  }
  return new_str;
}


x86 assembly (clang, -O0):
<fcitx_utils_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1184 <fcitx_utils_strdup+0x54>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
call   1050 <fcitx_utils_calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcitx_utils_strdup>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1168 <fcitx_utils_strdup+0x38>
mov    %rdi,%rbx
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
mov    $0x1,%esi
call   1050 <fcitx_utils_calloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
jmp    116b <fcitx_utils_strdup+0x3b>
xor    %r14d,%r14d
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @fcitx_utils_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
store i8* null, i8** %3
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %19
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @strlen(i8* %8)
%10 = add nsw i32 %9, 1
%11 = sext i32 %10 to i64
store i64 %11, i64* %4
%12 = load i64, i64* %4
%13 = call i64 @fcitx_utils_calloc(i64 %12, i32 1)
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %3
%15 = load i8*, i8** %3
%16 = load i8*, i8** %2
%17 = load i64, i64* %4
%18 = call i32 @memcpy(i8* %15, i8* %16, i64 %17)
br label %19
19: ; preds = %7, %1
%20 = load i8*, i8** %3
ret i8* %20
}

LLVM IR (-O2):
define i8* @fcitx_utils_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
%7 = tail call i64 @fcitx_utils_calloc(i64 %6, i32 1)
%8 = inttoptr i64 %7 to i8*
%9 = tail call i32 @memcpy(i8* %8, i8* %0, i64 %6)
br label %10
10: ; preds = %3, %1
%11 = phi i8* [ %8, %3 ], [ null, %1 ]
ret i8* %11
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popbooleanarray(char *x, int n) { popNarray(x, (unsigned int)(n * 4)); }


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

x86 assembly (clang, -O2):
<popbooleanarray>:
shl    $0x2,%esi
jmp    1030 <popNarray@plt>

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

LLVM IR (-O2):
define void @popbooleanarray(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 2
%4 = tail call i32 @popNarray(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int o_close(int);
int f_close(int fd) { return o_close(fd); }


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

x86 assembly (clang, -O2):
<f_close>:
jmp    1030 <o_close@plt>

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

LLVM IR (-O2):
define i32 @f_close(i32 %0) {
%2 = tail call i32 @o_close(i32 %0)
ret i32 %2
}
int gcd(int a, int b) {
  if ((b <= a) && ((a % b) == 0)) {
    return b;
  } else if (a < b) {
    return gcd(b, a);
  } else {
    return gcd(b, a % b);
  }
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1145 <gcd+0x35>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1145 <gcd+0x35>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1178 <gcd+0x68>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1164 <gcd+0x54>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
jmp    1178 <gcd+0x68>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edx,%ecx
mov    %edi,%edx
mov    %ecx,%edi
cmp    %edx,%ecx
jg     1110 <gcd+0x10>
mov    %edx,%eax
cltd
idiv   %ecx
mov    %ecx,%edi
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gcd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = load i32, i32* %4
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %16
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = srem i32 %10, %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = load i32, i32* %5
store i32 %15, i32* %3
br label %30
16: ; preds = %9, %2
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %24
20: ; preds = %16
%21 = load i32, i32* %5
%22 = load i32, i32* %4
%23 = call i32 @gcd(i32 %21, i32 %22)
store i32 %23, i32* %3
br label %30
24: ; preds = %16
%25 = load i32, i32* %5
%26 = load i32, i32* %4
%27 = load i32, i32* %5
%28 = srem i32 %26, %27
%29 = call i32 @gcd(i32 %25, i32 %28)
store i32 %29, i32* %3
br label %30
30: ; preds = %24, %20, %14
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
br label %3
3: ; preds = %10, %2
%4 = phi i32 [ %0, %2 ], [ %5, %10 ]
%5 = phi i32 [ %1, %2 ], [ %11, %10 ]
%6 = icmp sgt i32 %5, %4
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = srem i32 %4, %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7, %3
%11 = phi i32 [ %8, %7 ], [ %4, %3 ]
br label %3
12: ; preds = %7
ret i32 %5
}
/* Type definitions */
struct device {
  int dummy;
};

/* Variables and functions */
int _dev_close(struct device *, int /*<<< orphan*/);
int dev_close(struct device *dev) { return _dev_close(dev, 0); }


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

x86 assembly (clang, -O2):
<dev_close>:
xor    %esi,%esi
jmp    1030 <_dev_close@plt>

LLVM IR (-O0):
%struct.device = type { i32 }
define i32 @dev_close(%struct.device* %0) {
%2 = alloca %struct.device*
store %struct.device* %0, %struct.device** %2
%3 = load %struct.device*, %struct.device** %2
%4 = call i32 @_dev_close(%struct.device* %3, i32 0)
ret i32 %4
}

LLVM IR (-O2):
%struct.device = type { i32 }
define i32 @dev_close(%struct.device* %0) {
%2 = tail call i32 @_dev_close(%struct.device* %0, i32 0)
ret i32 %2
}
void UndefInstHandler() {
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<UndefInstHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <UndefInstHandler+0x9>
jmp    1109 <UndefInstHandler+0x9>

x86 assembly (clang, -O2):
<UndefInstHandler>:
jmp    1100 <UndefInstHandler>

LLVM IR (-O0):
define void @UndefInstHandler() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @UndefInstHandler() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char const *, char const *);
int /*<<< orphan*/ perror(char const *);
void openFile(FILE **file, const char *filename, const char *type) {
  if ((*file = fopen(filename, type)) == NULL) {
    perror(filename);
    exit(1);
  }
  return;
}


x86 assembly (clang, -O0):
<openFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <fopen@plt>
mov    -0x8(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
jne    1175 <openFile+0x45>
mov    -0x10(%rbp),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<openFile>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <fopen@plt>
mov    %rax,(%rbx)
test   %rax,%rax
je     1155 <openFile+0x25>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %r14,%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @openFile(i32** %0, i8* %1, i8* %2) {
%4 = alloca i32**
%5 = alloca i8*
%6 = alloca i8*
store i32** %0, i32*** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %6
%9 = call i32* @fopen(i8* %7, i8* %8)
%10 = load i32**, i32*** %4
store i32* %9, i32** %10
%11 = icmp eq i32* %9, null
br i1 %11, label %12, label %16
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = call i32 @perror(i8* %13)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @openFile(i32** nocapture writeonly %0, i8* nocapture %1, i8* nocapture %2) {
%4 = tail call i32* @fopen(i8* %1, i8* %2)
store i32* %4, i32** %0
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @perror(i8* %1)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 0;
  a += 1;
  a *= 1;
  a /= 1;
  a <<= 1;
  a >>= 1;
  a |= 1;
  a &= 1;
  printf("hoge%d", a);
  printf("%d", sizeof(a));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x1,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
lea    0xe84(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"hoge%d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = mul nsw i32 %5, 1
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 1
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = shl i32 %9, 1
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = ashr i32 %11, 1
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = or i32 %13, 1
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = and i32 %15, 1
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 4)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"hoge%d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ backtrace_symbols_fd(void *const *, int, int);
void oc_backtrace_symbols_fd(void *const *buffer, int size, int fd) {
  backtrace_symbols_fd(buffer, size, fd);
}


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

x86 assembly (clang, -O2):
<oc_backtrace_symbols_fd>:
jmp    1030 <backtrace_symbols_fd@plt>

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

LLVM IR (-O2):
define void @oc_backtrace_symbols_fd(i8** %0, i32 %1, i32 %2) {
%4 = tail call i32 @backtrace_symbols_fd(i8** %0, i32 %1, i32 %2)
ret void
}
int fun617() { return 617; }


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

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

LLVM IR (-O0):
define i32 @fun617() {
ret i32 617
}

LLVM IR (-O2):
define i32 @fun617() {
ret i32 617
}