#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct mtwist_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ break_lines(char *, int);
char *destroyed(struct mtwist_state *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *);
char *you_will_be(struct mtwist_state *);
void cop_attack_warning(struct mtwist_state *mt, char *buffer, int buflen,
                        int line_len) {
  snprintf(buffer, buflen,
           "You are in violation of spacefaring ordinance 773-za"
           " and %s %s",
           you_will_be(mt), destroyed(mt));
  break_lines(buffer, line_len);
}


x86 assembly (clang, -O0):
<cop_attack_warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <you_will_be@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <destroyed@plt>
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%rcx
mov    %rax,%r8
lea    0xe71(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1060 <break_lines@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cop_attack_warning>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <you_will_be@plt>
mov    %rax,%r12
mov    %rbp,%rdi
call   1050 <destroyed@plt>
lea    0xe95(%rip),%rdx
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %r12,%rcx
mov    %rax,%r8
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <break_lines@plt>

LLVM IR (-O0):
%struct.mtwist_state = type { i32 }
@.str = [63 x i8] c"You are in violation of spacefaring ordinance 773-za and %s %s\00"
define void @cop_attack_warning(%struct.mtwist_state* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca %struct.mtwist_state*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store %struct.mtwist_state* %0, %struct.mtwist_state** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %6
%10 = load i32, i32* %7
%11 = load %struct.mtwist_state*, %struct.mtwist_state** %5
%12 = call i8* @you_will_be(%struct.mtwist_state* %11)
%13 = load %struct.mtwist_state*, %struct.mtwist_state** %5
%14 = call i8* @destroyed(%struct.mtwist_state* %13)
%15 = call i32 @snprintf(i8* %9, i32 %10, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %14)
%16 = load i8*, i8** %6
%17 = load i32, i32* %8
%18 = call i32 @break_lines(i8* %16, i32 %17)
ret void
}

LLVM IR (-O2):
%struct.mtwist_state = type { i32 }
@.str = [63 x i8] c"You are in violation of spacefaring ordinance 773-za and %s %s\00"
define void @cop_attack_warning(%struct.mtwist_state* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i8* @you_will_be(%struct.mtwist_state* %0)
%6 = tail call i8* @destroyed(%struct.mtwist_state* %0)
%7 = tail call i32 @snprintf(i8* %1, i32 %2, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = tail call i32 @break_lines(i8* %1, i32 %3)
ret void
}