xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char **);
int main() {
  char name[10];
  printf("name:");
  scanf("%s", &name);
  printf("NAME is %s", name);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0xa(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1040 <scanf@plt>
lea    -0xa(%rbp),%rsi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    0x6(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xeb8(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"name:\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [11 x i8] c"NAME is %s\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = bitcast [10 x i8]* %1 to i8**
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %4)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ ffunc();
int /*<<< orphan*/ help();
void key(unsigned char key, int x, int y) {
  switch (key) {
  case 'f':
    ffunc();
    break;
  case 'h':
    help();
    break;
  case '\033':
    exit(EXIT_SUCCESS);
    break;
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1b,%eax
je     1193 <key+0x63>
jmp    1159 <key+0x29>
mov    -0x10(%rbp),%eax
sub    $0x66,%eax
je     117b <key+0x4b>
jmp    116a <key+0x3a>
mov    -0x10(%rbp),%eax
sub    $0x68,%eax
je     1187 <key+0x57>
jmp    11a1 <key+0x71>
mov    $0x0,%al
call   1030 <ffunc@plt>
jmp    11a6 <key+0x76>
mov    $0x0,%al
call   1040 <help@plt>
jmp    11a6 <key+0x76>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
jmp    11a6 <key+0x76>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key>:
cmp    $0x66,%dil
je     1143 <key+0x13>
cmp    $0x68,%dil
je     114a <key+0x1a>
cmp    $0x1b,%dil
je     1151 <key+0x21>
ret
xor    %eax,%eax
jmp    1030 <ffunc@plt>
xor    %eax,%eax
jmp    1040 <help@plt>
push   %rax
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @key(i8 zeroext %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 = zext i8 %7 to i32
switch i32 %8, label %16 [
i32 102, label %9
i32 104, label %11
i32 27, label %13
]
9: ; preds = %3
%10 = call i32 (...) @ffunc()
br label %17
11: ; preds = %3
%12 = call i32 (...) @help()
br label %17
13: ; preds = %3
%14 = load i32, i32* @EXIT_SUCCESS
%15 = call i32 @exit(i32 %14)
unreachable
16: ; preds = %3
br label %17
17: ; preds = %16, %11, %9
ret void
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @key(i8 zeroext %0, i32 %1, i32 %2) {
switch i8 %0, label %11 [
i8 102, label %4
i8 104, label %6
i8 27, label %8
]
4: ; preds = %3
%5 = tail call i32 (...) @ffunc()
br label %11
6: ; preds = %3
%7 = tail call i32 (...) @help()
br label %11
8: ; preds = %3
%9 = load i32, i32* @EXIT_SUCCESS
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %3, %6, %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ query;

/* Variables and functions */
int /*<<< orphan*/ MySAR_push_query_free(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *);
int MySAR_update_config(char *value, char *name) {
  char query[512];
  snprintf(query, sizeof(query),
           "INSERT INTO config (name,value) VALUES ('%s','%s') ON DUPLICATE "
           "KEY UPDATE value=VALUES(value)",
           name, value);
  MySAR_push_query_free(query);
  return 0;
}


x86 assembly (clang, -O0):
<MySAR_update_config>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%r8
mov    $0x200,%esi
lea    0xeb2(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x210(%rbp),%rdi
call   1040 <MySAR_push_query_free@plt>
xor    %eax,%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MySAR_update_config>:
push   %rbx
sub    $0x200,%rsp
mov    %rsi,%rcx
mov    %rdi,%r8
lea    0xecb(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x200,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <MySAR_push_query_free@plt>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [95 x i8] c"INSERT INTO config (name,value) VALUES ('%s','%s') ON DUPLICATE KEY UPDATE value=VALUES(value)\00"
define i32 @MySAR_update_config(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [512 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %4
%8 = load i8*, i8** %3
%9 = call i32 @snprintf(i8* %6, i32 512, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%11 = call i32 @MySAR_push_query_free(i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [95 x i8] c"INSERT INTO config (name,value) VALUES ('%s','%s') ON DUPLICATE KEY UPDATE value=VALUES(value)\00"
define i32 @MySAR_update_config(i8* %0, i8* %1) {
%3 = alloca [512 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 512, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%6 = call i32 @MySAR_push_query_free(i8* %4)
ret i32 0
}
int test_imm_B2uint8_reg(unsigned char val) {
  return ((val) & (-0xB2 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B2uint8_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, -178
%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_B2uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 78
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int main_test() {}


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

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

LLVM IR (-O0):
define i32 @main_test() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @main_test() {
ret i32 undef
}
/* Type definitions */
struct in_addr {
  int /*<<< orphan*/ s_addr;
};
typedef int /*<<< orphan*/ in_addr_t;

/* Variables and functions */
int /*<<< orphan*/ errx(int, char *);
scalar_t__ inet_aton(char *, struct in_addr *);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
in_addr_t atoh(char *s) {
  struct in_addr in;
  if (inet_aton(s, &in) == 0)
    errx(1, "inet_aton");
  return ntohl(in.s_addr);
}


x86 assembly (clang, -O0):
<atoh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <inet_aton@plt>
cmp    $0x0,%rax
jne    1164 <atoh+0x34>
mov    $0x1,%edi
lea    0xea1(%rip),%rsi
call   1030 <errx@plt>
mov    -0x10(%rbp),%edi
call   1050 <ntohl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoh>:
push   %rax
mov    %rsp,%rsi
call   1040 <inet_aton@plt>
test   %rax,%rax
jne    114f <atoh+0x1f>
lea    0xebb(%rip),%rsi
mov    $0x1,%edi
call   1030 <errx@plt>
mov    (%rsp),%edi
call   1050 <ntohl@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
@.str = [10 x i8] c"inet_aton\00"
define i32 @atoh(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.in_addr
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @inet_aton(i8* %4, %struct.in_addr* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @errx(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @ntohl(i32 %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
@.str = [10 x i8] c"inet_aton\00"
define i32 @atoh(i8* %0) {
%2 = alloca %struct.in_addr
%3 = bitcast %struct.in_addr* %2 to i8*
%4 = call i64 @inet_aton(i8* %0, %struct.in_addr* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @errx(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %2, i64 0, i32 0
%10 = load i32, i32* %9
%11 = call i32 @ntohl(i32 %10)
ret i32 %11
}
void c_unsetenv(const char *variable) { return; }


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

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

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

LLVM IR (-O2):
define void @c_unsetenv(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int float_to_int(float);
int isqNaNf(float val) {
  return ((0x7fc00000 & float_to_int(val)) == 0x7fc00000);
}


x86 assembly (clang, -O0):
<isqNaNf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <float_to_int@plt>
and    $0x7fc00000,%eax
cmp    $0x7fc00000,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isqNaNf>:
push   %rax
call   1030 <float_to_int@plt>
not    %eax
xor    %ecx,%ecx
test   $0x7fc00000,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isqNaNf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @float_to_int(float %3)
%5 = and i32 2143289344, %4
%6 = icmp eq i32 %5, 2143289344
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @isqNaNf(float %0) {
%2 = tail call i32 @float_to_int(float %0)
%3 = and i32 %2, 2143289344
%4 = icmp eq i32 %3, 2143289344
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ signalQueue();
int /*<<< orphan*/ sleep(int);
void *check_tache(void *arg) {
  while (1) {
    signalQueue();
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<check_tache>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <signalQueue@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    112c <check_tache+0xc>

x86 assembly (clang, -O2):
<check_tache>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <signalQueue@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <check_tache+0x10>

LLVM IR (-O0):
define i8* @check_tache(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = call i32 (...) @signalQueue()
%5 = call i32 @sleep(i32 1)
br label %3
}

LLVM IR (-O2):
define noalias i8* @check_tache(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 (...) @signalQueue()
%4 = tail call i32 @sleep(i32 1)
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ count(int);
int main() {
  count(3);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
call   1030 <count@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @count(i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float basic_sal;
  scanf("%f", &basic_sal);
  printf("\n%f", basic_sal + 0.4 * basic_sal + 0.2 * basic_sal);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xedb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xeaf(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe8e(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee9(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xebc(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm0,%xmm1
mulsd  0xeb4(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [4 x i8] c"\0A%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = load float, float* %2
%7 = fpext float %6 to double
%8 = call double @llvm.fmuladd.f64(double 4.000000e-01, double %7, double %5)
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = call double @llvm.fmuladd.f64(double 2.000000e-01, double %10, double %8)
%12 = fptrunc double %11 to float
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [4 x i8] c"\0A%f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = call double @llvm.fmuladd.f64(double %5, double 4.000000e-01, double %5)
%7 = call double @llvm.fmuladd.f64(double %5, double 2.000000e-01, double %6)
%8 = fptrunc double %7 to float
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clrtoeol();
int /*<<< orphan*/ move(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mvprintw(int /*<<< orphan*/, int /*<<< orphan*/, char *);
void notificar(char *notificacion) {
  move(0, 0);
  clrtoeol();
  mvprintw(0, 0, notificacion);
}


x86 assembly (clang, -O0):
<notificar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %esi,%esi
mov    %esi,%edi
call   1050 <move@plt>
mov    $0x0,%al
call   1030 <clrtoeol@plt>
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
mov    %esi,%edi
call   1040 <mvprintw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<notificar>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
xor    %esi,%esi
call   1050 <move@plt>
xor    %eax,%eax
call   1030 <clrtoeol@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <mvprintw@plt>

LLVM IR (-O0):
define void @notificar(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @move(i32 0, i32 0)
%4 = call i32 (...) @clrtoeol()
%5 = load i8*, i8** %2
%6 = call i32 @mvprintw(i32 0, i32 0, i8* %5)
ret void
}

LLVM IR (-O2):
define void @notificar(i8* %0) {
%2 = tail call i32 @move(i32 0, i32 0)
%3 = tail call i32 (...) @clrtoeol()
%4 = tail call i32 @mvprintw(i32 0, i32 0, i8* %0)
ret void
}
/* Type definitions */
struct mg_connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mg_if_recved(struct mg_connection *, int);
int /*<<< orphan*/ mg_recv_common(struct mg_connection *, void *, int);
void mg_if_recv_tcp_cb(struct mg_connection *nc, void *buf, int len) {
  mg_recv_common(nc, buf, len);
  mg_if_recved(nc, len);
}


x86 assembly (clang, -O0):
<mg_if_recv_tcp_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <mg_recv_common@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <mg_if_recved@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mg_if_recv_tcp_cb>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1030 <mg_recv_common@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <mg_if_recved@plt>

LLVM IR (-O0):
%struct.mg_connection = type { i32 }
define void @mg_if_recv_tcp_cb(%struct.mg_connection* %0, i8* %1, i32 %2) {
%4 = alloca %struct.mg_connection*
%5 = alloca i8*
%6 = alloca i32
store %struct.mg_connection* %0, %struct.mg_connection** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.mg_connection*, %struct.mg_connection** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @mg_recv_common(%struct.mg_connection* %7, i8* %8, i32 %9)
%11 = load %struct.mg_connection*, %struct.mg_connection** %4
%12 = load i32, i32* %6
%13 = call i32 @mg_if_recved(%struct.mg_connection* %11, i32 %12)
ret void
}

LLVM IR (-O2):
%struct.mg_connection = type { i32 }
define void @mg_if_recv_tcp_cb(%struct.mg_connection* %0, i8* %1, i32 %2) {
%4 = tail call i32 @mg_recv_common(%struct.mg_connection* %0, i8* %1, i32 %2)
%5 = tail call i32 @mg_if_recved(%struct.mg_connection* %0, i32 %2)
ret void
}
/* Variables and functions */
int strlen(unsigned char *);
void vTrimTailSpace(unsigned char *pszStr) {
  int i;
  for (i = strlen(pszStr) - 1; i = 0; i--) {
    if (pszStr[i] != ' ' && pszStr[i] != '\t')
      break;
    pszStr[i] = 0;
  }
}


x86 assembly (clang, -O0):
<vTrimTailSpace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    1141 <vTrimTailSpace+0x31>
jmp    118a <vTrimTailSpace+0x7a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     1170 <vTrimTailSpace+0x60>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x9,%eax
je     1170 <vTrimTailSpace+0x60>
jmp    118a <vTrimTailSpace+0x7a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <vTrimTailSpace+0x1b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vTrimTailSpace>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define void @vTrimTailSpace(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret void
}
int do_825() { return 825; }


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

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

LLVM IR (-O0):
define i32 @do_825() {
ret i32 825
}

LLVM IR (-O2):
define i32 @do_825() {
ret i32 825
}
void WeaponHEGRENADE_Release(void) {}


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

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

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

LLVM IR (-O2):
define void @WeaponHEGRENADE_Release() {
ret void
}
unsigned hash(unsigned ip_src, unsigned ip_dst) {
  unsigned result;
  result = ip_src;
  result += ip_src >> 23;
  result ^= ip_src << 7;
  result |= ip_dst << 3;
  result += ip_dst >> 11;
  result ^= ip_dst << 11;
  return result;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x17,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x7,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shr    $0xb,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0xb,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    %edi,%eax
shr    $0x17,%eax
add    %edi,%eax
shl    $0x7,%edi
xor    %edi,%eax
lea    0x0(,%rsi,8),%ecx
or     %eax,%ecx
mov    %esi,%eax
shr    $0xb,%eax
add    %ecx,%eax
shl    $0xb,%esi
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @hash(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
store i32 %6, i32* %5
%7 = load i32, i32* %3
%8 = lshr i32 %7, 23
%9 = load i32, i32* %5
%10 = add i32 %9, %8
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = shl i32 %11, 7
%13 = load i32, i32* %5
%14 = xor i32 %13, %12
store i32 %14, i32* %5
%15 = load i32, i32* %4
%16 = shl i32 %15, 3
%17 = load i32, i32* %5
%18 = or i32 %17, %16
store i32 %18, i32* %5
%19 = load i32, i32* %4
%20 = lshr i32 %19, 11
%21 = load i32, i32* %5
%22 = add i32 %21, %20
store i32 %22, i32* %5
%23 = load i32, i32* %4
%24 = shl i32 %23, 11
%25 = load i32, i32* %5
%26 = xor i32 %25, %24
store i32 %26, i32* %5
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @hash(i32 %0, i32 %1) {
%3 = lshr i32 %0, 23
%4 = add i32 %3, %0
%5 = shl i32 %0, 7
%6 = xor i32 %4, %5
%7 = shl i32 %1, 3
%8 = or i32 %6, %7
%9 = lshr i32 %1, 11
%10 = add i32 %8, %9
%11 = shl i32 %1, 11
%12 = xor i32 %10, %11
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ trap_R_RegisterShaderNoMip(char *);
void RankStatus_Cache(void) {
  trap_R_RegisterShaderNoMip("menu/art/cut_frame");
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"menu/art/cut_frame\00"
define void @RankStatus_Cache() {
%1 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"menu/art/cut_frame\00"
define void @RankStatus_Cache() {
%1 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ print_usage_info(char const *);
int /*<<< orphan*/ printf(char *, char const *);
void exit_error_input_file_opening(const char *fname, const char *progname) {
  printf("Error: Failed to open input file '%s'.\n", fname);
  print_usage_info(progname);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<exit_error_input_file_opening>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <print_usage_info@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<exit_error_input_file_opening>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <print_usage_info@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Error: Failed to open input file '%s'.\0A\00"
@EXIT_FAILURE = global i32 0
define void @exit_error_input_file_opening(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @print_usage_info(i8* %7)
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
@.str = [40 x i8] c"Error: Failed to open input file '%s'.\0A\00"
@EXIT_FAILURE = global i32 0
define void @exit_error_input_file_opening(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @print_usage_info(i8* %1)
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
}
void A_audioclose() {}


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

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

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

LLVM IR (-O2):
define void @A_audioclose() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char *);
void builtin_cd(char *argv[]) { chdir(argv[0]); }


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

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

LLVM IR (-O0):
define void @builtin_cd(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i32 @chdir(i8* %5)
ret void
}

LLVM IR (-O2):
define void @builtin_cd(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @chdir(i8* %2)
ret void
}
/* Variables and functions */
int fabs(double);
int is_right_angle(double r) { return fabs(r - 3.14159265 / 2) < 1e-5; }


x86 assembly (clang, -O0):
<is_right_angle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xede(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xec1(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_right_angle>:
push   %rax
addsd  0xee7(%rip),%xmm0
call   1030 <fabs@plt>
xor    %ecx,%ecx
test   %eax,%eax
setle  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_right_angle(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 0x3FF921FB53C8D4F1
%5 = call i32 @fabs(double %4)
%6 = sitofp i32 %5 to double
%7 = fcmp olt double %6, 1.000000e-05
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_right_angle(double %0) {
%2 = fadd double %0, 0xBFF921FB53C8D4F1
%3 = tail call i32 @fabs(double %2)
%4 = icmp slt i32 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ my_strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void my_putstr(char *str) { write(1, str, my_strlen(str)); }


x86 assembly (clang, -O0):
<my_putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putstr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <my_strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1040 <write@plt>

LLVM IR (-O0):
define void @my_putstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @my_strlen(i8* %4)
%6 = call i32 @write(i32 1, i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @my_putstr(i8* %0) {
%2 = tail call i32 @my_strlen(i8* %0)
%3 = tail call i32 @write(i32 1, i8* %0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
void strlcpy(char *dest, const char *src, size_t n) {
  strncpy(dest, src, n - 1);
  dest[n - 1] = '\0';
}


x86 assembly (clang, -O0):
<strlcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
sub    $0x1,%rdx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rdx
call   1030 <strncpy@plt>
movb   $0x0,-0x1(%rbx,%r14,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @strlcpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = sub i64 %9, 1
%11 = call i32 @strncpy(i8* %7, i8* %8, i64 %10)
%12 = load i8*, i8** %4
%13 = load i64, i64* %6
%14 = sub i64 %13, 1
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 0, i8* %15
ret void
}

LLVM IR (-O2):
define void @strlcpy(i8* %0, i8* %1, i64 %2) {
%4 = add i64 %2, -1
%5 = tail call i32 @strncpy(i8* %0, i8* %1, i64 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 0, i8* %6
ret void
}
void clflush(volatile void *__p) {
  asm volatile("clflush %0" : "+m"(*(volatile char *)__p));
}


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

x86 assembly (clang, -O2):
<clflush>:
clflush (%rdi)
ret

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

LLVM IR (-O2):
define void @clflush(i8* %0) {
tail call void asm sideeffect "clflush $0", "=*m,*m,~{dirflag},~{fpsr},~{flags}"(i8* elementtype(i8) %0, i8* elementtype(i8) %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
deny(void) { printf("Which nobody can deny!\n"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Which nobody can deny!\0A\00"
define i32 @deny() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [23 x i8] c"Which nobody can deny!\00"
define i32 @deny() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *strrchr(char *, char);
int main(void) {
  char str[] = "this/is/maomao/chong";
  char *p = strrchr(str, '/');
  printf("p=%s\n", p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xec0(%rip),%al
mov    %al,-0xc(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x676e6f68632f6f,%rax
mov    %rax,0xd(%rsp)
mov    %rsp,%rdi
mov    $0x2f,%esi
call   1040 <strrchr@plt>
lea    0xec3(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.str = [21 x i8] c"this/is/maomao/chong\00"
@.str = [6 x i8] c"p=%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [21 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = bitcast [21 x i8]* %2 to i8*
%5 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%6 = call i8* @strrchr(i8* %5, i8 signext 47)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [21 x i8] c"this/is/maomao/chong\00"
@.str = [6 x i8] c"p=%s\0A\00"
define i32 @main() {
%1 = alloca [21 x i8]
%2 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%3 = call i8* @strrchr(i8* %2, i8 signext 47)
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
int is_macmod_pmove(int x) {
  return (x == 0) || (x == 8) || (x == 4) || (x == 1) || (x == 9) || (x == 12);
}


x86 assembly (clang, -O0):
<is_macmod_pmove>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_macmod_pmove+0x5c>
mov    $0x1,%al
cmpl   $0x8,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_macmod_pmove+0x5c>
mov    $0x1,%al
cmpl   $0x4,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_macmod_pmove+0x5c>
mov    $0x1,%al
cmpl   $0x1,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_macmod_pmove+0x5c>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_macmod_pmove+0x5c>
cmpl   $0xc,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_macmod_pmove>:
cmp    $0xa,%edi
jae    1114 <is_macmod_pmove+0x14>
mov    $0x1,%eax
mov    $0x313,%ecx
bt     %edi,%ecx
jb     111c <is_macmod_pmove+0x1c>
xor    %eax,%eax
cmp    $0xc,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_macmod_pmove(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %6, label %3
3: ; preds = %6, %1
%4 = icmp eq i32 %0, 12
%5 = zext i1 %4 to i32
br label %11
6: ; preds = %1
%7 = trunc i32 %0 to i16
%8 = lshr i16 787, %7
%9 = and i16 %8, 1
%10 = icmp eq i16 %9, 0
br i1 %10, label %3, label %11
11: ; preds = %6, %3
%12 = phi i32 [ %5, %3 ], [ 1, %6 ]
ret i32 %12
}
unsigned int bkdr_hash(char *key) {
  char *str = key;
  unsigned int seed = 31;
  unsigned int hash = 0;
  while (*str != '\0') {
    hash = hash * seed + (*str++);
  }
  hash %= 4793;
  return hash;
}


x86 assembly (clang, -O0):
<bkdr_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x1f,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1151 <bkdr_hash+0x51>
mov    -0x18(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    111e <bkdr_hash+0x1e>
mov    -0x18(%rbp),%eax
mov    $0x12b9,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bkdr_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     113f <bkdr_hash+0x3f>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
mov    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <bkdr_hash+0x10>
mov    %eax,%ecx
imul   $0x6d62dd3b,%rcx,%rcx
shr    $0x2b,%rcx
imul   $0x12b9,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @bkdr_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %10, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul i32 %6, 31
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = add i32 %9, %8
%12 = load i8, i8* %10
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %11, 4793
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Type definitions */
struct traversal_algorithm {
  int dummy;
};
struct statement_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ traverse_statement_list(struct statement_list *,
                                           struct traversal_algorithm *);
void traverse_ast(struct statement_list *list,
                  struct traversal_algorithm *algo) {
  traverse_statement_list(list, algo);
}


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

x86 assembly (clang, -O2):
<traverse_ast>:
jmp    1030 <traverse_statement_list@plt>

LLVM IR (-O0):
%struct.statement_list = type { i32 }
%struct.traversal_algorithm = type { i32 }
define void @traverse_ast(%struct.statement_list* %0, %struct.traversal_algorithm* %1) {
%3 = alloca %struct.statement_list*
%4 = alloca %struct.traversal_algorithm*
store %struct.statement_list* %0, %struct.statement_list** %3
store %struct.traversal_algorithm* %1, %struct.traversal_algorithm** %4
%5 = load %struct.statement_list*, %struct.statement_list** %3
%6 = load %struct.traversal_algorithm*, %struct.traversal_algorithm** %4
%7 = call i32 @traverse_statement_list(%struct.statement_list* %5, %struct.traversal_algorithm* %6)
ret void
}

LLVM IR (-O2):
%struct.statement_list = type { i32 }
%struct.traversal_algorithm = type { i32 }
define void @traverse_ast(%struct.statement_list* %0, %struct.traversal_algorithm* %1) {
%3 = tail call i32 @traverse_statement_list(%struct.statement_list* %0, %struct.traversal_algorithm* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void _console_cursor_show(int fd) {
  write(fd, "\033[?25h", strlen("\033[?25h"));
}


x86 assembly (clang, -O0):
<_console_cursor_show>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
lea    0xec8(%rip),%rdi
call   1040 <strlen@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%edx
lea    0xeb7(%rip),%rsi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_console_cursor_show>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xed3(%rip),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"\1B[?25h\00"
define void @_console_cursor_show(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @strlen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @write(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B[?25h\00"
define void @_console_cursor_show(i32 %0) {
%2 = tail call i32 @strlen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func2();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello from subdir2/prog2.c\n");
  func2();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"Hello from subdir2/prog2.c\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @func2()
ret i32 0
}

LLVM IR (-O2):
@str = [27 x i8] c"Hello from subdir2/prog2.c\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @func2()
ret i32 0
}
void INT_NonMaskableInterrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_NonMaskableInterrupt() {
ret void
}
/* Variables and functions */
int gcd(int, int);
int lcm(int a, int b) {
  if (b == 1 || a == b)
    return a;
  if (a == 1)
    return b;
  return a * (b / gcd(a, b));
}


x86 assembly (clang, -O0):
<lcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     1134 <lcm+0x24>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    113f <lcm+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117e <lcm+0x6e>
cmpl   $0x1,-0x8(%rbp)
jne    1154 <lcm+0x44>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117e <lcm+0x6e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <gcd@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
cmp    $0x1,%esi
je     113c <lcm+0x2c>
mov    %esi,%ebp
cmp    %esi,%ebx
je     113c <lcm+0x2c>
cmp    $0x1,%ebx
jne    1129 <lcm+0x19>
mov    %ebp,%ebx
jmp    113c <lcm+0x2c>
mov    %ebx,%edi
mov    %ebp,%esi
call   1030 <gcd@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ecx
imul   %eax,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @lcm(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 = icmp eq i32 %6, 1
br i1 %7, label %12, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8, %2
%13 = load i32, i32* %4
store i32 %13, i32* %3
br label %27
14: ; preds = %8
%15 = load i32, i32* %4
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = load i32, i32* %5
store i32 %18, i32* %3
br label %27
19: ; preds = %14
%20 = load i32, i32* %4
%21 = load i32, i32* %5
%22 = load i32, i32* %4
%23 = load i32, i32* %5
%24 = call i32 @gcd(i32 %22, i32 %23)
%25 = sdiv i32 %21, %24
%26 = mul nsw i32 %20, %25
store i32 %26, i32* %3
br label %27
27: ; preds = %19, %17, %12
%28 = load i32, i32* %3
ret i32 %28
}

LLVM IR (-O2):
define i32 @lcm(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 1
%4 = icmp eq i32 %0, %1
%5 = or i1 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = icmp eq i32 %0, 1
br i1 %7, label %12, label %8
8: ; preds = %6
%9 = tail call i32 @gcd(i32 %0, i32 %1)
%10 = sdiv i32 %1, %9
%11 = mul nsw i32 %10, %0
br label %12
12: ; preds = %6, %2, %8
%13 = phi i32 [ %11, %8 ], [ %0, %2 ], [ %1, %6 ]
ret i32 %13
}