xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;
typedef int uint16_t;
struct hle_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ alist_copy_every_other_sample(struct hle_t *, int, int, int);
void INTERL(struct hle_t *hle, uint32_t w1, uint32_t w2) {
  uint16_t count = w1;
  uint16_t dmemi = (w2 >> 16);
  uint16_t dmemo = w2;
  alist_copy_every_other_sample(hle, dmemo, dmemi, count);
}


x86 assembly (clang, -O0):
<INTERL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
sar    $0x10,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <alist_copy_every_other_sample@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<INTERL>:
mov    %esi,%ecx
mov    %edx,%eax
sar    $0x10,%eax
mov    %edx,%esi
mov    %eax,%edx
jmp    1030 <alist_copy_every_other_sample@plt>

LLVM IR (-O0):
%struct.hle_t = type { i32 }
define void @INTERL(%struct.hle_t* %0, i32 %1, i32 %2) {
%4 = alloca %struct.hle_t*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store %struct.hle_t* %0, %struct.hle_t** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %5
store i32 %10, i32* %7
%11 = load i32, i32* %6
%12 = ashr i32 %11, 16
store i32 %12, i32* %8
%13 = load i32, i32* %6
store i32 %13, i32* %9
%14 = load %struct.hle_t*, %struct.hle_t** %4
%15 = load i32, i32* %9
%16 = load i32, i32* %8
%17 = load i32, i32* %7
%18 = call i32 @alist_copy_every_other_sample(%struct.hle_t* %14, i32 %15, i32 %16, i32 %17)
ret void
}

LLVM IR (-O2):
%struct.hle_t = type { i32 }
define void @INTERL(%struct.hle_t* %0, i32 %1, i32 %2) {
%4 = ashr i32 %2, 16
%5 = tail call i32 @alist_copy_every_other_sample(%struct.hle_t* %0, i32 %2, i32 %4, i32 %1)
ret void
}
/* Variables and functions */
short read_ZIGBEE_short(int);
int /*<<< orphan*/ write_ZIGBEE_short(int, short);
void set_not_encrypt(void) {
  short int temp = 0;
  temp = read_ZIGBEE_short(0x1B);
  temp = temp & (!0x02);
  write_ZIGBEE_short(0x1B, temp);
}


x86 assembly (clang, -O0):
<set_not_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movw   $0x0,-0x2(%rbp)
mov    $0x1b,%edi
call   1030 <read_ZIGBEE_short@plt>
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
and    $0x0,%eax
mov    %ax,-0x2(%rbp)
mov    $0x1b,%edi
movswl -0x2(%rbp),%esi
call   1040 <write_ZIGBEE_short@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_not_encrypt>:
push   %rax
mov    $0x1b,%edi
call   1030 <read_ZIGBEE_short@plt>
mov    $0x1b,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <write_ZIGBEE_short@plt>

LLVM IR (-O0):
define void @set_not_encrypt() {
%1 = alloca i16
store i16 0, i16* %1
%2 = call signext i16 @read_ZIGBEE_short(i32 27)
store i16 %2, i16* %1
%3 = load i16, i16* %1
%4 = sext i16 %3 to i32
%5 = and i32 %4, 0
%6 = trunc i32 %5 to i16
store i16 %6, i16* %1
%7 = load i16, i16* %1
%8 = call i32 @write_ZIGBEE_short(i32 27, i16 signext %7)
ret void
}

LLVM IR (-O2):
define void @set_not_encrypt() {
%1 = tail call signext i16 @read_ZIGBEE_short(i32 27)
%2 = tail call i32 @write_ZIGBEE_short(i32 27, i16 signext 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ __le64_to_cpu(int /*<<< orphan*/ const);
uint64_t get64_le(const uint64_t *p) { return __le64_to_cpu(*p); }


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

x86 assembly (clang, -O2):
<get64_le>:
mov    (%rdi),%edi
jmp    1030 <__le64_to_cpu@plt>

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

LLVM IR (-O2):
define i32 @get64_le(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @__le64_to_cpu(i32 %2)
ret i32 %3
}
int test_imm_FEuint16_mem(unsigned short *val) {
  return ((*val) & (-0xFE << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_FEuint16_mem>:
movzwl (%rdi),%eax
test   $0xff02,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FEuint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -254
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ getline(char *, int);
scalar_t__ is_balanced(char *, int);
int /*<<< orphan*/ printf(char *);
main() {
  char input[200];
  printf(">");
  getline(input, 200);
  if (is_balanced(input, 200))
    printf("True");
  else
    printf("False");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
lea    -0xd0(%rbp),%rdi
mov    $0xc8,%esi
call   1050 <getline@plt>
lea    -0xd0(%rbp),%rdi
mov    $0xc8,%esi
call   1040 <is_balanced@plt>
cmp    $0x0,%rax
je     118b <main+0x5b>
lea    0xe81(%rip),%rdi
call   1030 <printf@plt>
jmp    1197 <main+0x67>
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
mov    $0x3e,%edi
call   1030 <putchar@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1060 <getline@plt>
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1050 <is_balanced@plt>
test   %rax,%rax
lea    0xe8c(%rip),%rax
lea    0xe80(%rip),%rdi
cmove  %rax,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c">\00"
@.str.1 = [5 x i8] c"True\00"
@.str.2 = [6 x i8] c"False\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%5 = call i32 @getline(i8* %4, i32 200)
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%7 = call i64 @is_balanced(i8* %6, i32 200)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %13
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"True\00"
@.str.2 = [6 x i8] c"False\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @putchar(i32 62)
%4 = call i32 @getline(i8* %2, i32 200)
%5 = call i64 @is_balanced(i8* %2, i32 200)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%8 = call i32 @printf(i8* dereferenceable(1) %7)
ret i32 0
}
void __mark_inode_dirty(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<__mark_inode_dirty>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__mark_inode_dirty>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.__mark_inode_dirty = [19 x i8] c"__mark_inode_dirty\00"
define void @__mark_inode_dirty() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.__mark_inode_dirty, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.__mark_inode_dirty = [19 x i8] c"__mark_inode_dirty\00"
define void @__mark_inode_dirty() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.__mark_inode_dirty, i64 0, i64 0))
ret void
}
/* Type definitions */
struct lexer {
  int dummy;
};

/* Variables and functions */
int lexer_next_char(struct lexer *);
int /*<<< orphan*/ lexer_roll_back(struct lexer *, int);
int lexer_next_peek(struct lexer *lx) {
  int c = lexer_next_char(lx);
  lexer_roll_back(lx, 1);
  return c;
}


x86 assembly (clang, -O0):
<lexer_next_peek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <lexer_next_char@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <lexer_roll_back@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lexer_next_peek>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <lexer_next_char@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <lexer_roll_back@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.lexer = type { i32 }
define i32 @lexer_next_peek(%struct.lexer* %0) {
%2 = alloca %struct.lexer*
%3 = alloca i32
store %struct.lexer* %0, %struct.lexer** %2
%4 = load %struct.lexer*, %struct.lexer** %2
%5 = call i32 @lexer_next_char(%struct.lexer* %4)
store i32 %5, i32* %3
%6 = load %struct.lexer*, %struct.lexer** %2
%7 = call i32 @lexer_roll_back(%struct.lexer* %6, i32 1)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
%struct.lexer = type { i32 }
define i32 @lexer_next_peek(%struct.lexer* %0) {
%2 = tail call i32 @lexer_next_char(%struct.lexer* %0)
%3 = tail call i32 @lexer_roll_back(%struct.lexer* %0, i32 1)
ret i32 %2
}
/* Type definitions */
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ PF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  struct sockaddr sin;
  if (socket(PF_INET, SOCK_STREAM, 0) != -1)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
cmp    $0xffffffff,%eax
je     1154 <main+0x44>
movl   $0x0,-0x4(%rbp)
jmp    115b <main+0x4b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@PF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.sockaddr
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @PF_INET
%8 = load i32, i32* @SOCK_STREAM
%9 = call i32 @socket(i32 %7, i32 %8, i32 0)
%10 = icmp ne i32 %9, -1
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 0, i32* %3
br label %13
12: ; preds = %2
store i32 1, i32* %3
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@PF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @PF_INET
%4 = load i32, i32* @SOCK_STREAM
%5 = tail call i32 @socket(i32 %3, i32 %4, i32 0)
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i32
ret i32 %7
}
char to_lower(int c) {
  if (c >= 'A' && c <= 'Z')
    return ((c - 'A') + 'a');
  return c;
}


x86 assembly (clang, -O0):
<to_lower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     112c <to_lower+0x2c>
cmpl   $0x5a,-0x8(%rbp)
jg     112c <to_lower+0x2c>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
jmp    1132 <to_lower+0x32>
mov    -0x8(%rbp),%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_lower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%eax
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @to_lower(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 65
%12 = add nsw i32 %11, 97
%13 = trunc i32 %12 to i8
store i8 %13, i8* %2
br label %17
14: ; preds = %6, %1
%15 = load i32, i32* %3
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %17
17: ; preds = %14, %9
%18 = load i8, i8* %2
ret i8 %18
}

LLVM IR (-O2):
define signext i8 @to_lower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
%6 = trunc i32 %5 to i8
ret i8 %6
}
void isr_ac_bus_tx_process_pre(struct voip_dsp_s *this) {}


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

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

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

LLVM IR (-O2):
%struct.voip_dsp_s = type opaque
define void @isr_ac_bus_tx_process_pre(%struct.voip_dsp_s* nocapture %0) {
ret void
}
void foo565() {}


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

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

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

LLVM IR (-O2):
define void @foo565() {
ret void
}
void aic23_power_down(void) {}


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

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

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

LLVM IR (-O2):
define void @aic23_power_down() {
ret void
}
int Func64(struct bar *B) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.bar = type opaque
define i32 @Func64(%struct.bar* nocapture readnone %0) {
ret i32 0
}
void foo741() {}


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

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

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

LLVM IR (-O2):
define void @foo741() {
ret void
}
/* Variables and functions */
scalar_t__ strcmp_opt(char const *, char const *);
int opt_streq(const char *s1, const char *s2) {
  return 0 == strcmp_opt(s1, s2);
}


x86 assembly (clang, -O0):
<opt_streq>:
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 <strcmp_opt@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @opt_streq(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 = load i8*, i8** %4
%7 = call i64 @strcmp_opt(i8* %5, i8* %6)
%8 = icmp eq i64 0, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @opt_streq(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp_opt(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int getChar(char **s) { return *(*s)++; }


x86 assembly (clang, -O0):
<getChar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,(%rcx)
movsbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getChar>:
mov    (%rdi),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rdi)
movsbl (%rax),%eax
ret

LLVM IR (-O0):
define i32 @getChar(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i32 1
store i8* %5, i8** %3
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @getChar(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = getelementptr inbounds i8, i8* %2, i64 1
store i8* %3, i8** %0
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, double);
void ftod4(double value, char *strDouble) { sprintf(strDouble, "%.4f", value); }


x86 assembly (clang, -O0):
<ftod4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
lea    0xecf(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftod4>:
lea    0xee9(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%.4f\00"
define void @ftod4(double %0, i8* %1) {
%3 = alloca double
%4 = alloca i8*
store double %0, double* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load double, double* %3
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %6)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.4f\00"
define void @ftod4(double %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %0)
ret void
}
/* Type definitions */
struct asObject {
  int dummy;
};

/* Variables and functions */
struct asObject *asParseLineFile(int /*<<< orphan*/);
int /*<<< orphan*/ lineFileOpen(char *, int);
struct asObject *asParseFile(char *fileName) {
  return asParseLineFile(lineFileOpen(fileName, 1));
}


x86 assembly (clang, -O0):
<asParseFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <lineFileOpen@plt>
mov    %eax,%edi
call   1030 <asParseLineFile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asParseFile>:
push   %rax
mov    $0x1,%esi
call   1040 <lineFileOpen@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <asParseLineFile@plt>

LLVM IR (-O0):
%struct.asObject = type { i32 }
define %struct.asObject* @asParseFile(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @lineFileOpen(i8* %3, i32 1)
%5 = call %struct.asObject* @asParseLineFile(i32 %4)
ret %struct.asObject* %5
}

LLVM IR (-O2):
%struct.asObject = type { i32 }
define %struct.asObject* @asParseFile(i8* %0) {
%2 = tail call i32 @lineFileOpen(i8* %0, i32 1)
%3 = tail call %struct.asObject* @asParseLineFile(i32 %2)
ret %struct.asObject* %3
}
unsigned xrop3_48_0_0(unsigned char s, unsigned char t) {
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = ~S;
  stk1 = T & stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_48_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
and    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_48_0_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
not    %eax
and    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_48_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %4, -1
%8 = and i32 %6, %7
ret i32 %8
}
/* Type definitions */
typedef int uid_t;
struct passwd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ WaitKey();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
struct passwd *getpwuid(uid_t uid) {
  fprintf(stderr, "getpwuid %d\n", uid);
  WaitKey();
  return 0;
}


x86 assembly (clang, -O0):
<getpwuid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <WaitKey@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpwuid>:
push   %rax
mov    %edi,%edx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
call   1040 <WaitKey@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.passwd = type { i32 }
@stderr = global i32 0
@.str = [13 x i8] c"getpwuid %d\0A\00"
define %struct.passwd* @getpwuid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i32 (...) @WaitKey()
ret %struct.passwd* null
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
@stderr = global i32 0
@.str = [13 x i8] c"getpwuid %d\0A\00"
define noalias %struct.passwd* @getpwuid(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
%4 = tail call i32 (...) @WaitKey()
ret %struct.passwd* null
}
int blank(char *buffer) {
  int i;
  for (i = 0; buffer[i] != '\0'; i++)
    if ((unsigned char)buffer[i] > 32)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<blank>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1158 <blank+0x58>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jle    1145 <blank+0x45>
movl   $0x0,-0x4(%rbp)
jmp    115f <blank+0x5f>
jmp    114a <blank+0x4a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <blank+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blank>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1120 <blank+0x20>
add    $0x1,%rdi
nop
cmp    $0x21,%cl
jae    1121 <blank+0x21>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <blank+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @blank(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %12
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %12, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = icmp ugt i8 %10, 32
%12 = add nuw i64 %9, 1
br i1 %11, label %13, label %4
13: ; preds = %8, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() { printf("O resultado eh: %.2f", 8.0 * 2.0 / 3.0); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xeed(%rip),%rdi
movsd  0xedd(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"O resultado eh: %.2f\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), double 0x4015555555555555)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"O resultado eh: %.2f\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), double 0x4015555555555555)
ret i32 0
}
int main(int argc, const char **argv) { return 0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
void main() {
  int i = 0;
  int j = 0;
  int k = (j + 13) / 27;
  while (k > 10) {
    k += 1;
    i = 3 * k - 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xd,%eax
mov    $0x1b,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jle    1145 <main+0x45>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
imul   $0x3,-0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1123 <main+0x23>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 13
%6 = sdiv i32 %5, 27
store i32 %6, i32* %3
br label %7
7: ; preds = %10, %0
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 10
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = mul nsw i32 3, %13
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %1
br label %7
16: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ring_dump();
void ilka_log_dump() {
  if (0)
    ring_dump();
}


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

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

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

LLVM IR (-O2):
define void @ilka_log_dump() {
ret void
}
/* Type definitions */
struct battle_char {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_status(struct battle_char *, int);
scalar_t__ get_random(int /*<<< orphan*/, int);
scalar_t__ mod6(struct battle_char *, struct battle_char *, int);
void poison(struct battle_char *origin, struct battle_char *target) {
  if (get_random(0, 100) < mod6(origin, target, 160))
    add_status(target, 10);
}


x86 assembly (clang, -O0):
<poison>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0xa0,%edx
call   1040 <mod6@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1180 <poison+0x50>
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1050 <add_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poison>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0xa0,%edx
call   1040 <mod6@plt>
cmp    %rax,%rbx
jge    1171 <poison+0x41>
mov    %r14,%rdi
mov    $0xa,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <add_status@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.battle_char = type { i32 }
define void @poison(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
%5 = call i64 @get_random(i32 0, i32 100)
%6 = load %struct.battle_char*, %struct.battle_char** %3
%7 = load %struct.battle_char*, %struct.battle_char** %4
%8 = call i64 @mod6(%struct.battle_char* %6, %struct.battle_char* %7, i32 160)
%9 = icmp slt i64 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load %struct.battle_char*, %struct.battle_char** %4
%12 = call i32 @add_status(%struct.battle_char* %11, i32 10)
br label %13
13: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define void @poison(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = tail call i64 @get_random(i32 0, i32 100)
%4 = tail call i64 @mod6(%struct.battle_char* %0, %struct.battle_char* %1, i32 160)
%5 = icmp slt i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @add_status(%struct.battle_char* %1, i32 10)
br label %8
8: ; preds = %6, %2
ret void
}
int f1(int *a) {}


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

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

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

LLVM IR (-O2):
define i32 @f1(i32* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int max_of_four(int, int, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main() {
  int a, b, c, d;
  scanf("%d %d %d %d", &a, &b, &c, &d);
  int ans = max_of_four(a, b, c, d);
  printf("%d\n", ans);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <max_of_four@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1050 <scanf@plt>
mov    0x14(%rsp),%edi
mov    0x10(%rsp),%esi
mov    0xc(%rsp),%edx
mov    0x8(%rsp),%ecx
call   1030 <max_of_four@plt>
lea    0xe9c(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = call i32 @max_of_four(i32 %10, i32 %11, i32 %12, i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %14)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ atan2(double, double);
int /*<<< orphan*/ atan2f(float, float);
int /*<<< orphan*/ atan2l(long double, long double);
void uninitvar_atan2(void) {
  float f1, f2;
  (void)atan2f(f1, f2);
  double d1, d2;
  (void)atan2(d1, d2);
  long double ld1, ld2;
  (void)atan2l(ld1, ld2);
}


x86 assembly (clang, -O0):
<uninitvar_atan2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1050 <atan2f@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1030 <atan2@plt>
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1040 <atan2l@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_atan2>:
sub    $0x28,%rsp
call   1050 <atan2f@plt>
call   1030 <atan2@plt>
call   1040 <atan2l@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @uninitvar_atan2() {
%1 = alloca float
%2 = alloca float
%3 = alloca double
%4 = alloca double
%5 = alloca x86_fp80
%6 = alloca x86_fp80
%7 = load float, float* %1
%8 = load float, float* %2
%9 = call i32 @atan2f(float %7, float %8)
%10 = load double, double* %3
%11 = load double, double* %4
%12 = call i32 @atan2(double %10, double %11)
%13 = load x86_fp80, x86_fp80* %5
%14 = load x86_fp80, x86_fp80* %6
%15 = call i32 @atan2l(x86_fp80 %13, x86_fp80 %14)
ret void
}

LLVM IR (-O2):
define void @uninitvar_atan2() {
%1 = tail call i32 @atan2f(float undef, float undef)
%2 = tail call i32 @atan2(double undef, double undef)
%3 = tail call i32 @atan2l(x86_fp80 undef, x86_fp80 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ main_menu();
int /*<<< orphan*/ start_screen();
int main() {
  start_screen();
  main_menu();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @start_screen()
%2 = tail call i32 (...) @main_menu()
ret i32 0
}
int test_imm_3Bint64_midword_reg(long long val) {
  return ((val >> 16) & (0x3B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_3Bint64_midword_reg>:
test   $0x3b0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_3Bint64_midword_reg(i64 %0) {
%2 = and i64 %0, 3866624
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned short gcd(unsigned short a, unsigned short b) {
  unsigned short c;
  while (a != 0) {
    c = a;
    a = b % a;
    b = c;
  }
  return b;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
cmp    $0x0,%eax
je     1146 <gcd+0x46>
mov    -0x2(%rbp),%ax
mov    %ax,-0x6(%rbp)
movzwl -0x4(%rbp),%eax
movzwl -0x2(%rbp),%ecx
cltd
idiv   %ecx
mov    %dx,%ax
mov    %ax,-0x2(%rbp)
mov    -0x6(%rbp),%ax
mov    %ax,-0x4(%rbp)
jmp    1112 <gcd+0x12>
movzwl -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%eax
test   %edi,%edi
je     1120 <gcd+0x20>
mov    %edi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
xor    %edx,%edx
div    %cx
mov    %ecx,%eax
test   %dx,%dx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @gcd(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
br label %6
6: ; preds = %10, %2
%7 = load i16, i16* %3
%8 = zext i16 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %19
10: ; preds = %6
%11 = load i16, i16* %3
store i16 %11, i16* %5
%12 = load i16, i16* %4
%13 = zext i16 %12 to i32
%14 = load i16, i16* %3
%15 = zext i16 %14 to i32
%16 = srem i32 %13, %15
%17 = trunc i32 %16 to i16
store i16 %17, i16* %3
%18 = load i16, i16* %5
store i16 %18, i16* %4
br label %6
19: ; preds = %6
%20 = load i16, i16* %4
ret i16 %20
}

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

/* Variables and functions */
int /*<<< orphan*/ kfree(struct SkipCell *);
void SkipCell_free(struct SkipCell *cell) { kfree(cell); }


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

x86 assembly (clang, -O2):
<SkipCell_free>:
jmp    1030 <kfree@plt>

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

LLVM IR (-O2):
%struct.SkipCell = type { i32 }
define void @SkipCell_free(%struct.SkipCell* %0) {
%2 = tail call i32 @kfree(%struct.SkipCell* %0)
ret void
}
/* Variables and functions */
int turn_image(double);
int turn_image_right(void) { return turn_image(90.0); }


x86 assembly (clang, -O0):
<turn_image_right>:
push   %rbp
mov    %rsp,%rbp
movsd  0xee4(%rip),%xmm0
call   1030 <turn_image@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<turn_image_right>:
movsd  0xee8(%rip),%xmm0
jmp    1030 <turn_image@plt>

LLVM IR (-O0):
define i32 @turn_image_right() {
%1 = call i32 @turn_image(double 9.000000e+01)
ret i32 %1
}

LLVM IR (-O2):
define i32 @turn_image_right() {
%1 = tail call i32 @turn_image(double 9.000000e+01)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ lwip_initialize();
int /*<<< orphan*/ lwip_task();
int /*<<< orphan*/ server_initialize();
int /*<<< orphan*/ system_initialize();
int main(void) {
  system_initialize();
  lwip_initialize();
  server_initialize();
  while (1) {
    lwip_task();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <system_initialize@plt>
mov    $0x0,%al
call   1060 <lwip_initialize@plt>
mov    $0x0,%al
call   1030 <server_initialize@plt>
mov    $0x0,%al
call   1040 <lwip_task@plt>
jmp    1164 <main+0x24>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <system_initialize@plt>
xor    %eax,%eax
call   1060 <lwip_initialize@plt>
xor    %eax,%eax
call   1030 <server_initialize@plt>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <lwip_task@plt>
jmp    1160 <main+0x20>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @system_initialize()
%3 = call i32 (...) @lwip_initialize()
%4 = call i32 (...) @server_initialize()
br label %5
5: ; preds = %0, %5
%6 = call i32 (...) @lwip_task()
br label %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @system_initialize()
%2 = tail call i32 (...) @lwip_initialize()
%3 = tail call i32 (...) @server_initialize()
br label %4
4: ; preds = %0, %4
%5 = tail call i32 (...) @lwip_task()
br label %4
}
/* Variables and functions */
int unlink(char const *);
int _tunlink(const char *filename) { return unlink(filename); }


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

x86 assembly (clang, -O2):
<_tunlink>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define i32 @_tunlink(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
unsigned int sa1100_pcmcia_mecr_bs(unsigned int pcmcia_cycle_ns,
                                   unsigned int cpu_clock_khz) {
  unsigned int t = ((pcmcia_cycle_ns * cpu_clock_khz) / 6) - 1000000;
  return (t / 1000000) + (((t % 1000000) == 0) ? 0 : 1);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    $0x6,%ecx
xor    %edx,%edx
div    %ecx
sub    $0xf4240,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xf4240,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xf4240,%ecx
xor    %edx,%edx
div    %ecx
mov    -0x10(%rbp),%eax
mov    %edx,%esi
mov    $0x1,%ecx
xor    %edx,%edx
cmp    $0x0,%esi
cmove  %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
imul   %esi,%edi
mov    $0xaaaaaaab,%ecx
imul   %rdi,%rcx
shr    $0x22,%rcx
add    $0xfff0bdc0,%ecx
imul   $0x431bde83,%rcx,%rax
imul   $0x68c26139,%ecx,%ecx
ror    $0x6,%ecx
shr    $0x32,%rax
cmp    $0x10c7,%ecx
sbb    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @sa1100_pcmcia_mecr_bs(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
%7 = load i32, i32* %4
%8 = mul i32 %6, %7
%9 = udiv i32 %8, 6
%10 = sub i32 %9, 1000000
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = udiv i32 %11, 1000000
%13 = load i32, i32* %5
%14 = urem i32 %13, 1000000
%15 = icmp eq i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 0, i32 1
%18 = add i32 %12, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @sa1100_pcmcia_mecr_bs(i32 %0, i32 %1) {
%3 = mul i32 %1, %0
%4 = udiv i32 %3, 6
%5 = add nsw i32 %4, -1000000
%6 = udiv i32 %5, 1000000
%7 = urem i32 %5, 1000000
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
%10 = add nuw nsw i32 %6, %9
ret i32 %10
}
/* Variables and functions */
int port_byte_in(int);
int /*<<< orphan*/ port_byte_out(int, int);
int get_cursor() {
  port_byte_out(0x3d4, 14);
  int offset = port_byte_in(0x3d5) << 8;
  port_byte_out(0x3d4, 15);
  offset += port_byte_in(0x3d5);
  return offset * 2;
}


x86 assembly (clang, -O0):
<get_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <port_byte_out@plt>
mov    $0x3d5,%edi
call   1040 <port_byte_in@plt>
shl    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <port_byte_out@plt>
mov    $0x3d5,%edi
call   1040 <port_byte_in@plt>
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cursor>:
push   %rbx
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <port_byte_out@plt>
mov    $0x3d5,%edi
call   1040 <port_byte_in@plt>
mov    %eax,%ebx
shl    $0x8,%ebx
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <port_byte_out@plt>
mov    $0x3d5,%edi
call   1040 <port_byte_in@plt>
add    %ebx,%eax
add    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get_cursor() {
%1 = alloca i32
%2 = call i32 @port_byte_out(i32 980, i32 14)
%3 = call i32 @port_byte_in(i32 981)
%4 = shl i32 %3, 8
store i32 %4, i32* %1
%5 = call i32 @port_byte_out(i32 980, i32 15)
%6 = call i32 @port_byte_in(i32 981)
%7 = load i32, i32* %1
%8 = add nsw i32 %7, %6
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = mul nsw i32 %9, 2
ret i32 %10
}

LLVM IR (-O2):
define i32 @get_cursor() {
%1 = tail call i32 @port_byte_out(i32 980, i32 14)
%2 = tail call i32 @port_byte_in(i32 981)
%3 = shl i32 %2, 8
%4 = tail call i32 @port_byte_out(i32 980, i32 15)
%5 = tail call i32 @port_byte_in(i32 981)
%6 = add nsw i32 %5, %3
%7 = shl nsw i32 %6, 1
ret i32 %7
}
/* Variables and functions */
int geti();
int /*<<< orphan*/ pfd();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ syscall(int, int);
void show_pipe() {
  int i;
  pfd();
  printf("Pipe? ");
  i = geti();
  syscall(35, i);
}


x86 assembly (clang, -O0):
<show_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <pfd@plt>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <geti@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x23,%edi
call   1040 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_pipe>:
push   %rax
xor    %eax,%eax
call   1060 <pfd@plt>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1050 <geti@plt>
mov    $0x23,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <syscall@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Pipe? \00"
define void @show_pipe() {
%1 = alloca i32
%2 = call i32 (...) @pfd()
%3 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @geti()
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @syscall(i32 35, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Pipe? \00"
define void @show_pipe() {
%1 = tail call i32 (...) @pfd()
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @geti()
%4 = tail call i32 @syscall(i32 35, i32 %3)
ret void
}