xunge/DecIR huggingface dataset:
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ INIT_LIST_HEAD(struct list_head *);
int /*<<< orphan*/ list_replace(struct list_head *, struct list_head *);
void list_replace_init(struct list_head *oldList, struct list_head *newList) {
  list_replace(oldList, newList);
  INIT_LIST_HEAD(oldList);
}


x86 assembly (clang, -O0):
<list_replace_init>:
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   1040 <list_replace@plt>
mov    -0x8(%rbp),%rdi
call   1030 <INIT_LIST_HEAD@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_replace_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <list_replace@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <INIT_LIST_HEAD@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_replace_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = load %struct.list_head*, %struct.list_head** %4
%7 = call i32 @list_replace(%struct.list_head* %5, %struct.list_head* %6)
%8 = load %struct.list_head*, %struct.list_head** %3
%9 = call i32 @INIT_LIST_HEAD(%struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_replace_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @list_replace(%struct.list_head* %0, %struct.list_head* %1)
%4 = tail call i32 @INIT_LIST_HEAD(%struct.list_head* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _DIAGASSERT(int /*<<< orphan*/);
char *malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int strlen(char const *);
char *strdup(const char *str) {
  size_t len;
  char *copy;
  _DIAGASSERT(str != NULL);
  len = strlen(str) + 1;
  if (!(copy = malloc(len)))
    return (NULL);
  memcpy(copy, str, len);
  return (copy);
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <_DIAGASSERT@plt>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1194 <strdup+0x54>
movq   $0x0,-0x8(%rbp)
jmp    11ad <strdup+0x6d>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1050 <_DIAGASSERT@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1060 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1182 <strdup+0x42>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @_DIAGASSERT(i32 %3)
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, 1
%7 = sext i32 %6 to i64
%8 = tail call i8* @malloc(i64 %7)
%9 = icmp eq i8* %8, null
br i1 %9, label %12, label %10
10: ; preds = %1
%11 = tail call i32 @memcpy(i8* %8, i8* %0, i64 %7)
br label %12
12: ; preds = %1, %10
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ FCEU_DispMessage(char *);
void FCEUD_ToggleStatusIcon(void) { FCEU_DispMessage("Not implemented."); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Not implemented.\00"
define void @FCEUD_ToggleStatusIcon() {
%1 = call i32 @FCEU_DispMessage(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Not implemented.\00"
define void @FCEUD_ToggleStatusIcon() {
%1 = tail call i32 @FCEU_DispMessage(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct fsm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fsm_complement(struct fsm *);
int /*<<< orphan*/ fsm_identity();
struct fsm *fsm_intersect(int /*<<< orphan*/, int /*<<< orphan*/);
struct fsm *fsm_term_negation(struct fsm *net1) {
  return (fsm_intersect(fsm_identity(), fsm_complement(net1)));
}


x86 assembly (clang, -O0):
<fsm_term_negation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <fsm_identity@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fsm_complement@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1050 <fsm_intersect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsm_term_negation>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <fsm_identity@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fsm_complement@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <fsm_intersect@plt>

LLVM IR (-O0):
%struct.fsm = type { i32 }
define %struct.fsm* @fsm_term_negation(%struct.fsm* %0) {
%2 = alloca %struct.fsm*
store %struct.fsm* %0, %struct.fsm** %2
%3 = call i32 (...) @fsm_identity()
%4 = load %struct.fsm*, %struct.fsm** %2
%5 = call i32 @fsm_complement(%struct.fsm* %4)
%6 = call %struct.fsm* @fsm_intersect(i32 %3, i32 %5)
ret %struct.fsm* %6
}

LLVM IR (-O2):
%struct.fsm = type { i32 }
define %struct.fsm* @fsm_term_negation(%struct.fsm* %0) {
%2 = tail call i32 (...) @fsm_identity()
%3 = tail call i32 @fsm_complement(%struct.fsm* %0)
%4 = tail call %struct.fsm* @fsm_intersect(i32 %2, i32 %3)
ret %struct.fsm* %4
}
void gtk_style_attach() {}


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

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

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

LLVM IR (-O2):
define void @gtk_style_attach() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arm_memio_reg_op();
int /*<<< orphan*/ arm_memio_str(int /*<<< orphan*/);
void arm_str_reg() { arm_memio_str(arm_memio_reg_op()); }


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

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

LLVM IR (-O0):
define void @arm_str_reg() {
%1 = call i32 (...) @arm_memio_reg_op()
%2 = call i32 @arm_memio_str(i32 %1)
ret void
}

LLVM IR (-O2):
define void @arm_str_reg() {
%1 = tail call i32 (...) @arm_memio_reg_op()
%2 = tail call i32 @arm_memio_str(i32 %1)
ret void
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
int16_t bmax_int16(int16_t a, int16_t b) { return (a > b ? a : b); }


x86 assembly (clang, -O0):
<bmax_int16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <bmax_int16+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <bmax_int16+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmax_int16>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @bmax_int16(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 sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @bmax_int16(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
float rpmToMotorPower(float rpm) { return rpm / 100 * 127; }


x86 assembly (clang, -O0):
<rpmToMotorPower>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeee(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xede(%rip),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @rpmToMotorPower(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fdiv float %3, 1.000000e+02
%5 = fmul float %4, 1.270000e+02
ret float %5
}

LLVM IR (-O2):
define float @rpmToMotorPower(float %0) {
%2 = fdiv float %0, 1.000000e+02
%3 = fmul float %2, 1.270000e+02
ret float %3
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ rewinddir(int /*<<< orphan*/ *);
void c_rewinddir_(DIR **dirp) { rewinddir(*dirp); }


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

x86 assembly (clang, -O2):
<c_rewinddir_>:
mov    (%rdi),%rdi
jmp    1030 <rewinddir@plt>

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

LLVM IR (-O2):
define void @c_rewinddir_(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = tail call i32 @rewinddir(i32* %2)
ret void
}
/* Variables and functions */
int inp_emulate(int);
char TOSH_READ_CC_RSTN_PIN() { return 0x01 & (inp_emulate(-5) >> 5); }


x86 assembly (clang, -O0):
<TOSH_READ_CC_RSTN_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffffb,%edi
call   1030 <inp_emulate@plt>
sar    $0x5,%eax
and    $0x1,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_READ_CC_RSTN_PIN>:
push   %rax
mov    $0xfffffffb,%edi
call   1030 <inp_emulate@plt>
shr    $0x5,%al
and    $0x1,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @TOSH_READ_CC_RSTN_PIN() {
%1 = call i32 @inp_emulate(i32 -5)
%2 = ashr i32 %1, 5
%3 = and i32 1, %2
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @TOSH_READ_CC_RSTN_PIN() {
%1 = tail call i32 @inp_emulate(i32 -5)
%2 = trunc i32 %1 to i8
%3 = lshr i8 %2, 5
%4 = and i8 %3, 1
ret i8 %4
}
void _set_se_translator(exFunc) {}


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

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

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

LLVM IR (-O2):
define void @_set_se_translator(i32 %0) {
ret void
}
/* Variables and functions */
void *_sbrk(size_t incr) {
  (void)incr;
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @_sbrk(i64 %0) {
ret i8* null
}
char *pstrcat(s1, s2)
char *s1, *s2;
{
  register char *p = s1;
  while (*p)
    p++;
  while (*s2)
    *p++ = *s2++;
  *p = '\0';
  return s1;
}


x86 assembly (clang, -O0):
<pstrcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <pstrcat+0x32>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <pstrcat+0x14>
jmp    1137 <pstrcat+0x37>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     116b <pstrcat+0x6b>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1137 <pstrcat+0x37>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pstrcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
mov    %rcx,%rdi
add    $0x1,%rcx
cmpb   $0x0,(%rdi)
jne    1110 <pstrcat+0x10>
mov    (%rsi),%dl
test   %dl,%dl
je     1146 <pstrcat+0x46>
mov    $0xffffffffffffffff,%rdi
nopl   0x0(%rax)
mov    %dl,(%rcx,%rdi,1)
movzbl 0x2(%rsi,%rdi,1),%edx
add    $0x1,%rdi
test   %dl,%dl
jne    1130 <pstrcat+0x30>
add    %rdi,%rcx
mov    %rcx,%rdi
movb   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define i8* @pstrcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = load i8, i8* %1
%10 = icmp eq i8 %9, 0
br i1 %10, label %19, label %11
11: ; preds = %8, %11
%12 = phi i8 [ %17, %11 ], [ %9, %8 ]
%13 = phi i8* [ %16, %11 ], [ %4, %8 ]
%14 = phi i8* [ %15, %11 ], [ %1, %8 ]
%15 = getelementptr inbounds i8, i8* %14, i64 1
%16 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %13
%17 = load i8, i8* %15
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %11
19: ; preds = %11, %8
%20 = phi i8* [ %4, %8 ], [ %16, %11 ]
store i8 0, i8* %20
ret i8* %0
}
/* Variables and functions */
unsigned int g();
int f(int i) {
  if (g())
    return i < sizeof(int);
  return 3 < 5u - g();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <g@plt>
cmp    $0x0,%eax
je     1143 <f+0x33>
movslq -0x8(%rbp),%rax
cmp    $0x4,%rax
setb   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <f+0x53>
mov    $0x0,%al
call   1030 <g@plt>
mov    $0x5,%ecx
sub    %eax,%ecx
mov    $0x3,%eax
cmp    %ecx,%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <g@plt>
test   %eax,%eax
je     1123 <f+0x13>
cmp    $0x4,%ebx
jmp    1130 <f+0x20>
xor    %eax,%eax
call   1030 <g@plt>
add    $0xfffffffa,%eax
cmp    $0xfffffffc,%eax
setb   %al
movzbl %al,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (...) @g()
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = icmp ult i64 %8, 4
%10 = zext i1 %9 to i32
store i32 %10, i32* %2
br label %16
11: ; preds = %1
%12 = call i32 (...) @g()
%13 = sub i32 5, %12
%14 = icmp ult i32 3, %13
%15 = zext i1 %14 to i32
store i32 %15, i32* %2
br label %16
16: ; preds = %11, %6
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = tail call i32 (...) @g()
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = icmp ult i32 %0, 4
br label %10
6: ; preds = %1
%7 = tail call i32 (...) @g()
%8 = add i32 %7, -6
%9 = icmp ult i32 %8, -4
br label %10
10: ; preds = %6, %4
%11 = phi i1 [ %5, %4 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}
void nullmidpoly(int x, int y) {}


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

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

LLVM IR (-O0):
define void @nullmidpoly(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @nullmidpoly(i32 %0, i32 %1) {
ret void
}
void g_return_if_fail_warning() {}


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

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

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

LLVM IR (-O2):
define void @g_return_if_fail_warning() {
ret void
}
/* Variables and functions */
unsigned long long tsc();
unsigned long long tsc_timer(void) { return tsc(); }


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

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

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

LLVM IR (-O2):
define i64 @tsc_timer() {
%1 = tail call i64 (...) @tsc()
ret i64 %1
}
float mult(int a, int b) {
  float r;
  r = a * b;
  return r;
}


x86 assembly (clang, -O0):
<mult>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mult>:
imul   %esi,%edi
cvtsi2ss %edi,%xmm0
ret

LLVM IR (-O0):
define float @mult(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
%9 = sitofp i32 %8 to float
store float %9, float* %5
%10 = load float, float* %5
ret float %10
}

LLVM IR (-O2):
define float @mult(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = sitofp i32 %3 to float
ret float %4
}
int spnego_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @spnego_init() {
ret i32 0
}
/* Type definitions */
struct cpufreq_affected_cpus {
  int dummy;
};

/* Variables and functions */
struct cpufreq_affected_cpus *proc_get_affected_cpus(unsigned int);
struct cpufreq_affected_cpus *sysfs_get_affected_cpus(unsigned int);
struct cpufreq_affected_cpus *cpufreq_get_affected_cpus(unsigned int cpu) {
  struct cpufreq_affected_cpus *ret;
  ret = sysfs_get_affected_cpus(cpu);
  if (!ret)
    ret = proc_get_affected_cpus(cpu);
  return (ret);
}


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

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

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

LLVM IR (-O2):
%struct.cpufreq_affected_cpus = type { i32 }
define %struct.cpufreq_affected_cpus* @cpufreq_get_affected_cpus(i32 %0) {
%2 = tail call %struct.cpufreq_affected_cpus* @sysfs_get_affected_cpus(i32 %0)
%3 = icmp eq %struct.cpufreq_affected_cpus* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call %struct.cpufreq_affected_cpus* @proc_get_affected_cpus(i32 %0)
br label %6
6: ; preds = %4, %1
%7 = phi %struct.cpufreq_affected_cpus* [ %2, %1 ], [ %5, %4 ]
ret %struct.cpufreq_affected_cpus* %7
}
/* Variables and functions */
bool audio_init(void *UNUSED_handle __attribute__((__unused__))) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @audio_init(i8* nocapture readnone %0) {
ret i32 0
}
void url_parts_convert_to_lower(char *string) {
  char *p;
  for (p = string; *p != '\0'; p++) {
    if (('A' <= (*p) && (*p) <= 'Z'))
      *p = 'a' + (*p - 'A');
  }
}


x86 assembly (clang, -O0):
<url_parts_convert_to_lower>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116f <url_parts_convert_to_lower+0x6f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x41,%eax
cmp    %ecx,%eax
jg     1159 <url_parts_convert_to_lower+0x59>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     1159 <url_parts_convert_to_lower+0x59>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
jmp    115e <url_parts_convert_to_lower+0x5e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <url_parts_convert_to_lower+0x10>
pop    %rbp
ret

x86 assembly (clang, -O2):
<url_parts_convert_to_lower>:
mov    (%rdi),%al
test   %al,%al
je     112a <url_parts_convert_to_lower+0x2a>
add    $0x1,%rdi
jmp    111b <url_parts_convert_to_lower+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     112a <url_parts_convert_to_lower+0x2a>
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     1110 <url_parts_convert_to_lower+0x10>
add    $0x20,%al
mov    %al,-0x1(%rdi)
jmp    1110 <url_parts_convert_to_lower+0x10>
ret

LLVM IR (-O0):
define void @url_parts_convert_to_lower(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %29, %1
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %32
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp sle i32 65, %13
br i1 %14, label %15, label %28
15: ; preds = %10
%16 = load i8*, i8** %3
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 90
br i1 %19, label %20, label %28
20: ; preds = %15
%21 = load i8*, i8** %3
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = sub nsw i32 %23, 65
%25 = add nsw i32 97, %24
%26 = trunc i32 %25 to i8
%27 = load i8*, i8** %3
store i8 %26, i8* %27
br label %28
28: ; preds = %20, %15, %10
br label %29
29: ; preds = %28
%30 = load i8*, i8** %3
%31 = getelementptr inbounds i8, i8* %30, i32 1
store i8* %31, i8** %3
br label %5
32: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @url_parts_convert_to_lower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %4, %9
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ serial;
};
struct TYPE_4__ {
  TYPE_1__ xcrossing;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xcrossing_serial(void *_p) {
  return (unsigned long)((XEvent *)_p)->xcrossing.serial;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XEvent_xcrossing_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
unsigned short query_con_codepage(void) { return (0); }


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

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

LLVM IR (-O0):
define zeroext i16 @query_con_codepage() {
ret i16 0
}

LLVM IR (-O2):
define zeroext i16 @query_con_codepage() {
ret i16 0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;

/* Variables and functions */
int pthread_condattr_init(pthread_condattr_t *attr) {
  (void)attr;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @pthread_condattr_init(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int signal_request();
int ltr_int_rl_shutdown() { return signal_request(); }


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

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

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

LLVM IR (-O2):
define i32 @ltr_int_rl_shutdown() {
%1 = tail call i32 (...) @signal_request()
ret i32 %1
}
int test_imm_20uint8_reg(unsigned char val) {
  return ((val) & (-0x20 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_20uint8_reg>:
cmp    $0x20,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_20uint8_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, -32
%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_20uint8_reg(i8 zeroext %0) {
%2 = icmp ult i8 %0, 32
%3 = select i1 %2, i32 -40, i32 -20
ret i32 %3
}
/* Variables and functions */
int board_ti_is(char *);
int board_is_gp_evm(void) { return board_ti_is("A33515BB"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"A33515BB\00"
define i32 @board_is_gp_evm() {
%1 = call i32 @board_ti_is(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [9 x i8] c"A33515BB\00"
define i32 @board_is_gp_evm() {
%1 = tail call i32 @board_ti_is(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _tar_usage(void) {
  fputs("Usage: "
        "tar"
        " -ctvx [-f archive][file...]\n  -c	Create an archive\n  -f	"
        "Specify an archive to work with (default: stdin or stdout)\n  "
        "-t	List the contents of an archive\n  -v	Verbose mode\n  "
        "-x	Extract from archive\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_tar_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_tar_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [208 x i8] c"Usage: tar -ctvx [-f archive][file...]\0A -c\09Create an archive\0A -f\09Specify an archive to work with (default: stdin or stdout)\0A -t\09List the contents of an archive\0A -v\09Verbose mode\0A -x\09Extract from archive\0A\00"
@stderr = global i32 0
define i32 @_tar_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [208 x i8] c"Usage: tar -ctvx [-f archive][file...]\0A -c\09Create an archive\0A -f\09Specify an archive to work with (default: stdin or stdout)\0A -t\09List the contents of an archive\0A -v\09Verbose mode\0A -x\09Extract from archive\0A\00"
@stderr = global i32 0
define i32 @_tar_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
void ini_hr(double *vars, double *min, double *minABS, double *max) {
  vars[0] = -0.712841;
  vars[1] = -1.936878;
  vars[2] = 3.165682;
  *min = -1.608734;
  *minABS = -1.608734;
  *max = 1.797032;
  return;
}


x86 assembly (clang, -O0):
<ini_hr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xf00(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0xecf(%rip),%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movsd  0xeb6(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xea6(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xe8e(%rip),%xmm0
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini_hr>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movabs $0x40095351159c4977,%rax
53 09 40
mov    %rax,0x10(%rdi)
movabs $0xbff9bd5fdcdf6988,%rax
bd f9 bf
mov    %rax,(%rsi)
mov    %rax,(%rdx)
movabs $0x3ffcc0a4a05dd8f9,%rax
c0 fc 3f
mov    %rax,(%rcx)
ret

LLVM IR (-O0):
define void @ini_hr(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load double*, double** %5
%10 = getelementptr inbounds double, double* %9, i64 0
store double -7.128410e-01, double* %10
%11 = load double*, double** %5
%12 = getelementptr inbounds double, double* %11, i64 1
store double 0xBFFEFD73C9257860, double* %12
%13 = load double*, double** %5
%14 = getelementptr inbounds double, double* %13, i64 2
store double 0x40095351159C4977, double* %14
%15 = load double*, double** %6
store double 0xBFF9BD5FDCDF6988, double* %15
%16 = load double*, double** %7
store double 0xBFF9BD5FDCDF6988, double* %16
%17 = load double*, double** %8
store double 0x3FFCC0A4A05DD8F9, double* %17
ret void
}

LLVM IR (-O2):
define void @ini_hr(double* nocapture writeonly %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = bitcast double* %0 to <2 x double>*
store <2 x double> <double -7.128410e-01, double 0xBFFEFD73C9257860>, <2 x double>* %5
%6 = getelementptr inbounds double, double* %0, i64 2
store double 0x40095351159C4977, double* %6
store double 0xBFF9BD5FDCDF6988, double* %1
store double 0xBFF9BD5FDCDF6988, double* %2
store double 0x3FFCC0A4A05DD8F9, double* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ print_bytes_sep(char const *, int /*<<< orphan*/ const *,
                                   unsigned int, char const *, char *);
void print_bytes(const char m[], const uint8_t *buf, unsigned int size,
                 const char m2[]) {
  print_bytes_sep(m, buf, size, m2, " ");
}


x86 assembly (clang, -O0):
<print_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
lea    0xec3(%rip),%r8
call   1030 <print_bytes_sep@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_bytes>:
lea    0xee9(%rip),%r8
jmp    1030 <print_bytes_sep@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define void @print_bytes(i8* %0, i32* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @print_bytes_sep(i8* %9, i32* %10, i32 %11, i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @print_bytes(i8* %0, i32* %1, i32 %2, i8* %3) {
%5 = tail call i32 @print_bytes_sep(i8* %0, i32* %1, i32 %2, i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int firstUniqChar(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = firstUniqChar("loveleetcode");
  printf("unique = %d\n", i);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <firstUniqChar@plt>
lea    0xed9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"loveleetcode\00"
@.str.1 = [13 x i8] c"unique = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @firstUniqChar(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"loveleetcode\00"
@.str.1 = [13 x i8] c"unique = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @firstUniqChar(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
scalar_t__ DBL_MANT_DIG;
double digitsdbl_(double x) { return (double)DBL_MANT_DIG; }


x86 assembly (clang, -O0):
<digitsdbl_>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    0x2ed8(%rip),%rax
cvtsi2sdq (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<digitsdbl_>:
mov    0x2ee1(%rip),%rax
cvtsi2sdq (%rax),%xmm0
ret

LLVM IR (-O0):
@DBL_MANT_DIG = global i64 0
define double @digitsdbl_(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load i64, i64* @DBL_MANT_DIG
%4 = sitofp i64 %3 to double
ret double %4
}

LLVM IR (-O2):
@DBL_MANT_DIG = global i64 0
define double @digitsdbl_(double %0) {
%2 = load i64, i64* @DBL_MANT_DIG
%3 = sitofp i64 %2 to double
ret double %3
}
void afficherLigneEnnemiNiveau(const unsigned int indexLigneEnnemi) {
  static const char baseEnnemi[9][16] = {
      "    //\\/\\/\\", "    | 0  0 |",   "    \\_---__/",
      "    __|  |__",   "   /__    __\\", " {-/ /    \\ \\-}",
      "     |----|",    "    _||  ||_",   "   /__\\  /__\\"};
  coloration(baseEnnemi[indexLigneEnnemi], 31);
}


x86 assembly (clang, -O0):
<afficherLigneEnnemiNiveau>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
lea    0xedb(%rip),%rdi
shl    $0x4,%rax
add    %rax,%rdi
mov    $0x1f,%esi
mov    $0x0,%al
call   1030 <coloration@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<afficherLigneEnnemiNiveau>:
mov    %edi,%eax
shl    $0x4,%rax
lea    0xee3(%rip),%rdi
add    %rax,%rdi
mov    $0x1f,%esi
xor    %eax,%eax
jmp    1030 <coloration@plt>

LLVM IR (-O0):
@afficherLigneEnnemiNiveau.baseEnnemi = internal constant [9 x [16 x i8]] [[16 x i8] c" //\\/\\/\\\00\00\00\00\00", [16 x i8] c" | 0 0 |\00\00\00\00", [16 x i8] c" \\_---__/\00\00\00\00", [16 x i8] c" __| |__\00\00\00\00", [16 x i8] c" /__ __\\\00\00\00", [16 x i8] c" {-/ / \\ \\-}\00", [16 x i8] c" |----|\00\00\00\00\00", [16 x i8] c" _|| ||_\00\00\00\00", [16 x i8] c" /__\\ /__\\\00\00\00"]
define void @afficherLigneEnnemiNiveau(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [9 x [16 x i8]], [9 x [16 x i8]]* @afficherLigneEnnemiNiveau.baseEnnemi, i64 0, i64 %4
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%7 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @coloration to i32 (i8*, i32, ...)*)(i8* %6, i32 31)
ret void
}

LLVM IR (-O2):
@afficherLigneEnnemiNiveau.baseEnnemi = internal constant [9 x [16 x i8]] [[16 x i8] c" //\\/\\/\\\00\00\00\00\00", [16 x i8] c" | 0 0 |\00\00\00\00", [16 x i8] c" \\_---__/\00\00\00\00", [16 x i8] c" __| |__\00\00\00\00", [16 x i8] c" /__ __\\\00\00\00", [16 x i8] c" {-/ / \\ \\-}\00", [16 x i8] c" |----|\00\00\00\00\00", [16 x i8] c" _|| ||_\00\00\00\00", [16 x i8] c" /__\\ /__\\\00\00\00"]
define void @afficherLigneEnnemiNiveau(i32 %0) {
%2 = zext i32 %0 to i64
%3 = getelementptr inbounds [9 x [16 x i8]], [9 x [16 x i8]]* @afficherLigneEnnemiNiveau.baseEnnemi, i64 0, i64 %2, i64 0
%4 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @coloration to i32 (i8*, i32, ...)*)(i8* %3, i32 31)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __inc_remove_counter();
int __rmdir(char const *);
int rmdir(const char *path) {
  int res = __rmdir(path);
  if (res == 0)
    __inc_remove_counter();
  return res;
}


x86 assembly (clang, -O0):
<rmdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__rmdir@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1149 <rmdir+0x29>
mov    $0x0,%al
call   1030 <__inc_remove_counter@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rmdir>:
push   %rbx
call   1040 <__rmdir@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1133 <rmdir+0x13>
xor    %eax,%eax
call   1030 <__inc_remove_counter@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @rmdir(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @__rmdir(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @__inc_remove_counter()
br label %10
10: ; preds = %8, %1
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @rmdir(i8* %0) {
%2 = tail call i32 @__rmdir(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @__inc_remove_counter()
br label %6
6: ; preds = %4, %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void help(void) {
  fputs("Usage:\n"
        "\tgrubmenu info grldr\n"
        "\tgrubmenu print grldr\n"
        "\tgrubmenu [-r] export grldr menu.lst\n"
        "\tgrubmenu [-r] [-k] import grldr menu.lst\n",
        stderr);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [130 x i8] c"Usage:\0A\09grubmenu info grldr\0A\09grubmenu print grldr\0A\09grubmenu [-r] export grldr menu.lst\0A\09grubmenu [-r] [-k] import grldr menu.lst\0A\00"
@stderr = global i32 0
define void @help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [130 x i8] c"Usage:\0A\09grubmenu info grldr\0A\09grubmenu print grldr\0A\09grubmenu [-r] export grldr menu.lst\0A\09grubmenu [-r] [-k] import grldr menu.lst\0A\00"
@stderr = global i32 0
define void @help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
int expand_fdset(int setsize) { return 256; }


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

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

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

LLVM IR (-O2):
define i32 @expand_fdset(i32 %0) {
ret i32 256
}
/* Type definitions */
struct wl_proxy {
  int dummy;
};
struct wl_data_source {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_set_user_data(struct wl_proxy *, void *);
void wl_data_source_set_user_data(struct wl_data_source *wl_data_source,
                                  void *user_data) {
  wl_proxy_set_user_data((struct wl_proxy *)wl_data_source, user_data);
}


x86 assembly (clang, -O0):
<wl_data_source_set_user_data>:
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 <wl_proxy_set_user_data@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_data_source_set_user_data>:
jmp    1030 <wl_proxy_set_user_data@plt>

LLVM IR (-O0):
%struct.wl_data_source = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_data_source_set_user_data(%struct.wl_data_source* %0, i8* %1) {
%3 = alloca %struct.wl_data_source*
%4 = alloca i8*
store %struct.wl_data_source* %0, %struct.wl_data_source** %3
store i8* %1, i8** %4
%5 = load %struct.wl_data_source*, %struct.wl_data_source** %3
%6 = bitcast %struct.wl_data_source* %5 to %struct.wl_proxy*
%7 = load i8*, i8** %4
%8 = call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %6, i8* %7)
ret void
}

LLVM IR (-O2):
%struct.wl_data_source = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_data_source_set_user_data(%struct.wl_data_source* %0, i8* %1) {
%3 = bitcast %struct.wl_data_source* %0 to %struct.wl_proxy*
%4 = tail call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %3, i8* %1)
ret void
}
/* Variables and functions */
char *memcpy(int /*<<< orphan*/, char const *, size_t);
int strlen(char const *);
int /*<<< orphan*/ xmalloc(size_t);
char *xstrdup(const char *str) {
  char *res = 0;
  if (str != 0) {
    size_t cnt = strlen(str) + 1;
    res = memcpy(xmalloc(cnt), str, cnt);
  }
  return res;
}


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

x86 assembly (clang, -O2):
<xstrdup>:
test   %rdi,%rdi
je     1163 <xstrdup+0x33>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r14
mov    %r14,%rdi
call   1040 <xmalloc@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <memcpy@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @xstrdup(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 %17
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 i32 @xmalloc(i64 %12)
%14 = load i8*, i8** %2
%15 = load i64, i64* %4
%16 = call i8* @memcpy(i32 %13, i8* %14, i64 %15)
store i8* %16, i8** %3
br label %17
17: ; preds = %7, %1
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, 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 i32 @xmalloc(i64 %6)
%8 = tail call i8* @memcpy(i32 %7, i8* %0, i64 %6)
br label %9
9: ; preds = %3, %1
%10 = phi i8* [ %8, %3 ], [ null, %1 ]
ret i8* %10
}