#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 generator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ write_int(struct generator *, int);
int /*<<< orphan*/ write_margin(struct generator *);
int /*<<< orphan*/ write_newline(struct generator *);
int /*<<< orphan*/ write_string(struct generator *, char *);
void wgotol(struct generator *g, int n) {
  write_margin(g);
  write_string(g, "break lab");
  write_int(g, n);
  write_string(g, ";");
  write_newline(g);
}


x86 assembly (clang, -O0):
<wgotol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <write_margin@plt>
mov    -0x8(%rbp),%rdi
lea    0xe9d(%rip),%rsi
call   1030 <write_string@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <write_int@plt>
mov    -0x8(%rbp),%rdi
lea    0xe8b(%rip),%rsi
call   1030 <write_string@plt>
mov    -0x8(%rbp),%rdi
call   1060 <write_newline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wgotol>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <write_margin@plt>
lea    0xeac(%rip),%rsi
mov    %rbx,%rdi
call   1030 <write_string@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1050 <write_int@plt>
lea    0xe9d(%rip),%rsi
mov    %rbx,%rdi
call   1030 <write_string@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <write_newline@plt>

LLVM IR (-O0):
%struct.generator = type { i32 }
@.str = [10 x i8] c"break lab\00"
@.str.1 = [2 x i8] c";\00"
define void @wgotol(%struct.generator* %0, i32 %1) {
%3 = alloca %struct.generator*
%4 = alloca i32
store %struct.generator* %0, %struct.generator** %3
store i32 %1, i32* %4
%5 = load %struct.generator*, %struct.generator** %3
%6 = call i32 @write_margin(%struct.generator* %5)
%7 = load %struct.generator*, %struct.generator** %3
%8 = call i32 @write_string(%struct.generator* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%9 = load %struct.generator*, %struct.generator** %3
%10 = load i32, i32* %4
%11 = call i32 @write_int(%struct.generator* %9, i32 %10)
%12 = load %struct.generator*, %struct.generator** %3
%13 = call i32 @write_string(%struct.generator* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = load %struct.generator*, %struct.generator** %3
%15 = call i32 @write_newline(%struct.generator* %14)
ret void
}

LLVM IR (-O2):
%struct.generator = type { i32 }
@.str = [10 x i8] c"break lab\00"
@.str.1 = [2 x i8] c";\00"
define void @wgotol(%struct.generator* %0, i32 %1) {
%3 = tail call i32 @write_margin(%struct.generator* %0)
%4 = tail call i32 @write_string(%struct.generator* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @write_int(%struct.generator* %0, i32 %1)
%6 = tail call i32 @write_string(%struct.generator* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @write_newline(%struct.generator* %0)
ret void
}